Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Receipt and Auto renewing subscription on Google

Discussion in 'Unity IAP' started by Le_Poulet, Jul 26, 2021.

  1. Le_Poulet

    Le_Poulet

    Joined:
    May 18, 2017
    Posts:
    24
    Hi,

    having some issues on auto-renew subscriptions on android. I got IAP package 3.2.2.
    First buy is going well without any problem, but when I need to renew,
    ProcessPurchase isn't call. I tried to restart the app but it was the same. Is there something I did wrong or is there a solution to force the renew of a subscribtion when the end date is passed?
    I saw some log from UnityPurchasing that said a receipt is not new :
    Unity IAP: Already recorded transaction

    Another question is about the trial period: Is there a way through Unity to know if the account already use the trial period?
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    There will be no ProcessPurchase on renew. You'll want to check the receipt in your product controller list, see the Sample IAP Project v2 for an example https://forum.unity.com/threads/sample-iap-project.529555/#post-6950270 . If there is a receipt, the user has an active subscription.
     
  3. Le_Poulet

    Le_Poulet

    Joined:
    May 18, 2017
    Posts:
    24
    Thanks a lot. I understand better now.
     
  4. Le_Poulet

    Le_Poulet

    Joined:
    May 18, 2017
    Posts:
    24
    I'm facing another problem: On previous version on my app with older IAP package, order-id on subscription was like GPA.0000-1111-2222-33333 for the first purchase and GPA.0000-1111-2222-33333..X for the next X.

    On version 3.2.2 of IAP package, there was no ..1/..2 for the renewal. Does something has change about that?
     
  5. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    Yes, for consistency moving forward, we are using purchase token now. Search for purchaseToken on this page for more information https://forum.unity.com/threads/uni...d-deprecated-asset-store-v2-3-0.415517/page-2
     
  6. Le_Poulet

    Le_Poulet

    Joined:
    May 18, 2017
    Posts:
    24
    Thank for quick answer.
     
    JeffDUnity3D likes this.