From 70c1598ef8c939c5728c85634cc051fd673200ce Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 22 Feb 2024 10:37:36 -0500 Subject: [PATCH] SSR-1063 payment response and cancel url updates --- src/layouts/payment-page/payment-page.vue | 18 ++++++++++++++---- src/router/router-constants/issPage-values.js | 1 + 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 8aa03d52..7c2137fa 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -164,13 +164,13 @@ import siteHeader from '@/iss-components/site-header/site-header.vue'; import siteFooter from '@/iss-components/site-footer/site-footer.vue'; // Supporting files -import applicationConfig from '@/constants/application-config.js'; +import issPageValues from '@/router/router-constants/issPage-values.js'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; import settleAllPromises from '@/helpers/layout-helper'; import { Form } from 'vee-validate'; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; -import iframeResize from 'iframe-resizer'; +import iframeResize from 'iframe-resizer/js/iframeResizer.js'; import externalUrls from '@/router/router-constants/externalUrl-values.js'; import widgetFields from '@/constants/cms-widget-fields.js'; import { hopPaymentMethods, paymentMethods } from '@/constants/payment-method-constants.js'; @@ -234,8 +234,6 @@ export default { data() { return { checkoutUrl: externalUrls.SAFELITE_HOP, - payInAdvanceResponseUrl: applicationConfig.PAY_IN_ADVANCE_RESPONSE_URL, - payInAdvanceCancelUrl: applicationConfig.PAY_IN_ADVANCE_CANCEL_URL, paymentType: this.getPaymentType(), authToken: '', authSignature: '', @@ -261,6 +259,18 @@ export default { }; }, computed: { + payInAdvanceResponseUrl() { + const { protocol, host } = window.location; + return `${protocol}//${host}/?issPage=${ + issPageValues.PAYMENT_RETURN + }&src=iss-nextgen`; + }, + payInAdvanceCancelUrl() { + const { protocol, host } = window.location; + return `${protocol}//${host}/?issPage=${ + issPageValues.PAYMENT_METHOD + }&src=iss-nextgen`; + }, dynamicCSSUrl() { const { protocol, hostname, port } = window.location; return `${protocol}//${hostname}:${port}/css/site-2020Styling.css`; diff --git a/src/router/router-constants/issPage-values.js b/src/router/router-constants/issPage-values.js index 419d44f3..b44a9a9d 100644 --- a/src/router/router-constants/issPage-values.js +++ b/src/router/router-constants/issPage-values.js @@ -18,6 +18,7 @@ const issPageValues = Object.freeze({ ORDER_CONFIRMATION: 'order-confirmation', PAYMENT_METHOD: 'payment-method', PAYMENT_PAGE: 'payment-page', + PAYMENT_RETURN: 'payment-return', PART_QUESTIONS: 'part-questions', POLICY_HOLDER_DETAILS: 'policy-holder-details', PROVIDER_PREFERENCE: 'provider-preference',