Update Braintree Order ID after successful payment
Closed, ResolvedPublic

Description

Braintree Order ID isn't updated on the form after user puts in a successful donation, this in turn causes a "Processor Decline" status on subsequent transactions.

Event Timeline

This could be related to Monthly Convert. For non-MC countries, we clear out the session after a successful donation so reloading the form always regenerates the ct_id and the order id which is derived from the ct_id.

For MC countries, there is the possibility that we could get an add-on donation after the one-time donation is done, so we have not been clearing out the session. A possible solution would be for MC countries, after one-time donations, to copy the 'Donor' session value to a 'MC-Donor' session value and still clear out Donor. Then any full form reloads would see the empty Donor key and regenerate the Order ID. For the MC API call we would move the MC-Donor value back to Donor before creating the adapter so that it can use its existing logic to pick up ct_id and order_id values from the session and send the MC message.

greg triaged this task as Medium priority.Aug 12 2022, 8:43 PM

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

[mediawiki/extensions/DonationInterface@master] WIP: Move donor to temp to allow multiple donations

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

Change 824806 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Backup Donor session to allow additional donations

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

Ejegg claimed this task.