Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Promoting In-App Purchases

Discussion in 'Unity IAP' started by Fee_Xue, Jun 18, 2019.

  1. Fee_Xue

    Fee_Xue

    Joined:
    Dec 13, 2017
    Posts:
    5
    Hi guys,

    I integrated Promoting In-App Purchases for kids app. As apple requirements, we registered the Parental Gate on "SetApplePromotionalPurchaseInterceptorCallback" .

    If user passed the parental gate successfully, it will trigger "IAppleExtensions.ContinuePromotionalPurchases()". If we tap same test link serval times, we can get Parental Gate. This is normal and correct.

    If user FAILED to pass the parental gate, but we did nothing except closing parental local page. If we tap the same test link (same product), it is NOT able to trigger the Parental Gate anymore. It seems the previous promoting purchasing is in pending status. So, is there a way to stop current promoting purchasing? does unity support the interface to stop it?

    Thanks a lot,
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
  3. Fee_Xue

    Fee_Xue

    Joined:
    Dec 13, 2017
    Posts:
    5
    @JeffDUnity3D

    1. This is the basic code we used.
    2. The Xcode project's debug below would happen after failing to pass parental gate and tap the same test link (same product) to trigger promoting purchase.


    Code (CSharp):
    1.         protected override void StoreConfigurationSetup()
    2.         {
    3.             base.StoreConfigurationSetup();
    4.  
    5.             Builder.Configure<IAppleConfiguration>()
    6.                 .SetApplePromotionalPurchaseInterceptorCallback(OnPromotionalPurchase);
    7.         }
    8.  
    9.         private void OnPromotionalPurchase(Product item)
    10.         {
    11.             DPParentsLockManager.Show(OnPromotedIAPParentLockResult);
    12.         }
    13.  
    14.         private void OnPromotedIAPParentLockResult(bool isSuccessful)
    15.         {
    16.             if (isSuccessful)
    17.             {            
    18. //Pass parental gate
    19.   DPSubscription.Instance.OpenPurchaseSubscriptionPanel(DPSubAnalyticsEvents.GenericParamValuePromotedIAP);
    20.                 AppleExtension.ContinuePromotionalPurchases();
    21.             }    
    22. else
    23. {
    24. //Failed to pass parental gate
    25. }
    26.         }
     

    Attached Files:

  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
    Got it, we will test here. If it turns out to be an issue we can address, you might see an update in the next IAP release, hopefully later this summer.
     
  5. Fee_Xue

    Fee_Xue

    Joined:
    Dec 13, 2017
    Posts:
    5
    Hi Jeff, did IAP team test this scenario? do you have the same issue?:))
     
  6. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    4,855
    No, I probably won't get to this for some time.