Skip to content

Improve Adyen drop-in error handling #2

Closed
@rvdsteege

Description

When a payment via the Adyen drop-in fails, we're currently blocking the entire drop-in component for 5 seconds:

dropin.setStatus( 'error', { message: error.message } );

setTimeout( () => {dropin.setStatus( 'ready' );}, 5000 );

Source: https://github.com/wp-pay-gateways/adyen/blob/b767d59242fd8c66bc9ba7eee34cd32c677771ad/js/src/checkout-drop-in.js#L36-L38

Instead, it would be better to add the error message elsewhere on the page — outside of the drop-in component — and leave the drop-in status unaffected (or reset by setting the status to ready).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions