-
Notifications
You must be signed in to change notification settings - Fork 136
Open
Labels
privacy-trackerGroup bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.
Description
Hi team,
We wanted to see if there’s any interest in reviving the functionality described in issue #871. For context, our PayPal SDK exposes onError and onCancel callbacks, which allow merchants to respond differentially to checkout failures caused by uncaught errors during the processing of a transaction, and those caused by the buyer intentionally abandoning the transaction (e.g. by closing the payment window.) Currently, this requires us to distinguish between AbortErrors based on error.message:
#handlePaymentError(
error,
) {
if (
[
"Request cancelled", // used by Chrome <= 76, Opera 63
"User closed the Payment Request UI.", // Chrome 77+, Edge 79+, Opera 64+
].includes(
error.message,
)
) {
this.paymentFlowOptions.onCancel?.();
} else {
this.paymentFlowOptions.onError?.(error);
}
}
This works but we’d prefer to have a solution that isn’t dependent on vendor-specific error messages which might change in the future.
gregjopa
Metadata
Metadata
Assignees
Labels
privacy-trackerGroup bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.Group bringing to attention of Privacy, or tracked by the Privacy Group but not needing response.