Page MenuHomePhabricator

Redirect to ThankYou wiki after completing upgrade
Closed, ResolvedPublic2 Estimated Story Points

Description

Instead of rendering the success message, redirect to a page on ThankYou wiki, passing the new amount, currency, country, and next donation date as parameters on the URL.

@ehughes to confirm format of the parameters and the TY page URL.

Event Timeline

Hey @Ejegg , I spoke to @Pcoombe and we think the best way to do this is just to use the regular TY page URL with parameters to switch the copy as the rest of the page is staying the same. So the URL would be https://thankyou.wikipedia.org/wiki/Thank_You/en
and then we can pass in something like recurUpgrade (0 or 1), recurAmount, recurDate? If the date format is YYYY-MM-DD then I can format it with JS to display in full on the page. Does that work for you?

OK @ehughes, I'll pass in e.g.

recurUpgrade=1&recurDate=2024-03-24&recurAmount=3.75&recurCurrency=USD&country=US

Change 1009807 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Slight refactor for recurUpgrade declines

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

Change 1009809 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recur upgrade (DEPLOY NOTE)

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

@ehughes, when they decline to upgrade, we just send recurUpgrade=0, right (and maybe the country)? No need for date or amount in that case?

Change 1009817 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recurring upgrade decline

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

Change 1009820 had a related patch set uploaded (by Ejegg; author: Ejegg):

[wikimedia/fundraising/crm@master] Add country to getUpgradeableRecur output

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

Change 1009807 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Slight refactor for recurUpgrade declines

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

Change 1009823 had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Recur Upgrade: use donor country when none on querystring

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

Change 1009809 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recur upgrade (DEPLOY NOTE)

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

Change 1009817 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recurring upgrade decline

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

Change 1009823 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Recur Upgrade: use donor country when none on querystring

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

Change 1009820 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Add country to getUpgradeableRecur output

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

@ehughes, when they decline to upgrade, we just send recurUpgrade=0, right (and maybe the country)? No need for date or amount in that case?

@Ejegg Yep thats correct! Thanks :)

OK, the redirect part of this is done - either outcome on the form (upgrade or cancel) now redirects to ThankYou wiki with the params we discussed

Ejegg set the point value for this task to 2.
Ejegg set Final Story Points to 2.

Change rEBQC1010700ee05c had a related patch set uploaded (by Ejegg; author: Ejegg):

[mediawiki/extensions/DonationInterface@master] Don't add time to date on redirect URL

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

Hi @Ejegg and @ehughes I need to QA these pages and share with email, please could you share the links?

Hey @Ejegg thanks for all of this! Would it be possible for the date to come through as standard ISO format? There is an extra +00 on the end which I believe refers to the time but its giving me invalid date errors when trying to convert this format on the front end.
so could recurDate=2024-04-06+00 instead be recurDate=2024-04-06

Hi @ehughes, I've got a patch in review to strip the time off and just send those first ten chars: https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DonationInterface/+/1010700

Hopefully I will have that deployed later today.

Change rEBQC1010700ee05c merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Don't add time to date on redirect URL

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

OK @ehughes , that change is live on the recurring upgraded form. It should only pass through the YYYY-MM-DD now.