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.
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.
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | Ejegg | T356370 Create variant version of Recurring Upgrade landing page | |||
Resolved | Ejegg | T359578 Redirect to ThankYou wiki after completing upgrade |
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
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)
@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
Change 1009820 had a related patch set uploaded (by Ejegg; author: Ejegg):
[wikimedia/fundraising/crm@master] Add country to getUpgradeableRecur output
Change 1009807 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Slight refactor for recurUpgrade declines
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
Change 1009809 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recur upgrade (DEPLOY NOTE)
Change 1009817 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Redirect to Thank You page on recurring upgrade decline
Change 1009823 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Recur Upgrade: use donor country when none on querystring
Change 1009820 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Add country to getUpgradeableRecur output
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
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
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
OK @ehughes , that change is live on the recurring upgraded form. It should only pass through the YYYY-MM-DD now.