mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
fix: ( telebirr ) fix query status
This commit is contained in:
@@ -101,17 +101,20 @@ export class TelebirrProvider implements PaymentProvider {
|
||||
},
|
||||
);
|
||||
|
||||
const tradeStatus = response.biz_content?.trade_status;
|
||||
this.logger.log(response);
|
||||
|
||||
// const tradeStatus = response.biz_content?.trade_status;
|
||||
const orderStatus = response.biz_content?.order_status;
|
||||
const providerTxnId =
|
||||
response.biz_content?.trans_id ?? response.biz_content?.payment_order_id;
|
||||
const mapped = this.mapTradeStatus(tradeStatus);
|
||||
const mapped = this.mapTradeStatus(orderStatus);
|
||||
|
||||
return {
|
||||
status: mapped,
|
||||
providerTxnId,
|
||||
failureCode:
|
||||
mapped === ProviderPaymentStatus.FAILED && tradeStatus
|
||||
? tradeStatus
|
||||
mapped === ProviderPaymentStatus.FAILED && orderStatus
|
||||
? orderStatus
|
||||
: undefined,
|
||||
rawResponse: response as Record<string, unknown>,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user