diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 8c4a28e7f..2f6891138 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -20,6 +20,39 @@ scrolling="no"> +
{{ switchPaymentText }}
+
+ +
+
or
+
+ +
+
or
+
+ +
{ + this.$refs.hopForm.submit(); + + const iframe = this.$refs.paymentFrame; + if (iframe) { + iframe.onload = () => { + if (iframe.contentWindow) { + if (this.paymentType == "cc") { + iframe.contentWindow.postMessage("CreditCardChosen", "*"); + } else if (this.paymentType == "ap") { + iframe.contentWindow.postMessage("afterpay", "*"); + } + } + }; + } + }); + }, async fetchSignatureInfo(signatureInfo) { if (this.isPaypal()) { this.$refs.loadingModal.showModal(); @@ -412,20 +470,7 @@ export default { this.authSignature = signatureInfo.signature; this.authSignatureStart = signatureInfo.startDate; - this.$nextTick(() => { - this.$refs.myForm.submit(); - - if (this.paymentType == "ap") { - const iframe = this.$refs.paymentFrame; - if (iframe) { - iframe.onload = () => { - if (iframe.contentWindow) { - iframe.contentWindow.postMessage("afterpay", "*"); - } - }; - } - } - }); + this.submitHopForm(); }, }, components: {