Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/actions/ebs-sync/ebs.js
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ export async function syncOrderToEbs(ctx, params, order, orderJournal) {
throw err;
}

return { status: res.status };
return { status: res.status, xml };
}

/** Returns true when the EBS response indicates success. */
Expand Down Expand Up @@ -461,8 +461,8 @@ function buildPaymentXml(paymentSnapshot, order) {
: '';
const safetechAttrs = paymentSnapshot.hasSafetech
? `\n FraudStatusCode="${escapeXml(paymentSnapshot.fraudStatusCode)}"`
+ `\n FraudRiskInquiryTransactionID="${escapeXml(paymentSnapshot.fraudRiskInquiryTransactionId)}"`
+ `\n FraudAutoDecisionResponse="${escapeXml(paymentSnapshot.fraudAutoDecisionResponse)}"`
+ `\n FraudRiskInquiryTransactionID="${escapeXml(paymentSnapshot.fraudRiskInquiryTransactionId)}"`
+ `\n FraudAutoDecisionResponse="${escapeXml(paymentSnapshot.fraudAutoDecisionResponse)}"`
: '';
inner = `<ns2:CreditCard
CardId="${escapeXml(paymentSnapshot.cardId)}"
Expand Down
4 changes: 2 additions & 2 deletions src/actions/ebs-sync/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,9 @@ export async function run(params) {

for (let attempt = 1; attempt <= MAX_RETRIES; attempt++) {
try {
const { status } = await syncOrderToEbs(ctx, params, order, orderJournal);
const { status, xml } = await syncOrderToEbs(ctx, params, order, orderJournal);

await logOrderSync(params, { action: 'order-sync', id: orderId, status }).catch((logErr) => {
await logOrderSync(params, { action: 'order-sync', id: orderId, status, xml }).catch((logErr) => {
log.warn(`[ebs-sync] Failed to log order-sync for ${orderId}: ${logErr.message}`);
});

Expand Down
Loading