adaptyteam / AdaptySDK-Flutter

SDK for growing mobile in-app purchases
https://docs.adapty.io/docs/quickstart
MIT License
88 stars 15 forks source link

AdaptyError.productPurchaseFailed (code 1006) when user actually cancelled the purchase on iOS #83

Closed SebastianEngel closed 1 year ago

SebastianEngel commented 1 year ago

I was just testing a product purchase with the makePurchase(product) method on an iPhone. The iOS purchase action sheet opened, showing the subscription information and the "Subscribe" button. When I then close the action sheet with the 'X' button, I would expect that this would result in AdaptyError.paymentCancelled (error code 2). Instead I get AdaptyError.productPurchaseFailed (error code 1006). Because of that it's impossible to properly handle "purchase canceled" and "purchase failed" in different ways, right?

Additional info: I tested in Sandbox environment with a Sandbox user if this might make a difference.

x401om commented 1 year ago

Hey, @SebastianEngel! Quite interesting behaviour. Could you please send me the verbose logs from the SDK?

x401om commented 1 year ago

We have found an issue in the iOS SDK. Will be fixed soon.

x401om commented 1 year ago

We have released a new version, it is based on iOS SDK 2.4.5, where this bug was fixed. Feel free to reopen in case of any troubles.

SebastianEngel commented 1 year ago

That's great news. Thank you @x401om 🙏🏻