diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 0258f7f82..3555a91b9 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -32,7 +32,7 @@
@@ -219,11 +219,9 @@ export default { lineItems: "Labor|189.99|1||Repair supplies|7.99|1", sgHeaderline1: this.getHeaderLine1(), sgHeaderline2: this.getHeaderLine2(), + paypalPayment: this.isPaypal(), }; }, - async mounted() { - this.fetchSignatureInfo(); - }, async beforeRouteEnter(to, from, next) { // Call APIs const cmsContentPromise = fetchCmsContentForPage(to.query.fmgPage); @@ -239,8 +237,9 @@ export default { const resultMap = await settleAllPromises(promiseResultMap); // Call the "next" function to complete the transition to this page. - next((vm) => { + next(async vm => { vm.setCmsContent(resultMap.cmsContent); + vm.fetchSignatureInfo(); }); }, methods: { @@ -299,7 +298,9 @@ export default { }, forwardButtonAction() {}, async fetchSignatureInfo() { - this.$refs.loadingModal.showModal(); + if (this.isPaypal()) { + this.$refs.loadingModal.showModal(); + } const signatureInfo = await this.dispatchStoreAction(storeActions.GET_SIGNATURE); this.authToken = signatureInfo.data.token; this.authSignature = signatureInfo.data.signature;