cordova-plugin-purchase icon indicating copy to clipboard operation
cordova-plugin-purchase copied to clipboard

[Android] Consumables are marked as owned, cancelled order after some time

Open mashrurbd opened this issue 1 year ago • 2 comments

Observed behavior

When I purchase a consumable item, it is marked as owned and I can't purchase it again unless it automatically cancelled due to "not acknowledged" . Please help me on this. I have tried calling p.finish() inside . approved() listener.

Include logs with store.verbosity = store.DEBUG

Expected behavior

System Info

Output of cordova info.

mashrurbd avatar Jul 03 '23 19:07 mashrurbd

i think you have to add transaction.finish() inside .approved after transaction.verify(). so that next time app open than "isAcknowledged" status changed from false to true.

sksk008 avatar Jul 18 '23 09:07 sksk008

Same problem when trying to buy a consumable product again - [CdvPurchase.GooglePlay] WARNING: Order failed: {"message":"ITEM_ALREADY_OWNED","code":6777003} Did you manage to solve it? Can you provide an example? Here is my:

CdvPurchase.store.when().productUpdated(refreshUI);
CdvPurchase.store.when().approved((transaction) => {
     transaction.verify();
}).verified((transaction) => {
       // Receiving the product 
      // ...
       transaction.finish();
});

Winamp9 avatar Oct 16 '23 01:10 Winamp9