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
So whenever I cam calling the "getProducts"-Method , i receive the error:
' [Error: skus is required for Android purchase]'
const {
connected,
products,
currentPurchase,
getProducts,
requestPurchase,
finishTransaction,
} = useIAP();
// so first I am calling within a useContext - this part works fine (i am receiving data etc. for that item)
await getProducts({skus: items});
// and afterwards, when i chose to buy
await requestPurchase({sku: product.productId}); // whenever i call this, i receive the error
Expected Behavior
No error. Show the google-pay window.
Environment:
react-native-iap: newest version
react-native: newest version
Platforms (Android Emulator + Xiaomi Poco Pro 2 Device):
The text was updated successfully, but these errors were encountered:
Problem solved:
I had to pass the parameter skus instead of sku. And it has to be an array!
example:
await requestPurchase({skus: [product.productId]});
Description
So whenever I cam calling the "getProducts"-Method , i receive the error:
' [Error: skus is required for Android purchase]'
Expected Behavior
No error. Show the google-pay window.
Environment:
The text was updated successfully, but these errors were encountered: