Skip to content

feat: add KES, MZN, TZS, UGX, ZAR, ZMW payment methods; expand NGN#627

Merged
grunch merged 1 commit into
MostroP2P:mainfrom
codaMW:feat/add-african-payment-methods
Jun 24, 2026
Merged

feat: add KES, MZN, TZS, UGX, ZAR, ZMW payment methods; expand NGN#627
grunch merged 1 commit into
MostroP2P:mainfrom
codaMW:feat/add-african-payment-methods

Conversation

@codaMW

@codaMW codaMW commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

What

Adds locally-relevant payment methods for six African currencies Kenya (KES), Mozambique (MZN), Tanzania (TZS), Uganda (UGX), South Africa (ZAR), and Zambia (ZMW) and expands the existing NGN (Nigeria) entry from a generic fallback to the rails Nigerians actually use.

Why

Following #625 (MWK), this continues filling out payment methods for African markets where Mostro has real P2P potential. Each of these currencies previously had no dedicated entry (falling through to the generic Bank Transfer / Cash default) or, in NGN's case, a placeholder. Traders in these markets settle through mobile money (M-PESA, MTN MoMo, Airtel Money) and local banks far more than generic bank transfer surfacing the right options reduces friction when two peers agree on how to pay.

Change

Single file: assets/data/payment_methods.json. Six new currency keys inserted in alphabetical order, plus the NGN entry expanded.

Note on NGN: it previously existed as a generic ["Bank Transfer", "Cash"]. This swaps it for Nigeria's dominant fintech and bank rails (OPay, PalmPay, Moniepoint, GTBank, Access Bank, UBA, Zenith Bank), keeping Bank Transfer and Cash as fallbacks. Flagging explicitly since it's a modification, not a pure addition.

Method choices reflect each market's actual usage:

  • KES: M-PESA dominates; plus major banks (Equity, NCBA, Co-operative, Standard Chartered, GTBank, Ecobank), Airtel Money, and Pochi la Biashara (M-PESA's merchant tier).
  • MZN: M-Pesa and e-Mola mobile money; Millennium bim and BCI banks.
  • TZS: M-Pesa, Mixx by Yas (formerly Tigo Pesa), Airtel Money, Halopesa; CRDB Bank.
  • UGX: MTN MoMo and Airtel Money lead; Chipper Cash.
  • ZAR: major banks (Capitec, FNB, Absa, Nedbank, Standard Bank), FNB eWallet, MTN MoMo.
  • ZMW: Airtel Money, MTN MoMo, Zamtel Kwacha; FNB eWallet, Stanbic Bank, SPENN.

Cash is appended to every entry, matching the MWK precedent from #625. (Since a currency with its own entry no longer inherits the default list, Cash has to be listed explicitly for it to remain an option.)

Testing

  • JSON validates (python3 -m json.tool).

  • All new keys are alphabetically ordered; no duplicate methods within any entry.

  • Confirmed the file is loaded at runtime by lib/features/order/providers/payment_methods_provider.dart and bundled via assets/data/ in pubspec.yaml.

  • Verified on a physical device (Nokia C31, Android 12): the payment-method picker renders the new entries correctly.

Summary by CodeRabbit

  • New Features
    • Added payment method support for six new currencies, enabling transactions in additional regions worldwide and expanding global availability.
    • Expanded payment options for existing currencies with more local payment methods, brand-specific options, cash, and traditional bank transfers.
    • Improved overall payment coverage to better serve users with diverse payment preferences and geographic requirements.

@coderabbitai

coderabbitai Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

assets/data/payment_methods.json is updated to add six new African currency entries (KES, MZN, TZS, UGX, ZAR, ZMW) and expands the NGN payment methods from two entries ("Bank Transfer", "Cash") to a larger list including local/brand-specific options.

Changes

Currency Payment Method Mappings

Layer / File(s) Summary
New currencies and NGN expansion
assets/data/payment_methods.json
Adds payment-method arrays for KES, MZN, TZS, UGX, ZAR, and ZMW. Replaces NGN's two-item list with a substantially expanded set of local and branded payment methods. Retains existing entries for MLC, MWK, MXN, PEN, PHP, PYG, USD, and VES within the updated block.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • MostroP2P/mobile#455: Modifies the same assets/data/payment_methods.json file with overlapping currency entries including NGN, PEN, PHP, VES, and MLC.
  • MostroP2P/mobile#471: Directly touches the NGN payment methods block in the same file, which this PR now expands further.
  • MostroP2P/mobile#625: Modifies the MWK currency entry in the same file, which is also present in this PR's updated block.

Suggested reviewers

  • grunch

Poem

🐇 Hop across the savanna wide,
New currencies join the ride!
KES and ZMW take their place,
NGN gets expanded grace.
More ways to pay, the data grows —
A tiny diff, but the map shows! 🌍

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main changes: adding payment methods for six African currencies and expanding the NGN entry, which directly reflects the primary purpose of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@assets/data/payment_methods.json`:
- Around line 15-29: The JSON file contains payment method names in multiple
languages (Spanish terms like "Efectivo", "Transferencia bancaria", "Pago
Móvil"), but the _translatePaymentMethod() function in
payment_methods_section.dart only translates specific English values ("Bank
Transfer", "Cash", "Other"), causing locale inconsistency. Standardize the
payment_methods.json file to use English-only identifiers for all payment
methods across all currency entries (for example, replace "Efectivo" with
"Cash", "Transferencia bancaria" with "Bank Transfer", "Pago Móvil" with "Mobile
Payment"), then ensure the _translatePaymentMethod() function translates these
English identifiers appropriately for different locales.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 77edee94-773a-4b5b-a60d-dd1abfca7805

📥 Commits

Reviewing files that changed from the base of the PR and between 0c3676d and 570a665.

📒 Files selected for processing (1)
  • assets/data/payment_methods.json

Comment thread assets/data/payment_methods.json

@AndreaDiazCorreia AndreaDiazCorreia left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK

@codaMW

codaMW commented Jun 24, 2026

Copy link
Copy Markdown
Contributor Author

This is pre-existing rather than introduced here. The untranslated Spanish terms (Efectivo, Transferencia bancaria, Pago Móvil) belong to VES, MXN, PYG, and PEN all of which were in the file before this PR. The entries I'm adding use English and brand names (M-PESA, Airtel Money, Bank Transfer, Cash), which _translatePaymentMethod() already handles consistently, so this change doesn't widen the gap.
Keeping this PR scoped to the data addition. The localization inconsistency is real but Independent it'd touch payment_methods_section.dart and the existing Spanish entries. Happy to open a separate issue for it if useful.

@grunch grunch left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grunch grunch merged commit 9b275ec into MostroP2P:main Jun 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants