【Android】PurchaseFailureReason.UserCancelled is called on resumption after interrupting an on going purchase in Google Store, but payment is done.
Unity IAP version is 4.0.3.
When user resume their app through the Android Launcher after interrupting an ongoing purchase, IStoreListener.OnPurchaseFailed(PurchaseFailureDescription.reason: PurchaseFailureReason.UserCancelled) is called on resumption.
However, the payment is completed and email that notifies it is sent.
So, the situation that payment is completed but product is not provided to user may be occurred.
How can we distinguish between purchase cancelation by user selection on regular purchase flow and by resumption after interrupting an on going purchase?
Click purchase button in app and start purchase flow.
(Execute IStoreController.InitiatePurchase().)
Purchase confirm dialog of Google Play is opened.
Click buy button.
Payment completion dialog of Google Play is opened.
While payment completion dialog is opening, send app to the background via the device’s Home key.
Resume app by tapping the app’s icon in the Android Launcher.
IStoreListener.OnPurchaseFailed(PurchaseFailureDescription.reason: PurchaseFailureReason.UserCancelled) is sent but the email notifying payment completion is sent from Google Play.