SDKBOX 2.3.11 Release - New push notification

Any progress on this? I saw that @yinjimmy has tested it on iOS with a consumable product, but I don’t know it if will work with a non-consumable product (since this is the case for which neither of the functions work on Android). Also some time frame for the fix would be welcome as more than 2 weeks have passed and this is a blocking issue for me.

It’s been another 2 weeks (1 month from your initial response) wondering if something is done about this as I see that no new SDKBOX versions are coming out either.

Sorry to let this issue slip, we fixed it now and it’s under testing should be coming with 2.3.15 release

Thank you. Looking forward to it!

I update js version.
Could you please help to test this issue ?

Sorry for the delay,

I replaced the IAP plugin with the updated files from the sample, but non-consumable products still have empty receipt and receiptCipheredPayload fields on Android for all 3 functions (onProductRequestSuccess, onRestored and onSuccess).

Sorry about that, I forgot to copy the google play services jar and google play plugin jar file. After that the onSuccess function worked. But the other 2 functions - onProductRequestSuccess and onRestored still return empty fields.

Could you fix them as well?

Any updates ?

Is there anyway we can look at your code and see what’s going on?

I just have log statements in the functions and look at what the listener argument is:

var sdkboxListenersIAP = {};

sdkboxListenersIAP.onSuccess = function (product) {
    cc.log('sdkbox IAP onSuccess', JSON.stringify(product));

sdkboxListenersIAP.onRestored = function (product) {
    cc.log('sdkbox IAP onRestored', JSON.stringify(product));

sdkboxListenersIAP.onProductRequestSuccess = function (products) {
    cc.log('sdkbox IAP onProductRequestSuccess', JSON.stringify(products));

sdkbox.IAP.setListener( sdkboxListenersIAP );



Before when I purchased a consumable, I got the receipt and receiptCipheredPayload fields in the onSuccess callback, but they were empty when I purchased a non-consumable. After the update from yinjimmy non-consumable items have data in these fields, but since non-consumables are always present, I would like the onProductRequestSuccess and onRestored to have these fields as well (both on Android and ciphered on iOS) since the user can already have the product, but since I can’t get a receipt (because he already has it and can’t purchase it again to trigger the onSuccess callback) I can’t validate it.

1 Like

Oh I understand now, will update you about the progress.

Thank you!

Tested with SDKBOX 2.3.15 but it seems that the 2 callbacks still aren’t fixed there.

Any updates ? It’s been 4 weeks

Any updates?

So we did some research seems like there is no API to get the receipt for already purchased item.

On Android you already have this data in the onProductRequestSuccess listener:

03-18 19:39:34.851 16636-16660/? D/IAP: GooglePlay Request result : 0 msg : Product request successful. data :[
"title":"HD Graphics (game template 2)",
"desc":"Graphics that scale for larger displays",

"title":"50 Coins (game template 2)",
"desc":"50 coins to use for in-game items",

This is from the adb log when using SDKBOX and the item com.whitenovastudio.gametemplate.hd_graphics is already purchased and non-consumable which is why the Android API returns the receipt and cipheredReceiptInfo, so you already have them, but for some reason in the JS wrapper they are empty even though the debug log says that there is data in them. I guess you use the same data for restore purchases, since there is no restore purchase logic on Android because you have the receipts when querying for the products. You just have to use the data from the fields if they exist and not leave them empty.

On iOS there is also logic for that, the transaction gets renewed and you have a ciphered receipt again which you can expose.

I can make an android function to get the product infos and call it from javascript every time I get a restored purchase, to get the receipt info myself, but since SDKBOX already has the data it seems pointless for me to write platform specific code if the sole purpose of this library is to wrap such code and reduce the maintenance of back-end SDKs.

Sorry about that we’ll add that next release.

Any updates on when this might come?

It seems that you don’t have many developers because updates are slow. Since I started using SDKBOX last December I still can’t publish a finished game because of problems like this.

can you try to restore with the latest version, you should get receipt info.