Search Unity

Resolved Product doesn't have receipt even when customer has purcahsed them on App Store

Discussion in 'Unity IAP' started by Developer1999-1, Nov 2, 2022.

Thread Status:
Not open for further replies.
  1. Developer1999-1

    Developer1999-1

    Joined:
    Oct 27, 2020
    Posts:
    38
    I have already published the game and IAP has been working well. However, on 2 separate occasions, I have receive reports from customers stating that a non-consumable product isn't unlocked after they have purchased them.

    To be exact, it happens like this:
    1. The customer has purchased the product. Purchase is successful and product is unlocked
    2. The customer closes the game.
    3. The customer opens the game again, and IAP product's "hasreceipt" property returns false, thus the product is not unlocked.

    Here's what I have attempted:
    - I asked the customer to attempt to purchase the product again, thinking App Store will give back the product since it is a non-consumable and is already purchased, so the pricing/purchase pop-up should not show up again.
    - However, the purchase pop-up showed up, despite the customer is logged in with the same account on App Store.

    I have a close friend who has purchased the product. He deleted the game, re-downloaded it, and attempted to restore the purchases. He was able to replicate the same bug: App Store See the video below:



    As you can see, App Store even tells my friend that he is signed into the wrong account, despite showing his purchase record of the product at the end.

    One more detail: my friend WAS able to restore purchase once before; that's why there are a 0.00 payment in the purchase list, aka, he was able to restore the purchase on 9/13.

    Unity Version: 2020.3.38f
    IAP Version: 4.3.0

    I understand IAP is currently on 4.5.1. I have updated the version on my build. However, I was not able to find a bug report on this, so I am wondering if this has been found/fixed at all.

    Has anyone encountered similiar events? Is it even a Unity IAP bug, or maybe it's on Apple's side?
     
    Last edited: Nov 2, 2022
  2. John_Corbett

    John_Corbett

    Joined:
    May 17, 2019
    Posts:
    151
    Hi @Developer1999-1,

    We aren't sure we've seen this before, but we'll happy to help you look into this problem.

    Would you happen to have any logs from the app? Your repro steps are very useful, but since this appears to be rare (is it?), it could be hard to reproduce without a large sample size.

    Also, have you asked the affected users to show you their receipts received by email so that you can check if the accounts indeed match and that proof of payment processing actually occurred? This would help us rule out if it's the Apple Backend, the Apple API giving us conflicting info, or a bug within IAP.

    Thanks!
     
  3. Developer1999-1

    Developer1999-1

    Joined:
    Oct 27, 2020
    Posts:
    38
    Hi, sorry for the late reply. We did some investigation on our side as well. Here's all the notes we gathered:

    1. The customer indeed has bought the product, and the product matched the account.
    2. However, the customer has the account changed to different countries at times (Japan -> Taiwan -> Japan)
    3. They bought the product when the account is changed to Japan, then sometimes later, they changed it back to Taiwan
    4. Then, they changed it back to Japan again, and update the game
    5. This is when the product is shown as not purchased
    6. We were able to replicate a similar situation using my friend's account by switching between TestFlight beta-version and App Store version
    7. My friend attempts to buy the product when the pop-up shows up (he has already purchased the product with real money on the App Store version)
    8. App Store gives him the product and didn't charge any money
    9. I asked the customer to just attempt to buy the product when the pop-up shows up
    10. Same as my friend, the product is restored and the customer wasn't charged of real money

    We believe this is a App Store bug that happens when they have multiple accounts/account with changing settings. However, it seems if the product is non-consumable, then the customer won't be charged a second time (despite the pop-up)
     
    aVerrecchia likes this.
  4. aVerrecchia

    aVerrecchia

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    34
    Hi @Developer1999-1 thank you for your additional notes !

    -We restore purchased products via the receipt when retrieving products. This seems to suggest the receipt from Apple doesn’t contain it.
    -Restore transaction should restore it, unless Apple isn’t sending it.
    -The behaviour is “reproducible” on Sandbox where your non-consumable was purchased so long ago it gets truncated out of the receipt. Purchasing it again will bring up the window, but when you buy it, Apple recognizes it and gives it without charging again.

    Everything seems to point to this being on Apple’s side, if Apple really does send it to us, it would appear in ProcessPurchase or OnPurchaseFailed.

    However there could be a case on where the bug is coming from us : if the original transaction was logged in the TransactionLog and the receipt from Apple no longer has it which prevents us from restoring it when retrieving products, then when trying to restore transactions, it sends back the same transaction id that was already logged which we ignore.

    You could try setting useTransactionLog to false to see if this helps, but if that doesn’t work, it’s really on Apple’s side.
     
  5. Arnaud_Gorain

    Arnaud_Gorain

    Unity Technologies

    Joined:
    Jun 28, 2022
    Posts:
    182
    This thread is now closed. Feel free to reach out via a new thread if you encounter further issue.
    Thanks!
     
Thread Status:
Not open for further replies.