You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor mobile money channel resolution and inject provider per tran… (#121)
Refactor mobile money channel resolution and inject provider per transaction
Replaces the implicit MPesa-only assumption with an explicit SupportedChannel
model and a configurable provider allowlist on ChargeViewModel. The selected
MobileMoneyChannel is now threaded through ChargePaymentType, MPesaChargeView,
and MPesaChrageViewModel so the charge request uses the chosen provider's key
instead of always picking the first channelOption.
- Adds Sources/PaystackUI/Charge/Models/SupportedChannel.swift with id, title,
and image per channel (card + per-provider mobile money).
- Renames verifyAccessCodeAndProceedWithCard -> verifyAccessCodeAndProceed and
splits it into resolveSupportedChannels / nextState helpers; auto-routes
single-channel cases and falls back to channel selection otherwise.
- Drops the SupportedChannels enum / PaymentChannel wrapper in
ChannelSelectionView in favour of iterating SupportedChannel directly.
- Adds resolver coverage in ChargeViewModelTests (allowlist filtering,
auto-route, channel selection, transactionDetails regression guard) and
updates MPesaChrageViewModelTests to verify the injected provider key is
forwarded to the repository.
0 commit comments