Page MenuHomePhabricator

For PayPal via Gravy, show appropriate text when donor cancels
Closed, ResolvedPublic

Description

Under Gravy, a donor who starts a donation via PayPal but clicks 'Cancel and return to Wikimedia Foundation' is returned to a page stating that " There was an error processing your request.
There are other ways to give, including PayPal, check, or mail. "

We may need Gravy to change their code so we can tell when the donor clicks cancel, as the return value sent to us just looks like a failed authorization.

With our direct connection, when a donor presses the cancel button at a PayPal donation, we redirect them to the Ways To Give page. We could do that, or show alternate text for the error page that reads

"Your transaction was successfully cancelled.
Didn't mean to cancel? You can <a href=\"$1\">go back</a>, try one of our <a href=\"$2\">other ways to give</a>, or contact us at <a href=\"mailto:$3\">$3</a>",

Event Timeline

AKanji-WMF subscribed.

May require changes in Gravy's API response before we can action

The error code "cancelled_buyer_approval" comes with the transaction object when the Payment is cancelled, perhaps we can use this to navigate the user to the ways to give page like the direct connection.

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

[wikimedia/fundraising/SmashPig@master] Create Cancelled status for gravy buyer approval cancel status

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

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

[mediawiki/extensions/DonationInterface@master] Create Cancelled status for gravy buyer approval cancel status

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

Change #1187470 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Create Cancelled status for gravy buyer approval cancel status

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

Change #1187481 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Create Cancelled status for gravy buyer approval cancel status

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

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

[mediawiki/extensions/DonationInterface@master] Show cancelled error page on redirect

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