Merge pull request #1685 from Safelite/feature/CSR-1889
CSR-1889 added last four to cc tokenization
This commit is contained in:
commit
2ec7b88d10
4 changed files with 7 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ const queryStrings = {
|
||||||
AUTH_CODE: "auth_code",
|
AUTH_CODE: "auth_code",
|
||||||
TRANSACTION_ID: "transaction_id",
|
TRANSACTION_ID: "transaction_id",
|
||||||
TRANS_REFERENCE_NUMBER: "auth_trans_ref_no",
|
TRANS_REFERENCE_NUMBER: "auth_trans_ref_no",
|
||||||
|
LAST_FOUR: "last_four",
|
||||||
DISPLAY_PIA_ALERT: "displayPiaAlert",
|
DISPLAY_PIA_ALERT: "displayPiaAlert",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,6 +106,7 @@ export default {
|
||||||
const transReferenceNumber = getQuerystringParameter(
|
const transReferenceNumber = getQuerystringParameter(
|
||||||
queryStrings.TRANS_REFERENCE_NUMBER
|
queryStrings.TRANS_REFERENCE_NUMBER
|
||||||
);
|
);
|
||||||
|
const lastFour = getQuerystringParameter(queryStrings.LAST_FOUR);
|
||||||
|
|
||||||
var ccToken = {
|
var ccToken = {
|
||||||
subscriptionId: subscriptionID,
|
subscriptionId: subscriptionID,
|
||||||
|
|
@ -119,6 +120,7 @@ export default {
|
||||||
authCode: authCode,
|
authCode: authCode,
|
||||||
transactionId: transactionId,
|
transactionId: transactionId,
|
||||||
transReferenceNumber: transReferenceNumber,
|
transReferenceNumber: transReferenceNumber,
|
||||||
|
lastFour: lastFour,
|
||||||
};
|
};
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_CCTOKEN, ccToken, false);
|
baseMixin.methods.dispatchStoreAction(storeActions.SAVE_CCTOKEN, ccToken, false);
|
||||||
await this.saveAndSubmitWorkOrder();
|
await this.saveAndSubmitWorkOrder();
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ const getDefaultState = () => {
|
||||||
authCode: null,
|
authCode: null,
|
||||||
transactionId: null,
|
transactionId: null,
|
||||||
transReferenceNumber: null,
|
transReferenceNumber: null,
|
||||||
|
lastFour: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
schedule: {
|
schedule: {
|
||||||
|
|
@ -274,6 +275,7 @@ export const mutations = {
|
||||||
state.order.payment.ccToken.authCode = ccToken.authCode;
|
state.order.payment.ccToken.authCode = ccToken.authCode;
|
||||||
state.order.payment.ccToken.transactionId = ccToken.transactionId;
|
state.order.payment.ccToken.transactionId = ccToken.transactionId;
|
||||||
state.order.payment.ccToken.transReferenceNumber = ccToken.transReferenceNumber;
|
state.order.payment.ccToken.transReferenceNumber = ccToken.transReferenceNumber;
|
||||||
|
state.order.payment.ccToken.lastFour = ccToken.lastFour;
|
||||||
},
|
},
|
||||||
updatePaypalToken(state, ppToken) {
|
updatePaypalToken(state, ppToken) {
|
||||||
state.order.payment.paypalToken = ppToken;
|
state.order.payment.paypalToken = ppToken;
|
||||||
|
|
@ -1680,6 +1682,7 @@ export const actions = {
|
||||||
authCode: order.payment.ccToken.authCode,
|
authCode: order.payment.ccToken.authCode,
|
||||||
transactionId: order.payment.ccToken.transactionId,
|
transactionId: order.payment.ccToken.transactionId,
|
||||||
transReferenceNumber: order.payment.ccToken.transReferenceNumber,
|
transReferenceNumber: order.payment.ccToken.transReferenceNumber,
|
||||||
|
lastFour: order.payment.ccToken.lastFour,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
serviceLocation: {
|
serviceLocation: {
|
||||||
|
|
|
||||||
|
|
@ -742,6 +742,7 @@ describe("Actions", () => {
|
||||||
authCode: null,
|
authCode: null,
|
||||||
transactionId: null,
|
transactionId: null,
|
||||||
transReferenceNumber: null,
|
transReferenceNumber: null,
|
||||||
|
lastFour: null,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
serviceLocation: {},
|
serviceLocation: {},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue