Skip to content

Commit 01bb1df

Browse files
fix: allow redirect on successful payment
1 parent cc83d7c commit 01bb1df

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

.changeset/sunny-hoops-attend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphcommerce/magento-payment-multisafepay': patch
3+
---
4+
5+
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.

packages/magento-payment-multisafepay/components/MSPPaymentHandler/MSPPaymentHandler.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ export function MSPPaymentHandler(props: PaymentHandlerProps) {
1818

1919
const { justLocked, success, cart_id: cartId, locked, method, order_number } = lockStatus
2020

21-
const canProceed =
22-
!justLocked && locked && cartId && method === code && !called && success !== '1'
21+
const canProceed = !justLocked && locked && cartId && method === code && !called
2322

2423
// When the payment has failed we restore the current cart
2524
const shouldRestore = canProceed && success !== '1'

0 commit comments

Comments
 (0)