From 01bb1df9314ac4b848df7dd58f15b7db88bc5a45 Mon Sep 17 00:00:00 2001 From: Giovanni-Schroevers Date: Wed, 21 Jan 2026 12:54:11 +0100 Subject: [PATCH] fix: allow redirect on successful payment --- .changeset/sunny-hoops-attend.md | 5 +++++ .../components/MSPPaymentHandler/MSPPaymentHandler.tsx | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/sunny-hoops-attend.md diff --git a/.changeset/sunny-hoops-attend.md b/.changeset/sunny-hoops-attend.md new file mode 100644 index 00000000000..b23bbd0161d --- /dev/null +++ b/.changeset/sunny-hoops-attend.md @@ -0,0 +1,5 @@ +--- +'@graphcommerce/magento-payment-multisafepay': patch +--- + +Fixed a bug in MSPPaymentHandler where successful MultiSafepay payments were prevented from redirecting to the success page due to an incorrect condition in the payment handler. diff --git a/packages/magento-payment-multisafepay/components/MSPPaymentHandler/MSPPaymentHandler.tsx b/packages/magento-payment-multisafepay/components/MSPPaymentHandler/MSPPaymentHandler.tsx index ba48fbc3df7..08bf8e091aa 100644 --- a/packages/magento-payment-multisafepay/components/MSPPaymentHandler/MSPPaymentHandler.tsx +++ b/packages/magento-payment-multisafepay/components/MSPPaymentHandler/MSPPaymentHandler.tsx @@ -18,8 +18,7 @@ export function MSPPaymentHandler(props: PaymentHandlerProps) { const { justLocked, success, cart_id: cartId, locked, method, order_number } = lockStatus - const canProceed = - !justLocked && locked && cartId && method === code && !called && success !== '1' + const canProceed = !justLocked && locked && cartId && method === code && !called // When the payment has failed we restore the current cart const shouldRestore = canProceed && success !== '1'