mirror of
https://github.com/Tria-plc/edr-platform.git
synced 2026-08-26 18:42:49 +00:00
Merge pull request #819 from Tria-plc/alpha
fix: ( telebirr ) read transId from webhook for provider_txn_id
This commit is contained in:
@@ -18,7 +18,8 @@ export class TelebirrWebhookService {
|
||||
const signatureValid = true;
|
||||
|
||||
const mapped = this.provider.mapWebhookTradeStatus(payload.trade_status);
|
||||
const providerTxnId = payload.trans_id ?? payload.payment_order_id;
|
||||
const providerTxnId =
|
||||
payload.transId ?? payload.trans_id ?? payload.payment_order_id;
|
||||
|
||||
await this.processor.process({
|
||||
provider: this.provider.method,
|
||||
|
||||
@@ -2,6 +2,9 @@ export interface TelebirrWebhookPayload {
|
||||
merch_order_id: string;
|
||||
payment_order_id: string;
|
||||
trade_status: string;
|
||||
/** Telebirr's webhook (notify) sends the transaction id as camelCase `transId`;
|
||||
* the queryOrder/status-query biz_content uses snake_case `trans_id`. Support both. */
|
||||
transId?: string;
|
||||
trans_id?: string;
|
||||
total_amount?: string;
|
||||
trans_currency?: string;
|
||||
|
||||
Reference in New Issue
Block a user