Merge branch 'develop' into feature/CASH-692

This commit is contained in:
Johnny Shultz 2025-05-22 13:55:16 -04:00 committed by GitHub
commit 504b9a5e95
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 18 additions and 13 deletions

View file

@ -6,7 +6,6 @@
<button <button
v-show="shouldShowWebchatButton" v-show="shouldShowWebchatButton"
v-on:click="webchatClicked" v-on:click="webchatClicked"
v-on:keydown.enter.prevent.stop
type="button" type="button"
class="chat-button"></button> class="chat-button"></button>
</span> </span>

View file

@ -64,7 +64,7 @@
<div class="payment-method-question"> <div class="payment-method-question">
<buttonQuestion <buttonQuestion
v-if="!isAfterpay" v-if="showSwitchPaymentMethod"
groupName="payment-method" groupName="payment-method"
buttonTypeString="payment-method-list-button" buttonTypeString="payment-method-list-button"
:buttonTypeObject="paymentMethodListButton" :buttonTypeObject="paymentMethodListButton"
@ -292,6 +292,7 @@ export default {
availableVaps: [], availableVaps: [],
shouldBlockInteraction: false, shouldBlockInteraction: false,
paymentMethodListButton: paymentMethodListButton, paymentMethodListButton: paymentMethodListButton,
showSwitchPaymentMethod: !this.isAfterpay(),
}; };
}, },
props: { props: {
@ -514,12 +515,6 @@ export default {
} }
return false; return false;
}, },
isAfterpay() {
if (this.paymentType == "ap") {
return true;
}
return false;
},
shouldDisplayPiaCCAlert() { shouldDisplayPiaCCAlert() {
return this.shouldDisplayPiaAlert(paymentMethods.CREDIT_CARD); return this.shouldDisplayPiaAlert(paymentMethods.CREDIT_CARD);
}, },
@ -828,6 +823,12 @@ export default {
this.backButtonAction(); this.backButtonAction();
} }
if (event.data.indexOf("afterpayOpened") > -1) {
console.log(new Date() + ": Payment method afterpay selected");
this.updatePaymentMethod(paymentMethods.AFTERPAY);
this.showSwitchPaymentMethod = false;
}
if (event.data.indexOf("creditCardSubmit") > -1) { if (event.data.indexOf("creditCardSubmit") > -1) {
console.log(new Date() + ": Payment method credit card selected"); console.log(new Date() + ": Payment method credit card selected");
this.updatePaymentMethod(paymentMethods.CREDIT_CARD); this.updatePaymentMethod(paymentMethods.CREDIT_CARD);
@ -865,11 +866,6 @@ export default {
} }
}, },
switchToAfterpay() { switchToAfterpay() {
this.dispatchStoreAction(
storeActions.SAVE_PAYMENT_METHOD_CHOICE,
paymentMethods.AFTERPAY,
false
);
const iframe = this.$refs.paymentFrame; const iframe = this.$refs.paymentFrame;
if (iframe) { if (iframe) {
iframe.contentWindow.postMessage("afterpay", "*"); iframe.contentWindow.postMessage("afterpay", "*");
@ -892,6 +888,12 @@ export default {
shouldDisplayPiaAlert(payMethod) { shouldDisplayPiaAlert(payMethod) {
return this.$route?.query?.piaErrorType === payMethod; return this.$route?.query?.piaErrorType === payMethod;
}, },
isAfterpay() {
if (this.paymentType == "ap") {
return true;
}
return false;
},
}, },
components: { components: {
funnelHeader, funnelHeader,
@ -915,6 +917,10 @@ export default {
background-color: red; background-color: red;
} }
.payment-method-question {
padding: 0 1.5rem;
}
.ui-block { .ui-block {
position: fixed; position: fixed;
top: 0; top: 0;