Hi,
I’m using SDKBOX IAP with Cocos2d-JS v3.8.1 on Android with this version
_______ ______ _ _ ______ _____ _ _
|______ | \ |____/ |] | | _/
| |/ | _ |] |____| _/ _
Copyright © 2015 Chukong Technologies Inc. v0.5.8.15
installed packages:
v1.5.3.3 googleplayservices
v1.5.3.3 iap
I followed this tutorial and added code below in a scene.
http://docs.sdkbox.com/en/plugins/iap/v3-js/#make-a-purchase
sdkbox.IAP.init();
sdkbox.IAP.setListener({
onSuccess : function (product) {
//Purchase success
},
onFailure : function (product, msg) {
//Purchase failed
//msg is the error message
},
onCanceled : function (product) {
//Purchase was canceled by user
},
onRestored : function (product) {
//Purchase restored
},
onProductRequestSuccess : function (products) {
//Returns you the data for all the iap products
//You can get each item using following method
for (var i = 0; i < products.length; i++) {
// loop
}
},
onProductRequestFailure : function (msg) {
//When product refresh request fails.
}
});
I make purchase with this
sdkbox.IAP.purchase(name);
The IAP can retrieve info from Google Play before purchase successful and working properly when i tested yesterday.
However, after the purchase complete, if i make the purchase again, the process will straight failed and called
onFailure
If i call sdkbox.IAP.restore(); to restore purchase, it will straight call onRestored
The big problem is when i try on other device with different Google account, it happen the same.
I can’t make the purchase and didn’t complete purchase before but i can restore the purchase successfully.
@nite @slackmoehrle
Do you have any idea on this issue?
Please help me to solve this problem.
Thank you.