You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I was contact by someone to upgrade his application to meet the Google requirement (using Google Play Billing >= 6.0.1 and API 34).
The app was on Expo@49 using the module expo-in-app-purchases which is abandonned, so I upgraded it to Expo@51 and want to use this repo (I tried with "react-native-iap" but always faced the error E_IAP_NOT_AVAILABLE on start-up).
Integrate this repo was pretty simple based on the sample here, but I faced a big issue.
The process almost works, the popup to pay appears, the dev card works and the test command is visible in Google Play Order, but after 3 minutes, the order is cancelled and refunded. The problem is that the order is not acknoledge by the app, so Google cancel it.
In the console log, I have the following error [Error: Received 2 arguments, but 1 was expected], which is trigger by calling finishTransaction().
After digging your code, the error is generated by return ExpoIapModule.consumeProduct(purchase.purchaseToken, developerPayloadAndroid); (here)
I never dev in kotlin but it seems this fonction consumeProduct only have one parameter, so I removed the last one (developerPayloadAndroid), and now the error disappeared and seems to aknoledge the payment (it wasn't cancelled after 3 minutes)
Expected Behavior
The payment is acknowledged and Google doesn't cancel it.
Environment:
expo-iap: 2.1.0
react-native: 0.74.5
expo : 51.0.39
Platform : Android 14 on real device
The app is very simple (only 1 item to buy) so I don't know if the fix I proposed is safe.
Additional Context
Here is the full code of my function, based on your example
Description
Hello, I was contact by someone to upgrade his application to meet the Google requirement (using Google Play Billing >= 6.0.1 and API 34).
The app was on Expo@49 using the module
expo-in-app-purchases
which is abandonned, so I upgraded it to Expo@51 and want to use this repo (I tried with "react-native-iap" but always faced the error E_IAP_NOT_AVAILABLE on start-up).Integrate this repo was pretty simple based on the sample here, but I faced a big issue.
The process almost works, the popup to pay appears, the dev card works and the test command is visible in Google Play Order, but after 3 minutes, the order is cancelled and refunded. The problem is that the order is not acknoledge by the app, so Google cancel it.
In the console log, I have the following error
[Error: Received 2 arguments, but 1 was expected]
, which is trigger by calling finishTransaction().After digging your code, the error is generated by
return ExpoIapModule.consumeProduct(purchase.purchaseToken, developerPayloadAndroid);
(here)I never dev in kotlin but it seems this fonction consumeProduct only have one parameter, so I removed the last one (developerPayloadAndroid), and now the error disappeared and seems to aknoledge the payment (it wasn't cancelled after 3 minutes)
Expected Behavior
The payment is acknowledged and Google doesn't cancel it.
Environment:
The app is very simple (only 1 item to buy) so I don't know if the fix I proposed is safe.
Additional Context
Here is the full code of my function, based on your example
The text was updated successfully, but these errors were encountered: