Issue: Apple return Success but Unity IAP return UserCancelled

Hi,

I’m having a problem when User makes a purchase request, Apple return Success but Unity IAP returns UserCancelled.
Here is the clip from a customer to provide this issue:

I’m using Unity 2017.4.9f1 Pro version.

Does anybody have the same issue?
Thank!

Please describe the steps you are taking, it looks like you are activating facial recognition? Does it work correctly when you don’t do that? Just to better understand the issue. UI interaction during the purchase flow can indeed trigger the UserCancelled behavior, but we don’t have control over the event handling as we are just a pass through service for the Apple API’s. Make sure you are using the latest IAP version which is 1.20.1.

@JeffDUnity3D Thank for your reply.

Here is the step in the game:

  1. Click buy product in the game
  2. Apple return Success: You All Set popup
  3. Unity IAP return failureReason UserCancelled in OnPurchaseFailed Function
  4. We show an error popup in game.

It looks like you are activating facial recognition? Does it work correctly when you don’t do that?
Our customer tried with entering the password but still get this issue.

Make sure you are using the latest IAP version which is 1.20.1.
Yes, we are using IAP version 1.20.1

Noted:

  • This user has been purchased this product in the past, after that, he requests a refund from Apple. This is a consumable product.
  • When we check his purchase data with Receipt and API https://buy.itunes.apple.com/verifyReceipt, we always see a data contain refund product.
    4317892--388975--upload_2019-3-14_10-15-23.png
  • Sometimes he can buy this product, some time he got the issue.
  • I’m not sure if Unity IAP has any problem when verifying with Apple by this data.

Does this happen for all users, for all purchases? Is this on TestFlight or in Production?

@JeffDUnity3D

Does this happen for all users, for all purchases?

  • It’s doesn’t happen for all users, but I’m not sure how many users getting this issue. Our server engineer is working on it.
  • For this user, it’s only happen with this product_id : com.scopely.whiplash.iap_v20_9999

Is this on TestFlight or in Production?
It happens in Production.

This product has been released for a long time. We tested this product_id a lot of time in TestFlight and this issue does not happen to all user.
We tried to reproduce this issue but it’s not happening.
As I checked the log and our analytic, when this issue happens, Unity IAP Lib return UserCancelled in OnPurchaseFailed, after that, we show an error message.
It’s weird but this issue happens randomly, sometimes he can purchase this product.

Unfortunately without consistent steps to reproduce, there is no action that we can recommend at this time. We will continue to monitor this issue and see if any others might have steps to reproduce.

@JeffDUnity3D Thank for your fast reply.

Please let me know if you need any information.

Thanks!

Hi, I have exactly the same problem. Two customers reported the same issue as you described in last ten days. There was no problems earlier with same product (purchase). Have you made any progress?

Who was your question directed to? We are waiting for steps to reproduce and/or device logs when the issue occurs.

We provided the clip from Customer, our QA still cannot reproduce it.

Can you test with fingerprint or facial recognition? Or check with the customer perhaps? Just a hunch…

Our QA team tested with both fingerprint or facial recognition but everything was fine.
The temporary solutions are created the new one productID so the customer can buy it.

Any other steps to reproduce, if possible, would be helpful. So they get an error only on this one product? But other purchases work ok? Are you displaying the error to the user? Did they try to purchase initially?

Step in the clip customer sent are:

  1. Click buy product in the game
  2. Apple return Success: You All Set popup
  3. Unity IAP return failureReason UserCancelled in OnPurchaseFailed Function
  4. We show an error popup in game.

So they get an error only on this one product?
Yes, the other product works fine.
Notices that the error product is consumable and this user requested Apple to refund before.

But other purchases work ok?
Yes

Are you displaying the error to the user?
Yes, after IAP SDK returns UserCancelled in OnPurchaseFailed Function

So if the user requested a refund previously, I suspect Apple won’t let the user buy it again. If this is the only product that is seeing the issue, and the user was able to purchase originally, this could well be the case. Do you expect a user to be able to purchase again, if they requested a refund previously? I would not, sounds like the user is trying to get free products.

I agree with you, but the problem is the User still can purchase success with Apple store and Unity IAP return failed (UserCancelled).
They lost money but get nothing!

So you are not able to reproduce yourself in your testing, after doing a refund? You are able to properly purchase the product a second time, after the first was refunded?