Page MenuHomePhabricator

Extract gateway selection from GatewayChooser into a reusable GatewayRouter
Closed, ResolvedPublic

Description

GatewayChooser decides which payment gateway should handle a donation based on the country, currency, payment method, and the configured priority rules, but that logic is encapsulated in private and instance methods tied to the special page's request and output state, so it can only be used inside the redirect flow. The ComboWiki single-page donation flow needs the same routing to create a processor-specific payment session on demand when the donor picks a method, without going through the redirect flow. Let's extract the selection logic into a stateless GatewayRouter class.

This is preliminary work for the ComboWiki process-specific payment session API bootstrapping calls.

Event Timeline

replied to wrong ticket, twice :)

replied to wrong ticket, twice :)

Change #1306917 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[mediawiki/extensions/DonationInterface@master] Extract gateway selection into a reusable GatewayRouter

https://gerrit.wikimedia.org/r/1306917

Change #1306917 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Extract gateway selection into a reusable GatewayRouter

https://gerrit.wikimedia.org/r/1306917

AKanji-WMF set Final Story Points to 4.