Page MenuHomePhabricator

Allow rendering MC modal outside of ResultSwitcher
Closed, ResolvedPublic

Description

The existing Monthly Convert modal only renders on the Ingenico ResultSwitcher. At least one required config value is only set in the ResultSwitcher, and the modal pops up as soon as the page is rendered in the browser

The new Adyen flow doesn't use a ResultSwitcher for most card payments - instead we do the whole payment while the user is on Special:AdyenCheckoutGateway and do a client-side redirect to the thank-you page when it's complete.

  • Move the required config (thank you page URL and potentially, amount levels) to the parent GatewayPage setClientVariables.
  • Render the modal on Special:AdyenCheckoutGateway but hide it in css
    • Potentially include a property on the AdyenCheckoutGateway and IngenicoGatewayResult special page classes to indicate that donations can complete on that page as a flag to consult.
  • Show the modal when the donation completes (in handleApiResult)
  • Edit monthlyConvert js to not immediately show the modal

Event Timeline

We were discussing this today on a call and wondering if we could inject the markup for the MC modal via the setClientVariables route instead of hiding it in the forms, that way we'd inject it at the same place across both gateways.

This might be a non-starter if the view variables needed at this point in the flow aren't yet available to pass onto the moustache partial.

Change 756545 had a related patch set uploaded (by Damilare Adedoyin; author: Damilare Adedoyin):

[mediawiki/extensions/DonationInterface@master] WIP: Allow rendering MC modal outside of ResultSwitcher

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

Change 756545 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Allow rendering MC modal outside of ResultSwitcher

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

DStrine set Final Story Points to 4.
DStrine changed Final Story Points from 4 to 2.