2.4.7
0.57.8
iOS
its my first IAP test and i need help.
When I purchase the product i still purchased (Sandbox) I get "You allready buyed this product. The product will be restored." But i get no callback or return. How can i handle this restoring process so i can save the purchased state and the User can use the Product?
Or does'nt it work this way?
My Code
const purchase = await RNIap.buyProduct(identifier);
this.setState({
receipt: purchase.transactionReceipt
});
this._saveProductIsBuyed()
Real device (iPad)
Thanks for help
@Finneah You are not understanding the iap feature
correctly. Restore purchase
is to get products you've already purchased in other device when you reinstalled the app. To re-buy
the item you should create product as consumable
.
Hello @hyochan
thank you for answering so fast.
I don't think i missunderstood it. I think i did'nt explain it exactly:
Use-Case:
user can buy a product (one-time purchase for example 'Premium')
Now, i have seen it on other Apps:
Product is not showed as buyed (because i don't want to ask for already buyed products at App-Start, as i said, i have seen it on other Apps)
For this i need a return that the Product is restored but i do not get anything and the next console.log
is not showed.
const purchase = await RNIap.buyProduct(productIdentifier);
console.log('TEST', purchase); <= will not be shown
Most helpful comment
Hello @hyochan
thank you for answering so fast.
I don't think i missunderstood it. I think i did'nt explain it exactly:
Use-Case:
user can buy a product (one-time purchase for example 'Premium')
Now, i have seen it on other Apps:
Product is not showed as buyed (because i don't want to ask for already buyed products at App-Start, as i said, i have seen it on other Apps)
But nothing happens.
For this i need a return that the Product is restored but i do not get anything and the next
console.log
is not showed.