AlexDisler / cordova-plugin-inapppurchase

A lightweight cordova plugin for in app purchases on iOS/Android
316 stars 192 forks source link

restorePurchases --> How to get the original Transaction ID? #245

Open desmeit opened 6 years ago

desmeit commented 6 years ago

Please include:

Your code / steps to reproduce

//Get Products
        inAppPurchase
          .getProducts(['XXX'])
          .then(function (products) {
            console.log(JSON.stringify(products));

          })
          .catch(function (err) {
            console.log(err);
          });

    inAppPurchase
      .restorePurchases()
      .then(function (products) {
            console.log("restore: " + JSON.stringify(products));

            })
      .catch(function (err) {
             console.log(err);
             });

Type of product you are working with consumable/non-consumable/subscription

non consumable

Version of cordova

IOS: 4.5.5

Version of iOS/Android

IOS 11.4.1

How can I get the ORIGINAL transaction ID with restoring. with every restoring I get a new transaction ID. I want to have the original. Is that possible?

gonzaloserrano commented 6 years ago

I think for Android you have the same signature as the original transaction id, so if you stored the original one in your database you could find it by that.

H0rst commented 5 years ago

Hello @desmeit ,

have you solved the problem?

best regards Horst

rbrand21 commented 4 years ago

Anyone solve this?