INSR-7995: Address some inconsistencies

This commit is contained in:
Alex Humphries 2026-03-17 13:15:51 -04:00
parent 5a795744ee
commit ab565fccec
3 changed files with 13 additions and 11 deletions

View file

@ -94,17 +94,18 @@ export function mapIssToAdyenPaymentMethod(issMethod) {
}
export function generateCcToken(adyenSessionInfo) {
const order = useMainStore().order;
const locationInfo = getLocationInfo(order);
const zipCode = useMainStore().order.customer.address.zipCode
?? useMainStore().order.serviceLocation.zipCode
?? useMainStore().order.serviceLocation.provider.address.zipCode
const ccToken = {
subscriptionId: adyenSessionInfo?.storedToken,
expMonth: adyenSessionInfo?.cardExpiryMonth,
expYear: adyenSessionInfo?.cardExpiryYear,
cardType: adyenSessionInfo?.cardType,
billToPostalCode: locationInfo.zipCode, // TODO - real data?
billToFirstName: order.customer.firstName, // TODO - real data?
billToLastName: order.customer.lastName, // TODO - real data?
billToPostalCode: zipCode,
billToFirstName: useMainStore().contactInfo.firstName,
billToLastName: useMainStore().contactInfo.lastName,
referenceNumber: adyenSessionInfo?.workOrderNumber,
authCode: adyenSessionInfo?.authCode,
transactionId: adyenSessionInfo?.transactionReference,

View file

@ -240,8 +240,9 @@ export default {
return !isEnabled || useMainStore().isUnverified || (useMainStore().isDeductible && isDeductibleTotalEqualToZero);
},
isAdyenEnabled() {
const adyenEnabled = this.getSettingValue(experimentSettings.ISS_ENABLE_ADYEN_V1);
return adyenEnabled === 'true';
return true;
// const adyenEnabled = this.getSettingValue(experimentSettings.ISS_ENABLE_ADYEN_V1);
// return adyenEnabled === 'true';
},
paymentMethodWidgetName() {
let showApplePay = false;

View file

@ -510,12 +510,12 @@ export default {
expMonth: adyenResponse?.cardExpiryMonth,
expYear: adyenResponse?.cardExpiryYear,
cardType: adyenResponse?.cardType,
billToPostalCode: this.zipCode, // TODO
billToFirstName: this.mainStore.contactInfo.firstName, // TODO
billToLastName: this.mainStore.contactInfo.lastName, // TODO
billToPostalCode: this.zipCode,
billToFirstName: this.mainStore.contactInfo.firstName,
billToLastName: this.mainStore.contactInfo.lastName,
referenceNumber: adyenResponse?.workOrderNumber,
authCode: adyenResponse?.authCode,
transactionId: adyenResponse?.transactionReference, // TODO
transactionId: adyenResponse?.transactionReference,
transReferenceNumber: adyenResponse?.transactionReference,
lastFour: adyenResponse?.last4DigitsOfCard,
};