Skip to content

Commit

Permalink
fix payment failure in blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
reykjalin committed Jun 20, 2024
1 parent d363a55 commit f135c9b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const useExpressCheckout = ( {
};

const abortPayment = ( onConfirmEvent, message ) => {
onConfirmEvent.paymentFailed( 'fail' );
onConfirmEvent.paymentFailed( { reason: 'fail' } );
setExpressPaymentError( message );
};

Expand Down
2 changes: 1 addition & 1 deletion client/express-checkout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ jQuery( ( $ ) => {
* @param {string} message Error message to display.
*/
abortPayment: ( payment, message ) => {
payment.paymentFailed();
payment.paymentFailed( { reason: 'fail' } );
wcpayECE.unblock();

$( '.woocommerce-error' ).remove();
Expand Down

0 comments on commit f135c9b

Please sign in to comment.