Skip to content

Commit

Permalink
transformReceipt() just on Android devices
Browse files Browse the repository at this point in the history
  • Loading branch information
RodriSanchez1 committed Nov 14, 2023
1 parent 5309fb4 commit ac9dfb9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ac9dfb9

Please sign in to comment.