Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error : Invalid Product ID. #269

Closed
selcukitmis opened this issue Sep 20, 2018 · 6 comments
Closed

Error : Invalid Product ID. #269

selcukitmis opened this issue Sep 20, 2018 · 6 comments
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS

Comments

@selcukitmis
Copy link

Version of react-native-iap

Version : 2.1.1

Platforms you faced the error (IOS or Android or both?)

iOS

Expected behavior

Invalid Product ID.

Actual behavior

Error : Invalid Product ID.

Tested environment (Emulator? Real Device?)

Emulator and Real Device

Steps to reproduce the behavior

When I call buyProduct function it is return to me Invalid Product ID.

My In-App Purchase Reference is Ready to Submit but I don't understand why it is not working?

I read all solution suggestions and I tried all of them but still my app not working.
Also I tried another react-native-iap versions (latest, 2.1.0) nothing has changed.

What can I do?

@hyochan
Copy link
Member

hyochan commented Sep 20, 2018

Please review #256 issue and check what you've missed first.

@hyochan hyochan added 🙏 help wanted Extra attention is needed 📱 iOS Related to iOS labels Sep 20, 2018
@selcukitmis
Copy link
Author

selcukitmis commented Sep 21, 2018

@dooboolab thank you for answer. My problem fixed like this.

RNIap.getProducts(['yourProductId']).then(success => { let product = success[0]; RNIap.buyProduct(product.productId).then(ok => { }).catch(error => { alert(error); }) }).catch(error => { alert(error); })

@Liqiankun
Copy link

@selcukitmis It works.

@noahhayes
Copy link

@selcukitmis is there a reason that you use the productId from the product object rather than 'yourProductId'?

@selcukitmis
Copy link
Author

@noahhayes of course. when I use RNIap.getProducts I don't know my product details yet.
RNIap.getProducts is promise. I taking first product in "THEN" section.

May be you need second product about that you have to check code on your project

@SebinLee
Copy link

SebinLee commented Mar 7, 2021

@selcukitmis It exactly works for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🙏 help wanted Extra attention is needed 📱 iOS Related to iOS
Projects
None yet
Development

No branches or pull requests

5 participants