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
Im a react-native developer using expo, I added Glassfy to my project for in app purchases I followed all the steps for the documentation, the skues for the my glassfy account are loading in my react native app. I created a purchase function
// Load all offerings a user can purchase
async function loadOfferings() {
let offerings = await Glassfy.offerings();
console.log(JSON.stringify(offerings.all, null, 2));
setOfferings(offerings);
setLoading(false);
}
// Purchase one SKU and handle a successful transaction
async function purchase(sku: GlassfySku) {
console.log(sku);
try {
const transaction = await Glassfy.purchaseSku(sku);
if (transaction.receiptValidated) {
console.log("successfull purchase");
}
} catch (error) {
console.log(error);
}
}
}
loading offering works just fine and the offerings include sku data that is only avalible fom my google playstore which I asume means there is a connection between my glassfy and my playstore.
when I run the the purchase function this is what happens on my mobile phones screen.
the error code printed in the console looks like this.
LOG [Error: GlassfyError(code=StoreError, description=Store error, debug=Requested product is not available for purchase. (ITEM_UNAVAILABLE))]
the sku being supplied to the funtion is loaded from the glassfy SDK so that means it does exist. The console of the sku being fed to the purchase function looks like this.
I really need help debugging the the error. the app I am developing is still under internal tesing in the playstore development console. Im trying to use sandbox for my testing. Im suspecting this error has something to do with the sandbox testing as my purchase window does not say anything about sandbox. Any assistance would be much appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Im a react-native developer using expo, I added Glassfy to my project for in app purchases I followed all the steps for the documentation, the skues for the my glassfy account are loading in my react native app. I created a purchase function
loading offering works just fine and the offerings include sku data that is only avalible fom my google playstore which I asume means there is a connection between my glassfy and my playstore.
when I run the the purchase function this is what happens on my mobile phones screen.
the error code printed in the console looks like this.
the sku being supplied to the funtion is loaded from the glassfy SDK so that means it does exist. The console of the sku being fed to the purchase function looks like this.
I really need help debugging the the error. the app I am developing is still under internal tesing in the playstore development console. Im trying to use sandbox for my testing. Im suspecting this error has something to do with the sandbox testing as my purchase window does not say anything about sandbox. Any assistance would be much appreciated.
Beta Was this translation helpful? Give feedback.
All reactions