From 3bfe0b2b4391531e87ece25b74f25fe24b8ba070 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Tue, 13 Jan 2026 10:08:59 -0500 Subject: [PATCH] Align error on final order submission --- src/layouts/payment-adyen/payment-adyen.vue | 13 ++++--------- src/router/constants/routing-table.js | 7 +++++++ src/router/methods/route-logic/adyen-return.js | 5 ++++- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/layouts/payment-adyen/payment-adyen.vue b/src/layouts/payment-adyen/payment-adyen.vue index d71c13a38..d47187760 100644 --- a/src/layouts/payment-adyen/payment-adyen.vue +++ b/src/layouts/payment-adyen/payment-adyen.vue @@ -444,15 +444,10 @@ export default { } catch (error) { console.log(`error: response from submit work order: ${error.message}`); - // navigate to error page - const errorPayload = { - cause: `Error while submitting work order after Adyen payment.`, - currentPage: this.pageName, - sessionId: this.sessionId, - idempotencyKey: this.idempotencyKey, - }; - - this.$router.handleSoftError(errorPayload); + this.$router.navigateWithoutSaving( + this.navigationScenarios.PIA_ERROR, + this.pageName + ); return; } diff --git a/src/router/constants/routing-table.js b/src/router/constants/routing-table.js index 192e1572e..48cd49b3f 100644 --- a/src/router/constants/routing-table.js +++ b/src/router/constants/routing-table.js @@ -578,6 +578,13 @@ const routingTable = function () { scenario: navigationScenarios.CLICKED_FORWARD, destinationPageData: routeData.CONFIRMATION, }, + { + scenario: navigationScenarios.PIA_ERROR, + destinationPageData: routeData.PAYMENT_METHOD, + params: { + piaError: "true", + }, + }, ], }, { diff --git a/src/router/methods/route-logic/adyen-return.js b/src/router/methods/route-logic/adyen-return.js index e7a901c2e..3db4fda99 100644 --- a/src/router/methods/route-logic/adyen-return.js +++ b/src/router/methods/route-logic/adyen-return.js @@ -82,7 +82,10 @@ export async function adyenReturnBeforeEnter(to, from) { } catch (error) { console.log(error); return { - name: routeData.ERROR.name, + name: routeData.PAYMENT_METHOD.name, + query: { + piaError: "true", + }, replace: true, }; }