-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Hi everyone. First, thank you so much for making this plugin :) Definitely awesome! I'm a self-learned programmer (except for the first two quarters in college), and have been building apps for iOS and now multiplatform using Cordova, html, css, javascript. So my technical side isn't quite as strong as many. I've got a different plugin to work for IAPs for iOS and Google Play. It took awhile, but it works as expected now, and I've trying to implement your plugin now.
I think I've implemented things correctly, because after putting the app as a Test on Amazon Apps, and downloading it with my Android device, I was able to get Test-Charged for my IAPs correctly, and even received confirmation from Amazon that the purchase(s) were made. However, once I get a confirmation, no callback code is being run... so the IAP is charging the user correctly, but the user isn't actually getting the IAP. Maybe I'm putting it in the wrong place, so maybe you could help?
I've tried putting it in two places, look for //HERE:
service = Cocoon.InApp;
service.on("purchase", {
start: function(productId) {
},
error: function(productId, error) {
},
complete: function(purchase) {
// HERE
}
});and secondly:
Cocoon.InApp.purchase("iap1", 1, function(error) {
if(error){
}
else {
// HERE
}
});Neither of these two places seem to actually run any of the code. I've tried updating the UI, adding the IAP, and even doing an alert("Do Something"), and nothing works from those spots. However, the Cocoon.InApp.purchase() method works properly, talking with Amazon properly. Now, maybe I am supposed to use the consume method instead? But I'm confused as to what I am supposed to do. Maybe you could help?