Page MenuHomePhabricator

Render recurring upsell on result switcher
Closed, ResolvedPublic2 Story Points

Description

We need to be able to render a recurring upsell ask on the resultswitcher page (what the donor hits when they come back from the processor).

  • How do we decide what monthly amount to ask for?
  • GatewayPage subclass can add a method for supportsRecurringUpsell
  • Should be a standalone mustache form

Details

Related Gerrit Patches:
mediawiki/extensions/DonationInterface : masterRender recurring upsell (USD only)
mediawiki/extensions/DonationInterface : masterMove ui_modules handling to Mustache class
mediawiki/extensions/DonationInterface : masterConsult session for variant
mediawiki/extensions/DonationInterface : masterAdd 'variant' to session fields, add test
mediawiki/extensions/DonationInterface : masterCommon base for result pages

Related Objects

Event Timeline

Ejegg created this task.Feb 19 2019, 9:25 PM
Ejegg added a comment.EditedFeb 19 2019, 9:40 PM

@CCogdill_WMF, @Pcoombe, @MeganHernandez_WMF, @spatton, is there a standard formula for what recurring amount we should ask for, based on the one-time donation amount? Should the recurring amount be editable?

Should we use the design from slide 1 or one of the designs from slide 7? If we're using one of the one with a 'Yes, but a different amount' link, what does the next step look like?

@spatton 's latest note on the epic:

@Ejegg, here's a coded version from Eric and Randy @ Trilogy, along with their notes on functionality:

https://design.bytrilogy.com/wikipedia-recurring-upsell

General Notes

Fine to use the modal already on the payments page, they just included their own in the mockup for design purposes.
Suggested upsell amount

ru.setUpsellAsk(amount) is a function that returns the suggested upsell amount based on the amount of the initial donation. It will also need to format the amount correctly based on the country/currency; this is hardcoded to U.S. $ for now (see lines 276-279). Current implementation on fundraising banner uses frb.formatCurrency(currency, upsellAmount, language).
Button/link behavior

“Yes” button creates a recurring transaction for suggested upsell amount
“No” button or “X” link redirects user to standard receipt/thank you page
“Yes, but for a different amount” link shows second screen (implemented)
“Donate Monthly” button validates the amount entered by the user (shows correct .ru-error if invalid) and creates a recurring transaction for the entered amount
Validation function like validateForm(form) should do the trick
“<-“ link goes back to first screen (implemented)

Ejegg claimed this task.Jun 4 2019, 5:06 PM
Ejegg triaged this task as Medium priority.
Ejegg moved this task from Backlog to Doing on the Fundraising Sprint King Kong vs. Mozilla board.
Ejegg set the point value for this task to 2.

Change 515114 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] WIP render recurring upsell

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

Change 515246 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Common base for result pages

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

Change 516454 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Add 'variant' to session fields, add test

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

Change 517149 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Consult session for variant

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

Change 517150 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Move ui_modules handling to Mustache class

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

Change 515246 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Common base for result pages

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

Change 516454 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Add 'variant' to session fields, add test

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

Change 517149 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Consult session for variant

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

Change 517150 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Move ui_modules handling to Mustache class

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

Change 515114 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Render recurring upsell (USD only)

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

Ejegg added a comment.Jun 27 2019, 3:47 AM

Initial version of this is deployed, just rendering the upsell ask but not actually wired up to make the recurring contribution or redirect to the thank you page when closing.

I notice we need an overlay behind the popup to disable the other form fields and card buttons.

XenoRyet closed this task as Resolved.Jul 23 2019, 8:02 PM