Created
January 22, 2024 15:50
-
-
Save yyalim/b28afe92d4b952e58f2fa175eafeeb94 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
await sendRequest("POST", "payment/validate_receipt/", { | |
data: { | |
platform: Capacitor.getPlatform(), | |
receipt: isPlatform(["ios"]) ? receipt : JSON.stringify(receipt), | |
}, | |
}); | |
if (localReceiptId) { | |
await this.removeFromLocalReceipts(localReceiptId); | |
} else { | |
this.$router.push({ | |
name: "appointments", | |
query: { show_add: true }, | |
}); | |
} | |
} catch (error) { | |
// Handle any errors here | |
console.error(error); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment