From ac9dfb9cb08984014dd02af7ea43a91527c49bca Mon Sep 17 00:00:00 2001 From: Rodri Sanchez Date: Tue, 14 Nov 2023 19:54:04 -0300 Subject: [PATCH] transformReceipt() just on Android devices --- .../SubscriptionProvider/SubscriptionProvider.container.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/providers/SubscriptionProvider/SubscriptionProvider.container.js b/src/providers/SubscriptionProvider/SubscriptionProvider.container.js index 14e846b37..d6277a13e 100644 --- a/src/providers/SubscriptionProvider/SubscriptionProvider.container.js +++ b/src/providers/SubscriptionProvider/SubscriptionProvider.container.js @@ -111,7 +111,9 @@ export class SubscriptionProvider extends Component { window.CdvPurchase.store.validator = async function(receipt, callback) { try { - const transaction = transformReceipt(receipt); + const transaction = isAndroid() + ? transformReceipt(receipt) + : receipt.transactions[0]; const res = await API.postTransaction(transaction); if (!res.ok) throw res;