CSR-2098
CSR-2098 for PIA insurance deductible pricing, pass the amount we passed to safeliteHop and set it in the referral QuoteTotalAmount to be used in the ConvertTenders method during settlement.
This commit is contained in:
parent
831685aa5f
commit
eb8594903c
4 changed files with 19 additions and 0 deletions
|
|
@ -91,6 +91,7 @@ const storeActions = {
|
|||
SAVE_SERVICE_LOCATION_TECH_NOTES: "saveServiceLocationTechNotes",
|
||||
SAVE_CCTOKEN: "saveCCToken",
|
||||
SAVE_PAYPAL_TOKEN: "savePaypalToken",
|
||||
SAVE_NEXTGEN_SETTLED_AMOUNT: "saveNextGenSettledAmount",
|
||||
|
||||
CREATE_SUBMITTED_ORDER: "createSubmittedOrder",
|
||||
RESET_SUBMITTED_ORDER: "resetSubmittedOrder",
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ const storeMutations = {
|
|||
// PAYMENT MUTATIONS
|
||||
UPDATE_CCTOKEN: "updateCCToken",
|
||||
UPDATE_PAYPAL_TOKEN: "updatePaypalToken",
|
||||
UPDATE_NEXTGEN_SETTLED_AMOUNT: "updateNextGenSettledAmount",
|
||||
|
||||
// VEHICLE MUTATIONS
|
||||
UPDATE_YEAR: "updateYear",
|
||||
|
|
|
|||
|
|
@ -72,7 +72,9 @@ export default {
|
|||
async processPaypalResponse() {
|
||||
const token = getQuerystringParameter(queryStrings.TOKEN);
|
||||
const payerId = getQuerystringParameter(queryStrings.PAYERID);
|
||||
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_PAYPAL_TOKEN, token, false);
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_NEXTGEN_SETTLED_AMOUNT, this.getAmountDue(), false);
|
||||
|
||||
await this.saveAndSubmitWorkOrder();
|
||||
},
|
||||
|
|
@ -122,10 +124,15 @@ export default {
|
|||
transReferenceNumber: transReferenceNumber,
|
||||
lastFour: lastFour,
|
||||
};
|
||||
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_CCTOKEN, ccToken, false);
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_NEXTGEN_SETTLED_AMOUNT, this.getAmountDue(), false);
|
||||
await this.saveAndSubmitWorkOrder();
|
||||
}
|
||||
},
|
||||
getAmountDue() {
|
||||
return baseMixin.methods.getAmountDue(store.getters.order.lineItems);
|
||||
},
|
||||
async saveAndSubmitWorkOrder() {
|
||||
// Final work order submit after returning from PIA.
|
||||
await this.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ const getDefaultState = () => {
|
|||
piaType: null,
|
||||
inactivePromos: null,
|
||||
paypalToken: null,
|
||||
nextGenSettledAmount: 0,
|
||||
ccToken: {
|
||||
subscriptionId: null,
|
||||
expMonth: null,
|
||||
|
|
@ -304,6 +305,9 @@ export const mutations = {
|
|||
updatePaypalToken(state, ppToken) {
|
||||
state.order.payment.paypalToken = ppToken;
|
||||
},
|
||||
updateNextGenSettledAmount(state, nextGenSettledAmount) {
|
||||
state.order.payment.nextGenSettledAmount = nextGenSettledAmount;
|
||||
},
|
||||
updateInsuranceVerifiedStatus(state, isVerified) {
|
||||
state.order.payment.insuranceCoverage.isVerified = isVerified;
|
||||
},
|
||||
|
|
@ -1729,6 +1733,7 @@ export const actions = {
|
|||
isPaypal: order.payment.piaType == paymentMethods.PAYPAL ? true : false,
|
||||
isAfterPay: order.payment.piaType == paymentMethods.AFTERPAY ? true : false,
|
||||
paypalToken: order.payment.paypalToken,
|
||||
nextGenSettledAmount: order.payment.nextGenSettledAmount,
|
||||
ccToken: {
|
||||
subscriptionId: order.payment.ccToken.subscriptionId,
|
||||
expMonth: order.payment.ccToken.expMonth,
|
||||
|
|
@ -1861,6 +1866,11 @@ export const actions = {
|
|||
saveCCToken(context, ccToken) {
|
||||
context.commit(storeMutations.UPDATE_CCTOKEN, ccToken);
|
||||
},
|
||||
|
||||
saveNextGenSettledAmount(context, nextGenSettledAmount) {
|
||||
context.commit(storeMutations.UPDATE_NEXTGEN_SETTLED_AMOUNT, nextGenSettledAmount);
|
||||
},
|
||||
|
||||
savePaypalToken(context, ppToken) {
|
||||
context.commit(storeMutations.UPDATE_PAYPAL_TOKEN, ppToken);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in a new issue