mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-09-07 23:35:42 +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 =
|
const providerTxnId =
|
||||||
response.biz_content?.trans_id ?? response.biz_content?.payment_order_id;
|
response.biz_content?.trans_id ?? response.biz_content?.payment_order_id;
|
||||||
const mapped = this.mapTradeStatus(tradeStatus);
|
const mapped = this.mapTradeStatus(orderStatus);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
status: mapped,
|
status: mapped,
|
||||||
providerTxnId,
|
providerTxnId,
|
||||||
failureCode:
|
failureCode:
|
||||||
mapped === ProviderPaymentStatus.FAILED && tradeStatus
|
mapped === ProviderPaymentStatus.FAILED && orderStatus
|
||||||
? tradeStatus
|
? orderStatus
|
||||||
: undefined,
|
: undefined,
|
||||||
rawResponse: response as Record<string, unknown>,
|
rawResponse: response as Record<string, unknown>,
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user