2 in app purchases module in one application in iOS

146 views Asked by At

I have 2 in-app-purchase in my iOS application which is developed using phone gap. I am using inappPurchaseManager.js for implementing in-app-purchase.

https://github.com/usmart/InAppPurchaseManager-EXAMPLE

1st in app is non-consumable and second one is non-renewing in-app. in case of restoring the in-app purchase,I used the following code.

window.plugins.inAppPurchaseManager.restoreCompletedTransactions();
window.plugins.inAppPurchaseManager.onRestored = function(originalTransactionIdentifier, productId, originalTransactionReceipt) {
        console.log("originalTransactionIdentifier: " +  originalTransactionIdentifier);
        console.log("productId: " + productId);
        console.log("originalTransactionReceipt : " + originalTransactionReceipt)

    };

but though I have bought 1st and 2nd in-app, This function will only return 1st in-app product name.I don't know that whether I am understanding this code or process wrong.Please give me proper guidelines.I am using apple test account for testing this functionality.

1

There are 1 answers

0
Sulea Cosmin On

This is the correct behavior, quote from apple docs:

If your app uses non-renewing subscriptions, your app is responsible for the restoration process.