diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index e661a58b3..188078781 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -288,26 +288,19 @@ export default { await this.dispatchStoreAction(storeActions.SAVE_PROMOS, this.lineItems.promos, false); - switch (this.paymentMethod) { - case paymentMethods.CREDIT_CARD: - this.setupPia(this.paymentMethod); - break; - case paymentMethods.PAYPAL: - this.setupPia(this.paymentMethod); - break; - case paymentMethods.AFTERPAY: - this.setupPia(this.paymentMethod); - break; - default: - this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false); + if (this.paymentMethod == paymentMethods.LATER) { + this.dispatchStoreAction(this.storeActions.SAVE_WORK_ORDER_FLAG, true, false); await submitWorkOrder({ pageNameToLog: "payment-method" }); this.$router.navigateWithoutSaving( this.navigationScenarios.CLICKED_FORWARD, this.$route ); } + else { + this.setupPia(); + } }, - async setupPia(payNowType) { + async setupPia() { this.$refs.loadingModal.showModal(); // since we're leaving the site for pia, clear any save session promises that we will not be able to resolve when we return