Merge pull request #329 from Tria-plc/alpha

Migration fix
This commit is contained in:
Eyob T.
2026-06-29 13:37:21 +03:00
committed by GitHub
12 changed files with 189 additions and 96 deletions

View File

@@ -210,7 +210,8 @@ export class DMoneyProvider implements PaymentProvider {
business_type: "OnlineMerchant" as const,
title: `${input.orderRef}`,
total_amount: totalAmount,
trans_currency: this.currency,
// Charge the currency the caller already converted to; never relabel it provider-side.
trans_currency: input.currency,
timeout_express: this.timeoutExpress,
...(redirectUrl ? { redirect_url: redirectUrl } : {}),
},
@@ -341,9 +342,6 @@ export class DMoneyProvider implements PaymentProvider {
private get language(): string {
return this.config.get<string>("dmoney.language") ?? "en";
}
private get currency(): string {
return this.config.get<string>("dmoney.currency") ?? "FDJ";
}
private get privateKey(): string {
return this.config.get<string>("dmoney.privateKey") ?? "";
}

View File

@@ -208,8 +208,9 @@ export class WaafiProvider implements PaymentProvider {
transactionInfo: {
referenceId: input.merchantOrderId,
amount: this.toAmount(input.amountMinor),
// Waafi has no ETB; `waafi.currency` overrides the booking currency when set.
currency: this.currency || input.currency,
// Charge exactly the currency the caller already converted to (passenger/freight resolve
// the method's settlement currency). The provider never relabels the currency.
currency: input.currency,
description: `${input.orderRef}`,
},
},
@@ -298,9 +299,6 @@ export class WaafiProvider implements PaymentProvider {
private get paymentMethod(): string {
return this.config.get<string>("waafi.paymentMethod") ?? "MWALLET_ACCOUNT";
}
private get currency(): string {
return this.config.get<string>("waafi.currency") ?? "";
}
private get successUrl(): string {
return this.config.get<string>("waafi.successUrl") ?? "";
}