问题
I'm using the Phonegap/Cordova plugin for In App Purchases: InAppPurchaseManager with Cordova 1.7 and I am getting through to the store it seems but it is not finding the product. I've set up the app with the correct provisioning profile and I've added products to that app in iTunes Connect correctly to the best of my knowledge. I've searched high and low for the error message I am getting back but there just isn't much info about it on the interwebs. The most plausible solution that I've narrowed it down to is to wait for the products to propagate to all of the servers (this seems a little silly though).
Has anyone had this problem before, and what was your solution?
Here's the error I'm getting in the console
- got iap product response
- test app 2.0[21619:707] sending fail (window.plugins.inAppPurchaseManager.callbackMap.f0.fail) js for com.lus.testapp.product.1
- test app 2.0[21619:707] done iap
回答1:
It was only a matter of time, ran it again the following day and it worked without a problem. All errors went away and I received the correct data.
It's rather silly but it takes that much time to propagate the data through all the servers.
If you are doing In App Purchases set them as early as possible when you create your App so that when you are ready to integrate the products in your App the data will be available to you.
来源:https://stackoverflow.com/questions/12098207/phonegap-cordova-inapppurchasemanager-invalid-product-ids