We are developing an App with Ionic and cordova-plugin-inapppurchase. We've been struggling more than a week as we get the following error when we try to restore a purchase:
RMStore: unknown product id com.company.appname.myID
{"errorMessage":"Unknown product identifier","errorCode":100}
productId = 'com.company.appname.myID';
This post is old, but I was able to fix this problem for myself tonight. Using Ionic v1 with the cordova-plugin-inapppurchase, my solution was to change com.company.appname.myID
to just myID
(the product id of the in app purchase).
I also had a few other problems causing the same exact error message. The main one was needing to inAppPurchase.getProducts(productIds)
before attempting inAppPurchase.buy(productId)
. Also, make sure you're testing on a real device, with a test account created on iTunes connect, and logged out of any other apple ids on your device (I signed out through the iTunes Store app).
Good luck future readers!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With