Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Hello, when I use ApplePay in Unity IAP, always return to OnPurchaseFailed () and throw PurchaseFa

Discussion in 'Unity IAP' started by 1067105601, Nov 13, 2018.

  1. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Hello, when I use ApplePay in Unity IAP, always return to OnPurchaseFailed () and throw PurchaseFailure Reason. Unknown,Where did I do wrong?

    1,Unity IAP has finished initialising
    2,I confirm that ProductID is right
     
  2. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    it is my Script


    Code (CSharp):
    1. public class GameManager : Manager,IStoreListener {
    2. void Awake() {
    3. Init();
    4. #if UNITY_ANDROID && !UNITY_EDITOR
    5.  
    6.            pluginObject = new AndroidJavaClass("com.games.yxsix.MyPluginClass").CallStatic<AndroidJavaObject>("GetInstance");
    7. #elif UNITY_IPHONE && !UNITY_EDITOR
    8. InitUnityPurchase();
    9.  
    10. #endif
    11. }
    12.  
    13.  
    14. public void InitUnityPurchase ()
    15. {
    16. var module = StandardPurchasingModule.Instance();
    17. ConfigurationBuilder builder = ConfigurationBuilder.Instance(module);
    18. Debug.Log("Initialize----------------------------------------------------------------------------------------games.4566.shangp6");
    19. builder.AddProduct("games.4566.shangp6", ProductType.Consumable);
    20. UnityPurchasing.Initialize(this, builder);
    21. }
    22.  
    23.  
    24.  
    25. public void OnInitialized(IStoreController controller, IExtensionProvider extensions)
    26. {
    27. Debug.Log("Unity IAP OnInitialized----------------------------------------------------------------");
    28. m_controller = controller;
    29. m_extensions = extensions.GetExtension<IAppleExtensions> ();
    30. m_extensions.RegisterPurchaseDeferredListener (OnDeferred);
    31. }
    32.  
    33.  
    34. public void OnInitializeFailed(InitializationFailureReason error)
    35. {
    36. Debug.Log("Unity IAP OnInitializeFailed---------------------------------------------------------------------");
    37. switch (error)
    38. {
    39. case InitializationFailureReason.AppNotKnown:
    40. Debug.LogError("Is your App correctly uploaded on the relevant publisher console?");
    41. break;
    42. case InitializationFailureReason.PurchasingUnavailable:
    43. // Ask the user if billing is disabled in device settings.
    44. Debug.Log("Billing disabled!");
    45. break;
    46. case InitializationFailureReason.NoProductsAvailable:
    47. // Developer configuration error; check product metadata.
    48. Debug.Log("No products available for purchase!");
    49. break;
    50. }
    51. }
    52.  
    53.  
    54. public void ApplePay(string OrderInfo)
    55.         {
    56.             Debug.Log ("ApplePay---" + OrderInfo);
    57. #if UNITY_IPHONE && !UNITY_EDITOR
    58. if (m_PurchaseInProgress)
    59. {
    60. Debug.Log("Please wait, purchase in progress");
    61. return;
    62. }
    63. if (m_controller != null) {
    64. var product = m_controller.products.WithID (OrderInfo);
    65. if (product != null && product.availableToPurchase) {
    66.  
    67. Debug.log("ApplePay-InitiatePurchase---------------------------------------------------------" + OrderInfo);
    68. m_PurchaseInProgress = true;
    69. m_controller.InitiatePurchase (product);
    70.  
    71. }else{
    72. Debug.LogError("No product has id----------------------------------------------" + OrderInfo);
    73. }
    74. }else{
    75. Debug.LogError("Purchasing is not initialized---------------------------------");
    76. }
    77.  
    78.  
    79.  
    80.  
    81.  
    82. public PurchaseProcessingResult ProcessPurchase(PurchaseEventArgs e)
    83. {
    84. Debug.Log("Unity IAP ProcessPurchase id(" + e.purchasedProduct.definition.id + ")receipt(" + e.purchasedProduct.receipt + ")");
    85. m_PurchaseInProgress = false;
    86. if (Application.platform == RuntimePlatform.IPhonePlayer) {
    87.  
    88. string transactionReceipt = m_extensions.GetTransactionReceiptForProduct (e.purchasedProduct);
    89. Debug.Log (transactionReceipt);
    90.  
    91. }
    92. return PurchaseProcessingResult.Complete;
    93. }
    94.  
    95.  
    96. public void OnPurchaseFailed(Product item, PurchaseFailureReason r)
    97. {
    98. Debug.Log("Unity IAP OnPurchaseFailed id(" + item.definition.id + ")PurchaseFailureReason(" + r + ")");
    99. m_PurchaseInProgress = false;
    100. }
    101.  
    102.  
    103. private void OnDeferred (Product item)
    104. {
    105. Debug.Log("Deferred--------------------------------");
    106. }
    107. }
     
  3. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    in appstore connect
    My App is Prepare for submission;
    Product is Prepare for submission;
     
  4. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Add a new App ID to create a fundamental application entity with Apple.

    NOTE: Use an Explicit App ID. Wildcard App IDs (com.example.*) cannot be used for applications that use In-App Purchases.

    NOTE: The App ID is available to use in iTunes Connect after you create it in the Developer Center.

    If I use internal purchase, I can't use it Wildcard App IDs (com.example.*)?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Joined:
    May 2, 2017
    Posts:
    14,446
  6. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
  7. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Are you using a sandbox account to test purchase?
    Please log out the account in Settings before launching your app.
    You can use the 'ITransactionHistoryExtensions.GetLastPurchaseFailureDescription()' API to get the platform speific failure descirption.
     
  8. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12

    Thank you
    1 I used a sandbox account to test purchase;
    2 Im logged out;
    3 I'll try it now. Thank you for your advice.
     
  9. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    [QUOTE =“unityjingyao,post:3888397,member:1302656”]您使用沙盒帐户测试购买吗?
    请在启动应用之前在“设置”中注销该帐户。
    您可以使用'ITransactionHistoryExtensions.GetLastPurchaseFailureDescription()'API来获取平台特定故障描述。[/ QUOTE]

    谢谢。看来这款iPhone可能会遇到一些问题。

    xcode Journal

    Unity IAP OnPurchaseFailed id(games.4566.shangp6)PurchaseFailureReason(Unknown)
    LuaFramework.GameManager:OnPurchaseFailed(Product,PurchaseFailureReason)
    UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription,String)
    UnityEngine.Purchasing.Extension.UnityUtil:更新()

    (文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp行:51)

    存储特定的错误代码:SKErrorUnknown
    LuaFramework.GameManager:OnPurchaseFailed(Product,PurchaseFailureReason)
    UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription,String)
    UnityEngine.Purchasing.Extension.UnityUtil:更新()

    (文件名:/Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp行:51)

    购买失败说明消息:APPLE_无法连接到iTunes Store
    LuaFramework.GameManager:OnPurchaseFailed(Product,PurchaseFailureReason)
    UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription,String)
    UnityEngine.Purchasing.Extension.UnityUtil:更新()
     
  10. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    Hi,
    Please make sure that you've filled "Agreements, Tax, and Banking" in iTunesConnect.
    Could you please try it again with a new Sandbox account?
    If the issue still happens, please send me a full log. I'd like to check the initialization log.
    Thank you.
     
  11. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Thank you
    I checked it and should not miss it.

    This is the diary


    [B]Initialize----------------------------------------------------------------------------------------games.4566.shangp6[/B]

    [B]LuaFramework.GameManager:InitUnityPurchase()[/B]

    [B]UnityEngine.GameObject:AddComponent()[/B]

    [B]Facade:AddManager(String)[/B]

    [B]StartUpCommand:Execute(IMessage)[/B]

    [B]Controller:ExecuteCommand(IMessage)[/B]

    [B]AppFacade:StartUp()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]file:////var/mobile/Containers/Data/Application/2F842382-311D-4D14-ADE2-73EC93E87C19/Documents/gamecenternew/ StreamingAssets[/B]

    [B]LuaFramework.ResourceManager:Initialize(String, Action)[/B]

    [B]LuaFramework.<OnUpdateResource>c__Iterator5:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]

    [B]LuaFramework.<GetHttpURL>c__Iterator1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]InitLuaBundle----------------------------------------------------------[/B]

    [B]LuaFramework.LuaManager:InitLuaBundle(String[])[/B]

    [B]LuaFramework.LuaManager:InitStart()[/B]

    [B]LuaFramework.GameManager:OnInitialize()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]15:15:21.420-219: LuaState start[/B]

    [B]LuaInterface.LuaState:Start()[/B]

    [B]LuaFramework.LuaManager:InitStart()[/B]

    [B]LuaFramework.GameManager:OnInitialize()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]15:15:21.424-219: jit false[/B]

    [B]LuaInterface.ToLua:Print(IntPtr)[/B]

    [B]LuaInterface.LuaState:LuaLoadBuffer(Byte[], String)[/B]

    [B]LuaInterface.LuaState:OpenBaseLuaLibs()[/B]

    [B]LuaInterface.LuaState:Start()[/B]

    [B]LuaFramework.LuaManager:InitStart()[/B]

    [B]LuaFramework.GameManager:OnInitialize()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]15:15:21.424-219: os: OSX, arch: arm64[/B]

    [B]LuaInterface.ToLua:Print(IntPtr)[/B]

    [B]LuaInterface.LuaState:LuaLoadBuffer(Byte[], String)[/B]

    [B]LuaInterface.LuaState:OpenBaseLuaLibs()[/B]

    [B]LuaInterface.LuaState:Start()[/B]

    [B]LuaFramework.LuaManager:InitStart()[/B]

    [B]LuaFramework.GameManager:OnInitialize()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]15:15:21.477-219: table:0x112FAC188[/B]

    [B]LuaInterface.ToLua:Print(IntPtr)[/B]

    [B]LuaInterface.LuaState:LuaLoadBuffer(Byte[], String)[/B]

    [B]LuaFramework.GameManager:OnInitialize()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]SendConnect---------------------------------------------------------------------------------------------------------------------------------------------192.168.1.119624[/B]

    [B]LuaFramework.NetworkManager:SendConnect(String, Int32)[/B]

    [B]LuaFramework_NetworkManagerWrap:SendConnect(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]LuaFramework.GameManager:InitGame()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]RemoveGameSocket-----------------------------------------------------------------------------------------------------------------------------[/B]

    [B]LuaFramework.NetworkManager:RemoveGameSocket()[/B]

    [B]LuaFramework.NetworkManager:SendConnect(String, Int32)[/B]

    [B]LuaFramework_NetworkManagerWrap:SendConnect(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]LuaFramework.GameManager:InitGame()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]SocketClient OnRemove--------------------------------[/B]

    [B]SocketClient:OnRemove()[/B]

    [B]LuaFramework.NetworkManager:SendConnect(String, Int32)[/B]

    [B]LuaFramework_NetworkManagerWrap:SendConnect(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]LuaFramework.GameManager:InitGame()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]host:192.168.1.11[/B]

    [B]SocketClient:ConnectServer(String, Int32)[/B]

    [B]LuaFramework.NetworkManager:SendConnect(String, Int32)[/B]

    [B]LuaFramework_NetworkManagerWrap:SendConnect(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]LuaFramework.GameManager:InitGame()[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]Using configuration builder objects[/B]

    [B]UnityEngine.Purchasing.StoreCatalogImpl:handleCachedCatalog(Action`1)[/B]

    [B]UnityEngine.Purchasing.<Process>d__4:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:21.671593+0800 yxsix[452:13268] UnityIAP: Requesting 1 products[/B]

    [B]2018-11-14 15:15:21.674296+0800 yxsix[452:13268] UnityIAP: Requesting product data...[/B]

    [B]2018-11-14 15:15:22.128536+0800 yxsix[452:13268] You are using download over http. Currently unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.[/B]

    [B]RemoveGameSocket-----------------------------------------------------------------------------------------------------------------------------[/B]

    [B]LuaFramework.NetworkManager:RemoveGameSocket()[/B]

    [B]LuaFramework_NetworkManagerWrap:RemoveGameSocket(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]SocketCommand:Execute(IMessage)[/B]

    [B]Controller:ExecuteCommand(IMessage)[/B]

    [B]LuaFramework.NetworkManager:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]CreateScene::>> Hall[/B]

    [B]LuaFramework.ScenesManager:CreateScene(String, LuaFunction, LuaTable)[/B]

    [B]LuaFramework_ScenesManagerWrap:CreateScene(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]SocketCommand:Execute(IMessage)[/B]

    [B]Controller:ExecuteCommand(IMessage)[/B]

    [B]LuaFramework.NetworkManager:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]进度值0[/B]

    [B]LuaFramework.ScenesManager:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]Unloading 5 Unused Serialized files (Serialized files now loaded: 17)[/B]

    [B]进度值90[/B]

    [B]LuaFramework.ScenesManager:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]UnloadTime: 1.567083 ms[/B]

    [B]CreateScene::>> Hall[/B]

    [B]LuaFramework.<LoadScene>c__Iterator0:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]



    [B]Unloading 387 unused Assets to reduce memory usage. Loaded Objects now: 1411.[/B]

    [B]Total: 9.482083 ms (FindLiveObjects: 0.282125 ms CreateObjectMapping: 0.098791 ms MarkObjects: 8.807124 ms DeleteObjects: 0.293708 ms)[/B]


    [B]15:15:23.241-306: Type UnityEngine.CanvasGroup not wrap to lua, push as UnityEngine.Component, the warning is only raised once[/B]

    [B]LuaInterface.LuaState:GetMissMetaReference(Type)[/B]

    [B]LuaInterface.ToLua:PushPreLoadType(IntPtr, Object, Type)[/B]

    [B]UnityEngine_GameObjectWrap:GetComponent(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]UnityEngine.GameObject:AddComponent()[/B]

    [B]LuaFramework.<CreatePanel>c__AnonStorey0:<>m__0(Object[])[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:23.255001+0800 yxsix[452:13268] You are using download over http. Currently unity adds NSAllowsArbitraryLoads to Info.plist to simplify transition, but it will be removed soon. Please consider updating to https.[/B]

    [B]15:15:23.526-316: Type UnityEngine.UI.ToggleGroup not wrap to lua, push as UnityEngine.EventSystems.UIBehaviour, the warning is only raised once[/B]

    [B]LuaInterface.LuaState:GetMissMetaReference(Type)[/B]

    [B]LuaInterface.ToLua:PushPreLoadType(IntPtr, Object, Type)[/B]

    [B]UnityEngine_GameObjectWrap:GetComponent(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]LuaFramework.<OnLoadAsset>c__Iterator1`1:MoveNext()[/B]

    [B]UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]DOTWEEN :: An error inside a tween callback was silently taken care of > [string "view/HallPanel"]:415: attempt to index global 'LoadingPanel' (a nil value)[/B]

    [B]stack traceback:[/B]

    [B][string "view/HallPanel"]:415: in function <[string "view/HallPanel"]:413>[/B]


    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call()[/B]

    [B]DG.Tweening.Tween:OnTweenCallback(TweenCallback)[/B]

    [B]DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode)[/B]

    [B]DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single)[/B]

    [B]DG.Tweening.Core.DOTweenComponent:Update()[/B]



    [B]DG.Tweening.Tween:OnTweenCallback(TweenCallback)[/B]

    [B]DG.Tweening.Tween:DoGoto(Tween, Single, Int32, UpdateMode)[/B]

    [B]DG.Tweening.Core.TweenManager:Update(UpdateType, Single, Single)[/B]

    [B]DG.Tweening.Core.DOTweenComponent:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:23.981030+0800 yxsix[452:13268] UnityIAP: Received 1 products[/B]

    [B]2018-11-14 15:15:24.008956+0800 yxsix[452:13268] UnityIAP: No App Receipt found[/B]

    [B]2018-11-14 15:15:24.016222+0800 yxsix[452:13268] UnityIAP: No App Receipt found[/B]

    [B]Unity IAP OnInitialized----------------------------------------------------------------[/B]

    [B]LuaFramework.GameManager:OnInitialized(IStoreController, IExtensionProvider)[/B]

    [B]UnityEngine.Purchasing.PurchasingManager:CheckForInitialization()[/B]

    [B]UnityEngine.Purchasing.PurchasingManager:OnProductsRetrieved(List`1)[/B]

    [B]UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]UnityIAP: Promo interface is available for 1 items[/B]

    [B]UnityEngine.Purchasing.Promo:ProvideProductsToAds(HashSet`1)[/B]

    [B]UnityEngine.Purchasing.AppleStoreImpl:OnProductsRetrieved(String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:24.028077+0800 yxsix[452:13268] UnityIAP: Add transaction observer[/B]

    [B]2018-11-14 15:15:24.028355+0800 yxsix[452:13268] UnityIAP UnityEarlyTransactionObserver: Request to initiate queued payments[/B]

    [B]ApplePay---games.4566.shangp6[/B]

    [B]LuaFramework.GameManager:ApplePay(String)[/B]

    [B]LuaFramework_GameManagerWrap:ApplePay(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]UnityEngine.Events.InvokableCallList:Invoke(Object[])[/B]

    [B]UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:Process()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]ApplePay-InitiatePurchase---------------------------------------------------------games.4566.shangp6[/B]

    [B]LuaFramework.GameManager:ApplePay(String)[/B]

    [B]LuaFramework_GameManagerWrap:ApplePay(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]UnityEngine.Events.InvokableCallList:Invoke(Object[])[/B]

    [B]UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:Process()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:44.634625+0800 yxsix[452:13268] UnityIAP: PurchaseProduct: games.4566.shangp6[/B]

    [B]2018-11-14 15:15:44.655268+0800 yxsix[452:13268] [MC] System group container for systemgroup.com.apple.configurationprofiles path is /private/var/containers/Shared/SystemGroup/systemgroup.com.apple.configurationprofiles[/B]

    [B]2018-11-14 15:15:44.658805+0800 yxsix[452:13268] [MC] Reading from public effective user settings.[/B]

    [B]purchase({0}): games.4566.shangp6[/B]

    [B]LuaFramework_GameManagerWrap:ApplePay(IntPtr)[/B]

    [B]LuaInterface.LuaState:PCall(Int32, Int32)[/B]

    [B]LuaInterface.LuaFunction:PCall()[/B]

    [B]LuaInterface.LuaFunction:Call(Object[])[/B]

    [B]UnityEngine.Events.InvokableCallList:Invoke(Object[])[/B]

    [B]UnityEngine.EventSystems.ExecuteEvents:Execute(GameObject, BaseEventData, EventFunction`1)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean)[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchEvents()[/B]

    [B]UnityEngine.EventSystems.StandaloneInputModule:Process()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]2018-11-14 15:15:44.684103+0800 yxsix[452:13268] UnityIAP: UpdatedTransactions[/B]

    [B]2018-11-14 15:15:46.961823+0800 yxsix[452:13268] UnityIAP: UpdatedTransactions[/B]

    [B]2018-11-14 15:15:46.961942+0800 yxsix[452:13268] UnityIAP: PurchaseFailed: 0[/B]

    [B]onPurchaseFailedEvent({0}): games.4566.shangp6[/B]

    [B]UnityEngine.Purchasing.PurchasingManager:OnPurchaseFailed(PurchaseFailureDescription)[/B]

    [B]UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription, String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]Unity IAP OnPurchaseFailed id(games.4566.shangp6)PurchaseFailureReason(Unknown)[/B]

    [B]LuaFramework.GameManager:OnPurchaseFailed(Product, PurchaseFailureReason)[/B]

    [B]UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription, String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]Store specific error code: SKErrorUnknown[/B]

    [B]LuaFramework.GameManager:OnPurchaseFailed(Product, PurchaseFailureReason)[/B]

    [B]UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription, String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]


    [B]Purchase failure description message: APPLE_无法连接到 iTunes Store[/B]

    [B]LuaFramework.GameManager:OnPurchaseFailed(Product, PurchaseFailureReason)[/B]

    [B]UnityEngine.Purchasing.JSONStore:OnPurchaseFailed(PurchaseFailureDescription, String)[/B]

    [B]UnityEngine.Purchasing.Extension.UnityUtil:Update()[/B]



    [B](Filename: /Users/builduser/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)[/B]
     
  12. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    I reinstalled a sandbox test account.
    APPLE_ could not connect to iTunes Store
     
  13. unityjingyao

    unityjingyao

    Unity Technologies

    Joined:
    Feb 20, 2017
    Posts:
    220
    The initialization step doesn't have any problem.
    This kind of issue is out of Unity IAP's control.
    Could you please try more product ids?
    I saw that you only had one product in your project.
     
  14. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Thank you for your advice. I'll try it now, because it is still being audited, so there is only one.

    Thank you for your advice. I'll try it now, because APP is still being audited, so there is only one.
     
  15. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Thank you , The reason is that I did not fill in build string in Xcode.
    The information I get from here, I hope to help others.
    https://developer.apple.com/library...ERROR_MESSAGES-CANNOT_CONNECT_TO_ITUNES_STORE
     
  16. 1067105601

    1067105601

    Joined:
    Apr 15, 2015
    Posts:
    12
    Cannot connect to iTunes Store
    The "Cannot connect to iTunes Store" issue may be due to one or more of the following reasons:

     
    unityjingyao likes this.