mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
clarify replayed CBE payment failure msg
This commit is contained in:
@@ -191,13 +191,12 @@ export class CbeBillService {
|
|||||||
return mapPaymentFailure(dto, "Payment is being processed.");
|
return mapPaymentFailure(dto, "Payment is being processed.");
|
||||||
}
|
}
|
||||||
if (prior.failureClass === "BUSINESS") {
|
if (prior.failureClass === "BUSINESS") {
|
||||||
// Final — retrying cannot change the answer. Replay what we told CBE last time.
|
// Final — retrying cannot change the answer. Same End_To_End_Txn_Id was already
|
||||||
return (
|
// resolved (possibly against a different Bill_Id/amount); say so instead of
|
||||||
(prior.responsePayload as unknown as CbePaymentResponseDto) ??
|
// echoing the original reason, which no longer describes this request.
|
||||||
mapPaymentFailure(
|
return mapPaymentFailure(
|
||||||
dto,
|
dto,
|
||||||
prior.responseDescription ?? "Payment already failed.",
|
`End_To_End_Txn_Id ${dto.End_To_End_Txn_Id} was already processed and failed: ${prior.responseDescription ?? "unknown reason"}.`,
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// FAILED + TRANSIENT: allowed retry — fall through and re-run the settlement.
|
// FAILED + TRANSIENT: allowed retry — fall through and re-run the settlement.
|
||||||
|
|||||||
Reference in New Issue
Block a user