fix: min amount of cac

This commit is contained in:
Nathnael
2026-08-02 18:10:12 +00:00
parent ed27170301
commit 7cebef8c39

View File

@@ -232,10 +232,15 @@ export class PaymentService {
referenceType: PaymentReferenceType.SHIPMENT,
referenceId: input.referenceId,
orderRef: input.orderRef,
// amountMinor: input.amountMinor,
// CBE_BILL must carry the REAL amount: /cbe/payment verifies what the customer was
// debited against the intent amount, so the 1-birr dev shortcut would break it.
amountMinor: isCbeBill ? input.amountMinor : 1,
// debited against the intent amount, so the dev shortcut would break it.
// CAC bank rejects amounts below 10 (DJF bounds 10100,000), so its dev
// shortcut floor is 10, not 1.
amountMinor: isCbeBill
? input.amountMinor
: input.method === ProviderMethod.CAC_BANK
? 10
: 1,
currency: input.currency,
provider: input.method as ProviderMethod,
platform: input.platform,