From 1580a7761a6b2d20b20fc44f3ae5879105a13dfb Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 15 Feb 2024 09:51:46 -0500 Subject: [PATCH 01/15] SSR-1063 initial routing changes --- src/router/router-constants/navigation-scenarios.js | 3 +++ src/router/router-constants/routing-table.js | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/router/router-constants/navigation-scenarios.js b/src/router/router-constants/navigation-scenarios.js index f71a452a..1406498e 100644 --- a/src/router/router-constants/navigation-scenarios.js +++ b/src/router/router-constants/navigation-scenarios.js @@ -89,6 +89,9 @@ const navigationScenarios = Object.freeze({ CLICKED_SERVICE_PACKAGE_EDIT: 'CLICKED_SERVICE_PACKAGE_EDIT', CLICKED_VEHICLE_EDIT: 'CLICKED_VEHICLE_EDIT', + // Payment + CLICKED_PAY_NOW: 'CLICKED_PAY_NOW', + // Bailout CLICKED_FORWARD_WITH_BAILOUT: 'CLICKED_FORWARD_WITH_BAILOUT' }); diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 0badb2e7..30b3cf84 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -609,6 +609,10 @@ const routingTable = () => [ { scenario: navigationScenarios.CLICKED_FORWARD, destinationIssPageValue: issPageValues.ORDER_CONFIRMATION + }, + { + scenario: navigationScenarios.CLICKED_PAY_NOW, + destinationIssPageValue: issPageValues.PAYMENT_PAGE } ] }, @@ -616,7 +620,7 @@ const routingTable = () => [ issPageValue: issPageValues.PAYMENT_PAGE, maps: [ { - scenario: navigationScenarios.CLICKED_BACK, + scenario: navigationScenarios.PAYMENT_METHOD, destinationIssPageValue: issPageValues.REVIEW_PAGE }, { From 3c90f560be781e290e64036ff580d67959870842 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 15 Feb 2024 10:05:25 -0500 Subject: [PATCH 02/15] SSR-1063 forward button nav logic --- src/layouts/payment-method/payment-method.vue | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 10ebc609..808c27a7 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -207,6 +207,18 @@ export default { }, async forwardButtonAction() { await useMainStore().savePaymentMethodChoice(this.paymentMethod); + + if (this.paymentMethod === paymentMethods.PAY_AT_TIME_OF_SERVICE) { + this.$router.navigate( + this.navigationScenarios.CLICKED_FORWARD, + this.$route + ); + } else { + this.$router.navigate( + this.navigationScenarios.CLICKED_PAY_NOW, + this.$route + ); + } } } }; From 421de749f4e1d18424a16cf5468f45353c8c8dfb Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 15 Feb 2024 12:39:10 -0500 Subject: [PATCH 03/15] SSR-1063 needed to add baseFormMixin to payment-method page --- src/layouts/payment-method/payment-method.vue | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 808c27a7..71c1579c 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -41,6 +41,7 @@ diff --git a/src/router/router-constants/externalUrl-values.js b/src/router/router-constants/externalUrl-values.js new file mode 100644 index 00000000..4a44e9c0 --- /dev/null +++ b/src/router/router-constants/externalUrl-values.js @@ -0,0 +1,5 @@ +const externalUrls = { + SAFELITE_HOP: process.env.VUE_APP_SAFELITE_HOP +}; + +export default externalUrls; diff --git a/src/store/index.js b/src/store/index.js index c8623193..1b963902 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2144,6 +2144,13 @@ export const useMainStore = defineStore({ const isPayInAdvance = paymentMethod !== paymentMethods.PAY_AT_TIME_OF_SERVICE; this.order.payment.isPayInAdvance = isPayInAdvance; this.order.payment.payInAdvanceType = isPayInAdvance ? paymentMethod : null; + }, + + getPaymentSignature() { + return globalMethods.callHttpClient({ + method: endpoints.GetPaymentSignature.method, + endpoint: endpoints.GetPaymentSignature.url + }); } }, diff --git a/vue.config.js b/vue.config.js index dcc30a25..24f2d771 100644 --- a/vue.config.js +++ b/vue.config.js @@ -2,6 +2,7 @@ process.env.VUE_APP_CONSUMER_CF_DISTRO = 'https://digitalapi.dev.safelite.io'; process.env.VUE_APP_CURRENT_ENVIRONMENT = 'Localhost'; process.env.VUE_APP_GOOGLE_PLACES_API_KEY = 'AIzaSyCuLhQcDdZTTb4JzpUFms1OCch2dk5lHF0'; +process.env.VUE_APP_SAFELITE_HOP = 'https://sv2-safelitehop-sys.safelite.com/fmgCheckoutEmbedded.aspx'; // GA & GTM // NOTE: Using the old ISS site GTM Cotnainer ID for now, will create a new one soon. From e185e8a63809248bf9cf41482e344e5431efe560 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Tue, 20 Feb 2024 14:21:05 -0500 Subject: [PATCH 05/15] SSR-1063 environment variable updates --- azure-pipelines.yml | 4 ++++ src/layouts/payment-page/payment-page.vue | 2 +- vue.release.config.js | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3e06d0dc..8843c001 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -85,6 +85,7 @@ stages: __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) @@ -135,6 +136,7 @@ stages: __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) @@ -185,6 +187,7 @@ stages: __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) @@ -235,6 +238,7 @@ stages: __VUE_APP_CONSUMER_CF_DISTRO__: $(__VUE_APP_CONSUMER_CF_DISTRO__) __VUE_APP_CURRENT_ENVIRONMENT__: $(__VUE_APP_CURRENT_ENVIRONMENT__) __VUE_APP_GOOGLE_PLACES_API_KEY__: $(__VUE_APP_GOOGLE_PLACES_API_KEY__) + __VUE_APP_SAFELITE_HOP__: $(__VUE_APP_SAFELITE_HOP__) indexDeployVariables: __VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__: $(__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__) __VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__: $(__VUE_APP_GOOGLE_TAG_MANAGER_NOSCRIPT_FRAME_SRC__) diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 86f9089d..15e43070 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -171,7 +171,7 @@ import { Form } from 'vee-validate'; import BaseFormMixin from '@/mixins/base-form-mixin.js'; import { useMainStore } from '@/store'; import iframeResize from '../../../node_modules/iframe-resizer/js/iframeResizer.js'; -import externalUrls from '@/router/router-constants/externalUrl-values'; +import externalUrls from '@/router/router-constants/externalUrl-values.js'; import widgetFields from '@/constants/cms-widget-fields.js'; import paymentMethods from '@/constants/payment-method-constants'; import { AppointmentTypeStrings } from '@/constants/schedule-constants'; diff --git a/vue.release.config.js b/vue.release.config.js index c3c79a75..2cfed6dd 100644 --- a/vue.release.config.js +++ b/vue.release.config.js @@ -1,6 +1,7 @@ process.env.VUE_APP_CONSUMER_CF_DISTRO = "__VUE_APP_CONSUMER_CF_DISTRO__"; process.env.VUE_APP_CURRENT_ENVIRONMENT = "__VUE_APP_CURRENT_ENVIRONMENT__"; process.env.VUE_APP_GOOGLE_PLACES_API_KEY = "__VUE_APP_GOOGLE_PLACES_API_KEY__"; +process.env.VUE_APP_SAFELITE_HOP = "__VUE_APP_SAFELITE_HOP__"; // GA & GTM process.env.VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY = "__VUE_APP_GOOGLE_TAG_MANAGER_SCRIPT_BODY__"; From 231c8baa093949c6e59c9d4642fdd7698801b49a Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 21 Feb 2024 09:04:01 -0500 Subject: [PATCH 06/15] SSR-1063 routing typo fix --- src/router/router-constants/routing-table.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 30b3cf84..df960f77 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -620,8 +620,8 @@ const routingTable = () => [ issPageValue: issPageValues.PAYMENT_PAGE, maps: [ { - scenario: navigationScenarios.PAYMENT_METHOD, - destinationIssPageValue: issPageValues.REVIEW_PAGE + scenario: navigationScenarios.CLICKED_BACK, + destinationIssPageValue: issPageValues.PAYMENT_METHOD }, { scenario: navigationScenarios.CLICKED_FORWARD, From ceb48a92407daf8925ea262cdcd42f68d82acb3b Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 21 Feb 2024 15:43:21 -0500 Subject: [PATCH 07/15] Set some variables to be more accurate for testing --- src/constants/application-config.js | 4 +++- src/store/index.js | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/constants/application-config.js b/src/constants/application-config.js index 06fd28b5..fb91d504 100644 --- a/src/constants/application-config.js +++ b/src/constants/application-config.js @@ -16,7 +16,9 @@ const applicationConfig = Object.freeze({ CLIENTTAG_QUERYSTRING: 'ClientTag', GOOGLE_PLACES_API_KEY: process.env.VUE_APP_GOOGLE_PLACES_API_KEY, ISS_DEV_CMS_DOMAIN: 'https://digitalisscms.dev.safelite.io', - CASH_PARENT_ACCOUNT_NUMBER: 167132 + CASH_PARENT_ACCOUNT_NUMBER: 167132, + ITAC_FAIR_AND_REASONABLE_BILLTO: '214616', // Lib Mutal FnR BillTo + ITAC_CASH_BILLTO: '283393' // Lib Mutal ITAC Cash BillTo }); export default applicationConfig; diff --git a/src/store/index.js b/src/store/index.js index 2b35d46d..117b37bf 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -839,7 +839,7 @@ export const useMainStore = defineStore({ endDate, shopAppointmentType, applicationName: applicationConfig.APPLICATION_NAME, - billToAccountNumber: this.issConfig.parentAccountNumber.toString(), // TODO: MAKE THIS REAL + billToAccountNumber: order.policy.isITAC ? applicationConfig.ITAC_CASH_BILLTO : applicationConfig.ITAC_FAIR_AND_REASONABLE_BILLTO, // TODO: MAKE THIS REAL parentAccountNumber: this.issConfig.parentAccountNumber, // this.payment.parentAccountNumber, carId: vehicle.carId, lineItems, From 906374126859b4f1fa57226ddf5c87cfa45554a6 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Wed, 21 Feb 2024 16:23:26 -0500 Subject: [PATCH 08/15] SSR-1063 hop payment method constants --- src/constants/payment-method-constants.js | 8 +++- .../payment-method/payment-method.spec.js | 2 +- src/layouts/payment-method/payment-method.vue | 2 +- src/layouts/payment-page/payment-page.spec.js | 16 +++---- src/layouts/payment-page/payment-page.vue | 44 +++++++------------ src/router/index.js | 8 ++++ src/store/index.js | 2 +- src/store/store.spec.js | 2 +- vue.config.js | 2 +- 9 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/constants/payment-method-constants.js b/src/constants/payment-method-constants.js index 0af1a4de..48aa5008 100644 --- a/src/constants/payment-method-constants.js +++ b/src/constants/payment-method-constants.js @@ -1,3 +1,9 @@ +const hopPaymentMethods = Object.freeze({ + CREDIT_CARD: 'cc', + PAYPAL: 'pp', + AFTERPAY: 'ap' +}); + const paymentMethods = Object.freeze({ NONE: null, PAY_AT_TIME_OF_SERVICE: 'PayAtTimeOfService', @@ -6,4 +12,4 @@ const paymentMethods = Object.freeze({ AFTERPAY: 'Afterpay' }); -export default paymentMethods; +export { hopPaymentMethods, paymentMethods }; diff --git a/src/layouts/payment-method/payment-method.spec.js b/src/layouts/payment-method/payment-method.spec.js index dc31f064..01e06a1e 100644 --- a/src/layouts/payment-method/payment-method.spec.js +++ b/src/layouts/payment-method/payment-method.spec.js @@ -5,7 +5,7 @@ import paymentMethod from '@/layouts/payment-method/payment-method.vue'; import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper.js'; import { useMainStore } from '@/store'; -import paymentMethods from '@/constants/payment-method-constants'; +import { paymentMethods } from '@/constants/payment-method-constants'; function setupMocks() { const mountOptions = getMountOptions(); diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 71c1579c..b08cb685 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -52,7 +52,7 @@ import paymentMethodQuestion from '@/layouts/payment-method/payment-method-quest import settleAllPromises from '@/helpers/layout-helper'; import { useMainStore } from '@/store'; import { fetchCmsContentForPage } from '@/helpers/cms-content-helper'; -import paymentMethods from '@/constants/payment-method-constants'; +import { paymentMethods } from '@/constants/payment-method-constants'; import globalRules from '@/constants/global-rules'; import { Form } from 'vee-validate'; diff --git a/src/layouts/payment-page/payment-page.spec.js b/src/layouts/payment-page/payment-page.spec.js index c7e66af8..1b46819f 100644 --- a/src/layouts/payment-page/payment-page.spec.js +++ b/src/layouts/payment-page/payment-page.spec.js @@ -5,7 +5,7 @@ import payment from '@/layouts/payment-page/payment-page.vue'; import { shallowMount } from '@vue/test-utils'; import { getMountOptions } from '@/helpers/unit-test-helper'; import { useMainStore } from '@/store'; -import paymentMethods from '@/constants/payment-method-constants' +import { paymentMethods, hopPaymentMethods } from '@/constants/payment-method-constants.js'; // Constants const parts = { @@ -305,7 +305,7 @@ describe('payment-page.vue', () => { describe('payment type mapping', () => { describe('getPaymentType', () => { - test('Maps AFTERPAY -> ap', () => { + test('Maps AFTERPAY -> hopPaymentMethods.AFTERPAY', () => { // Arrange useMainStore().order.payment.payInAdvanceType = paymentMethods.AFTERPAY; const wrapper = setupMocks({}); @@ -314,10 +314,10 @@ describe('payment-page.vue', () => { const mapped = wrapper.vm.getPaymentType(); // Assert - expect(mapped).toBe('ap'); + expect(mapped).toBe(hopPaymentMethods.AFTERPAY); }); - test('Maps CREDIT_CARD -> cc', () => { + test('Maps CREDIT_CARD -> hopPaymentMethods.CREDIT_CARD', () => { // Arrange useMainStore().order.payment.payInAdvanceType = paymentMethods.CREDIT_CARD; const wrapper = setupMocks({}); @@ -326,10 +326,10 @@ describe('payment-page.vue', () => { const mapped = wrapper.vm.getPaymentType(); // Assert - expect(mapped).toBe('cc'); + expect(mapped).toBe(hopPaymentMethods.CREDIT_CARD); }); - test('Maps PAYPAL -> pp', () => { + test('Maps PAYPAL -> hopPaymentMethods.PAYPAL', () => { // Arrange useMainStore().order.payment.payInAdvanceType = paymentMethods.PAYPAL; const wrapper = setupMocks({}); @@ -338,7 +338,7 @@ describe('payment-page.vue', () => { const mapped = wrapper.vm.getPaymentType(); // Assert - expect(mapped).toBe('pp'); + expect(mapped).toBe(hopPaymentMethods.PAYPAL); }); test('Maps other values to self', () => { @@ -362,7 +362,7 @@ describe('payment-page.vue', () => { // Act const preVal = wrapper.vm.isPaypal; - wrapper.vm.paymentType = 'pp'; + wrapper.vm.paymentType = hopPaymentMethods.PAYPAL; await wrapper.vm.$nextTick(); const postVal = wrapper.vm.isPaypal; diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index 15e43070..da98875f 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -23,7 +23,7 @@ @@ -170,11 +170,11 @@ 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 '../../../node_modules/iframe-resizer/js/iframeResizer.js'; +import iframeResize from '@/../node_modules/iframe-resizer/js/iframeResizer.js'; import externalUrls from '@/router/router-constants/externalUrl-values.js'; import widgetFields from '@/constants/cms-widget-fields.js'; -import paymentMethods from '@/constants/payment-method-constants'; -import { AppointmentTypeStrings } from '@/constants/schedule-constants'; +import { hopPaymentMethods, paymentMethods } from '@/constants/payment-method-constants.js'; +import { AppointmentTypeStrings } from '@/constants/schedule-constants.js'; export default { name: 'payment-page', @@ -282,7 +282,7 @@ export default { return ''; }, isPaypal() { - if (this.paymentType === 'pp') { + if (this.paymentType === hopPaymentMethods.PAYPAL) { return true; } return false; @@ -359,7 +359,6 @@ export default { return items[1]; } } - //this.backButtonAction(); return undefined; }, getInvoiceNumber() { @@ -367,42 +366,31 @@ export default { if (workOrderNumber) { return workOrderNumber.replace('-', ''); } - //this.backButtonAction(); return undefined; }, getAddress1() { - return useMainStore().order.serviceLocation.address - ? useMainStore().order.serviceLocation.address - : useMainStore().order.serviceLocation.provider.address.streetAddress; + return useMainStore().order.serviceLocation.address ?? useMainStore().order.serviceLocation.provider.address.streetAddress; }, getAddress2() { - return useMainStore().order.serviceLocation.address2 - ? useMainStore().order.serviceLocation.address2 - : null; + return useMainStore().order.serviceLocation.address2; }, getCity() { - return useMainStore().order.serviceLocation.city - ? useMainStore().order.serviceLocation.city - : useMainStore().order.serviceLocation.provider.address.city; + return useMainStore().order.serviceLocation.city ?? useMainStore().order.serviceLocation.provider.address.city; }, getState() { - return useMainStore().order.serviceLocation.state - ? useMainStore().order.serviceLocation.state - : useMainStore().order.serviceLocation.provider.address.state; + return useMainStore().order.serviceLocation.state ?? useMainStore().order.serviceLocation.provider.address.state; }, getZipCode() { - return useMainStore().order.serviceLocation.zipCode - ? useMainStore().order.serviceLocation.zipCode - : useMainStore().order.serviceLocation.provider.address.zipCode; + return useMainStore().order.serviceLocation.zipCode ?? useMainStore().order.serviceLocation.provider.address.zipCode; }, getPaymentType() { switch (useMainStore().order.payment.payInAdvanceType) { case paymentMethods.AFTERPAY: - return 'ap'; + return hopPaymentMethods.AFTERPAY; case paymentMethods.CREDIT_CARD: - return 'cc'; + return hopPaymentMethods.CREDIT_CARD; case paymentMethods.PAYPAL: - return 'pp'; + return hopPaymentMethods.PAYPAL; default: return useMainStore().payment.payInAdvanceType; } @@ -428,9 +416,9 @@ export default { if (iframe) { iframe.onload = () => { if (iframe.contentWindow) { - if (this.paymentType === 'cc') { + if (this.paymentType === hopPaymentMethods.CREDIT_CARD) { iframe.contentWindow.postMessage('CreditCardChosen', '*'); - } else if (this.paymentType === 'ap') { + } else if (this.paymentType === hopPaymentMethods.AFTERPAY) { iframe.contentWindow.postMessage('afterpay', '*'); } } @@ -466,8 +454,6 @@ export default { }, forwardButtonAction() { this.$router.navigate(this.navigationScenarios.CLICKED_FORWARD, this.$route); - }, - navigateForward() { } } }; diff --git a/src/router/index.js b/src/router/index.js index bef88b03..4cd2dc45 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -129,6 +129,14 @@ router.beforeEach(async (to, from) => { showIssLoadingModal(true); } + const isInIframe = fromQueryPage === IssPageValues.PAYMENT_PAGE; + if (isInIframe) { + // need to set window.top.location.href directly when navigating out of an iframe + // especially when navigating with browser buttons + const newUrl = `${window.top.location.origin}${to.href}`; + window.top.location.href = newUrl; + } + const store = useMainStore(); // Prevent navigating backwards if we enter a bailout that we are not allowed to go back on if (store.isBailout && from.name === IssPageValues.BAILOUT_PAGE && to.name !== 'root' && to.name !== IssPageValues.CONTACT_CONFIRMATION diff --git a/src/store/index.js b/src/store/index.js index 1b963902..3daecdfc 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -13,7 +13,7 @@ import damageLocationsSelected from '@/constants/damage-locations-selected'; import coverageStatuses from '@/constants/coverage-statuses'; import { AppointmentTypeStrings, PREMIUM_FEE_PART_TYPE } from '@/constants/schedule-constants'; import { convertDateStringToDate, getDateDifferenceInDays, militaryToTwelveHourTime } from '@/helpers/date-helper'; -import paymentMethods from '@/constants/payment-method-constants'; +import { paymentMethods } from '@/constants/payment-method-constants'; const storeId = 'main'; diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 108b5900..98f2fd09 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -3,7 +3,7 @@ import { useMainStore } from '@/store/index.js'; import globalMethods from '@/global-methods.js'; import { getRandomString, getRandomGuid, getRandomInt, getRandomBoolean } from '@/helpers/data-generation.js'; import coverageStatuses from '@/constants/coverage-statuses.js'; -import paymentMethods from '@/constants/payment-method-constants'; +import { paymentMethods } from '@/constants/payment-method-constants'; import { endpoints } from '@/constants/endpoints'; import { AppointmentTypeStrings } from '@/constants/schedule-constants'; diff --git a/vue.config.js b/vue.config.js index 24f2d771..0a7711e6 100644 --- a/vue.config.js +++ b/vue.config.js @@ -2,7 +2,7 @@ process.env.VUE_APP_CONSUMER_CF_DISTRO = 'https://digitalapi.dev.safelite.io'; process.env.VUE_APP_CURRENT_ENVIRONMENT = 'Localhost'; process.env.VUE_APP_GOOGLE_PLACES_API_KEY = 'AIzaSyCuLhQcDdZTTb4JzpUFms1OCch2dk5lHF0'; -process.env.VUE_APP_SAFELITE_HOP = 'https://sv2-safelitehop-sys.safelite.com/fmgCheckoutEmbedded.aspx'; +process.env.VUE_APP_SAFELITE_HOP = 'https://iss-hop-sys.glassclaim.com/fmgCheckoutEmbedded.aspx'; // GA & GTM // NOTE: Using the old ISS site GTM Cotnainer ID for now, will create a new one soon. From 88eeaef09d06ea52602378795be59a0aae9f9988 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 22 Feb 2024 09:42:20 -0500 Subject: [PATCH 09/15] SSR-1063 minor updates --- src/layouts/payment-page/payment-page.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/layouts/payment-page/payment-page.vue b/src/layouts/payment-page/payment-page.vue index da98875f..8aa03d52 100644 --- a/src/layouts/payment-page/payment-page.vue +++ b/src/layouts/payment-page/payment-page.vue @@ -23,8 +23,8 @@ @@ -155,7 +155,7 @@ - +