Closed ahbruinsma closed 10 years ago
Turns out, I did not define the window.storekit. Because I don't use the auto-plugin construnction (just does not work on my projects, don't know why...). I'm doing a require in my js like: cordova.require("cordova/plugin/InAppPurchase");
Needed to do: window.storekit = cordova.require("cordova/plugin/InAppPurchase"); Instead of what I was doing: InAppBilling = cordova.require("cordova/plugin/InAppPurchase");
Apperantly, the .m file required the window.storekit to be there so it can call the callbaks defined in the init.
I've got a problem with the callback function when doing a purchase, In the console of Xcode, it gives me an ok on the purchase, the product gets purchased and I get an succes.
When I look at the InAppPurchase.prototype.purchase function, it never gets into the purchaseOk or purchaseFailed function, which should be called by the exec purchase command.
Any ideas where this can go wrong?