Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Can't buy anything with UnityIAP on IOS (Thai region)

Discussion in 'Unity IAP' started by Playa_rc, Jun 11, 2019.

  1. Playa_rc

    Playa_rc

    Joined:
    Dec 10, 2013
    Posts:
    6
    Hello. I have one problem. When I try to buy anything in my app using UnityIAP plugin on IOS (Thai region), I got an exception with strange stracktrace which is connected to DateTime methods.

    Exception:

    P.S. On other region (US, UK, EU) everything is okay and I can buy anything what I want.
    Unity 2018.3.14f1. In App Purchasing package version is 2.0.6. Apple (Sandbox). IAPSecurityException
     
    Last edited: Jun 11, 2019
  2. Playa_rc

    Playa_rc

    Joined:
    Dec 10, 2013
    Posts:
    6
    Cannot validate due to unhandled exception. (System.IndexOutOfRangeException: Index was outside the bounds of the array. at System.Globalization.DateTimeFormatInfo.GetMonthName (System.Int32 month) [0x00000] in <00000000000000000000000000000000>:0 at System.Globalization.DateTimeFormatInfo.AddMonthNames (System.Globalization.TokenHashValue[] temp, System.String monthPostfix) [0x00000] in <00000000000000000000000000000000>:0 at System.Globalization.DateTimeFormatInfo.CreateTokenHashTable () [0x00000] in <00000000000000000000000000000000>:0 at System.Globalization.DateTimeFormatInfo.Tokenize (System.TokenType TokenMask, System.TokenType& tokenType, System.Int32& tokenValue, System.__DTString& str) [0x00000] in <00000000000000000000000000000000>:0 at System.WindowsConsoleDriver.IsModifierKey (System.Int16 virtualKeyCode) [0x00000] in <00000000000000000000000000000000>:0 at System.DateTimeParse.Lex (System.DateTimeParse+DS dps, System.__DTString& str, System.DateTimeToken& dtok, System.DateTimeRawInfo& raw, System.DateTimeResult& result, System.Globalization.DateTimeFormatInfo& dtfi, System.Globalization.DateTimeStyles styles) [0x00000] in <00000000000000000000000000000000>:0 at System.DateTimeParse.TryParse (System.String s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles, System.DateTimeResult& result) [0x00000] in <00000000000000000000000000000000>:0 at System.DateTimeParse.Parse (System.String s, System.Globalization.DateTimeFormatInfo dtfi, System.Globalization.DateTimeStyles styles) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Security.AppleReceiptParser.ParseReceipt (LipingShare.LCLib.Asn1Processor.Asn1Node data) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Security.AppleReceiptParser.Parse (System.Byte[] receiptData, UnityEngine.Purchasing.Security.PKCS7& receipt) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Security.AppleValidator.Validate (System.Byte[] receiptData) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Security.CrossPlatformValidator.Validate (System.String unityIAPReceipt) [0x00000] in <00000000000000000000000000000000>:0 at InAppPurchases.PurchaseManager.ProcessPurchase (UnityEngine.Purchasing.PurchaseEventArgs args) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.PurchasingManager.ProcessPurchaseIfNew (UnityEngine.Purchasing.Product product) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.JSONStore.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionID) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Extension.UnityUtil.Update () [0x00000] in <00000000000000000000000000000000>:0 ), e.StackTrace= at UnityEngine.Purchasing.Security.CrossPlatformValidator.Validate (System.String unityIAPReceipt) [0x00000] in <00000000000000000000000000000000>:0 at InAppPurchases.PurchaseManager.ProcessPurchase (UnityEngine.Purchasing.PurchaseEventArgs args) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.PurchasingManager.ProcessPurchaseIfNew (UnityEngine.Purchasing.Product product) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.JSONStore.OnPurchaseSucceeded (System.String id, System.String receipt, System.String transactionID) [0x00000] in <00000000000000000000000000000000>:0 at UnityEngine.Purchasing.Extension.UnityUtil.Update () [0x00000] in <00000000000000000000000000000000>:0
     
  3. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,452
    What version of the IAP Asset package you you using? The latest is 1.22. You need both the Package Manager and Asset packages.
     
  4. Playa_rc

    Playa_rc

    Joined:
    Dec 10, 2013
    Posts:
    6
    IAP Updates window says that I'm using the latest version (1.22.0)
    In App Purchasing in Package Manager version is 2.0.6
     
  5. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    75
    I think this related to Unity fixing localisation in 2018.3. Now Datetime format uses Thai buddhist Calender on thai devices.
     
  6. Playa_rc

    Playa_rc

    Joined:
    Dec 10, 2013
    Posts:
    6
    I have not found any info about it. Can you please provide any link?

    P.S. Or maybe unity representative can give some info?

    Have tried with 2018.4.2f1 and 2019.1.6f1 and got the same exception!
     
    Last edited: Jun 13, 2019
  7. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,452
    No updates at this time, this is an issue we are looking into.
     
  8. BrianND

    BrianND

    Joined:
    May 14, 2015
    Posts:
    75
  9. Playa_rc

    Playa_rc

    Joined:
    Dec 10, 2013
    Posts:
    6
    Hello. Is there any update?