Open sergip76 opened 2 months ago
Its not really in the documentation but your could use this
store.order(...)
.then(error => {
if (error) {
if (error.code === CdvPurchase.ErrorCode.PAYMENT_CANCELLED) {
// Purchase flow has been cancelled by user
}
else {
// Other type of error, check error.code and error.message
}
}
});
Its not really in the documentation but your could use this
store.order(...) .then(error => { if (error) { if (error.code === CdvPurchase.ErrorCode.PAYMENT_CANCELLED) { // Purchase flow has been cancelled by user } else { // Other type of error, check error.code and error.message } } });
I was referring to the moment when the user simply closes the payment window, not when the payment is cancelled. If the user closes the payment window no error is thrown.
Is it possible to know when a purchase has been cancelled? I mean that the user clicks on buy and once the purchase screen appears go back to cancel the process before making the purchase.
It would be something like this:
CdvPurchase.store.when().cancelled(() => { });