iaphub / react-native-iaphub

The easiest way to implement IAP (In-app purchase) in your React Native app.
https://www.iaphub.com/
MIT License
317 stars 21 forks source link

iOS Sandbox Account Subscription issue #137

Closed swizes closed 1 year ago

swizes commented 1 year ago

Hi

In following pattern I come accross this weird issue.

Tested with a sandbox user, which is created via app store connect

Start subscription for the first time - Works Cancel subscription - Works After subscription is cancelled and expired, try to subscribe again. Below err is logged

Receipt err: {"code": "transaction_not_found", "message": "Transaction not found, the product sku wasn't in the receipt, the purchase failed", "params": {"sku": "REDACTED_SKU"}, "subcode": null}

Receipt data: {"context": "purchase", "sku": "REDACTED_SKU", "token": "REDACTED_TOKEN"}

If I clear purchase history via AppStoreConnect, it works again.

iaphub commented 1 year ago

Hi @swizes,

The transaction_not_found error means the transaction has been rejected. Did you try waiting a little before making a new purchase? iTunes might reject the transaction if you purchase the same subscription right after it expires.

swizes commented 1 year ago

Just FYI, invoking clearTransactionIOS from react-native-iap helped me to overcome this issue. The issue is resolved for me

iaphub commented 1 year ago

Hi @swizes,

Could you contact the support (support@iaphub.com or chat button directly from the IAPHUB dashboard) and provide your app ID? We'll take a look at your account.

I believe you're probably having some configuration issue, you shouldn't have to use the react-native-iap plugin (it isn't a dependency anymore since the v7).

Thanks

subalee commented 10 months ago

I know it's an old issue but the solution @swizes proposes worked for me as well.

@iaphub the reason we're using it is for legacy purposes where we do listing from the stores using react-native-iap however we would like to eventually migrate to using only iaphub