You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
const parsedPayment: any = {
transactionGuid: _.get(responseCamel, 'RequestGuid', ''),
providerResponseCode: _.get(responseCamel, 'ErrorCode', ''),
providerTransactionId: _.get(responseCamel, 'TransactionId', ''),
providerTransactionTime: moment().format('MM/DD/YYYY h:mm a'),
// cardName: _.get(responseCamel, 'IssuerName', '').trim(), // Check with Hoffman if this is required (and if it's the same as Brand)
// cardNum: _.get(responseCamel, 'MaskedCardNumber', '').trim(), // Check with Hoffman if this required (because we have the 'masked' value)
cardNumberMasked: _.get(responseCamel, 'MaskedCardNumber', '').trim(),
merchantNumber: _get(responseCamel, '{{this should be the terminal id}}', ''), // Lior - this should be the terminal id
providerTransactionGuidReference: _.get(responseCamel, 'RequestId', ''),
// providerTransactionIdToBeRefunded: _.get(responseCamel, 'TransactionId', ''), // Lior - this should be passed ONLY when we're doing a refund
// cardholderName: _.get(responseCamel, '', ''), // FreedomPay are not exposing this
brandName: _.get(responseCamel, 'IssuerName', ''), // Check with Hoffman which is required
brand: {
name: _.get(responseCamel, 'IssuerName', '') // Check with Hoffman which is required
},
creditCardBrand: _.get(responseCamel, 'IssuerName', ''), // Check with Hoffman which is required
emvData: _.get(responseCamel, 'ChipData', ''),
confirmationNum: _.get(responseCamel, 'ApprovalCode', ''),
providerTransactionStatus: _.get(responseCamel, 'Message', ''), // Check with Hoffman why it used to be hardcoded for 'unknown'
transType: 'purchase',
EntryMethod: _.get(responseCamel, 'EntryMode', ''), // Check with Hoffman which is the correct one - `EntryMethod` or `entryMethod` and if the value is an `enum` on ROS side
entryMethod: _.get(responseCamel, 'EntryMode', ''), // Check with Hoffman which is the correct one - `EntryMethod` or `entryMethod` and if the value is an `enum` on ROS side
expMonth: _.get(responseCamel, 'ExpiryDate', '').length == 4 ? _.get(responseCamel, 'ExpiryDate', '').slice(-2) : '', // ??
expYear: _.get(responseCamel, 'ExpiryDate', '').length == 4 ? '20' + _.get(responseCamel, 'ExpiryDate', '').slice(0, 2) : '', // ??
last4: _.get(responseCamel, 'MaskedCardNumber', '') ? _.get(responseCamel, 'maskedCardNumber', '').slice(-4) : '',
amount: _.get(responseCamel, 'ApprovedAmount', ''),
source: 'Kiosk',
lastUpdated: new Date().toISOString(),
accountName: 'FreedomPay',
organization: this.appService?.$storage?.organization,
providerResponse: responseCamel,
}
Required Kiosk client-side mapping
const parsedPayment: any = {
organization: this.appService?.$storage?.organization,
account: ? // ROS Account ID
issuer: _.get(responseCamel, 'IssuerName', '').trim(),
confirmationNum: _.get(responseCamel, 'ApprovalCode', ''),
cardNumberMasked: _.get(responseCamel, 'MaskedCardNumber', '').trim(),
merchantNumber: _get(responseCamel, '{{this should be the terminal id}}', ''),
tenderType: 'creditCard',
providerResponseCode: _.get(responseCamel, 'ErrorCode', ''),
providerTransactionId: _.get(responseCamel, 'TransactionId', ''),
providerTransactionTime: moment().format('MM/DD/YYYY h:mm a'),
providerResponse: responseCamel,
providerTransactionStatus: _.get(responseCamel, 'Message', ''), // PAD sends "unknown"...
EntryMethod: _.get(responseCamel, 'EntryMode', ''), // Check with Hoffman which is the correct one - `EntryMethod` or `entryMethod` and if the value is an `enum` on ROS side
entryMethod: _.get(responseCamel, 'EntryMode', ''), // Check with Hoffman which is the correct one - `EntryMethod` or `entryMethod` and if the value is an `enum` on ROS side
expMonth: _.get(responseCamel, 'ExpiryDate', '').length == 4 ? _.get(responseCamel, 'ExpiryDate', '').slice(-2) : '', // ??
expYear: _.get(responseCamel, 'ExpiryDate', '').length == 4 ? '20' + _.get(responseCamel, 'ExpiryDate', '').slice(0, 2) : '', // ??
last4: _.get(responseCamel, 'MaskedCardNumber', '') ? _.get(responseCamel, 'maskedCardNumber', '').slice(-4) : '',
amount: _.get(responseCamel, 'ApprovedAmount', ''),
source: 'Kiosk',
lastUpdated: new Date().toISOString(),
}