CSR-1391 paypal target updates
This commit is contained in:
parent
7afbc56a3a
commit
222bc81d49
1 changed files with 7 additions and 6 deletions
|
|
@ -32,7 +32,7 @@
|
|||
<form
|
||||
ref="myForm"
|
||||
id="card-data"
|
||||
:target="isPaypal ? '_top' : 'card-frame'"
|
||||
:target="paypalPayment ? '_top' : 'card-frame'"
|
||||
method="POST"
|
||||
:action="checkoutUrl">
|
||||
<input type="hidden" name="paymentType" :value="paymentType" />
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue