Skip to content

Commit

Permalink
chore: redirect to error in case cancellation (#135)
Browse files Browse the repository at this point in the history
  • Loading branch information
amihajlovski authored Apr 23, 2024
1 parent 968a1b6 commit 8983b20
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ const AdyenCheckoutComponent = (props) => {
getTranslations,
locale,
adyenPaymentInProgress,
setAdyenPaymentInProgress
setAdyenPaymentInProgress,
navigate
} = useAdyenCheckout()
const paymentContainer = useRef(null)

Expand Down Expand Up @@ -100,7 +101,8 @@ const AdyenCheckoutComponent = (props) => {
if (state.isValid) {
setAdyenStateData(state.data)
}
}
},
onError: () => navigate('/checkout/error')
})

handleQueryParams(urlParams, checkout, setAdyenPaymentInProgress, paymentContainer)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ const AdyenCheckoutProvider = ({
adyenStateData,
adyenPaymentInProgress,
locale,
navigate,
setAdyenPaymentInProgress: (data) => setAdyenPaymentInProgress(data),
setAdyenStateData: (data) => setAdyenStateData(data),
getPaymentMethodsConfiguration,
Expand Down

0 comments on commit 8983b20

Please sign in to comment.