Page MenuHomePhabricator

Always route Gravy recurring transactions through their original connection
Open, Needs TriagePublic

Description

We've seen elevated failure rates trying to make recurring charges after flow rules change, sending the subsequent charge through a different processor than the first one. This is especially a problem for countries where we use DLocal rather than Adyen.

See if we can add some metadata to these API calls instructing Gravy to send the payment through the same processor as originally used.

Event Timeline

Looks like we would do this by adding the payment_service_id to the createPayment call: https://docs.gr4vy.com/reference/transactions/new-transaction#body-payment-service-id-one-of-0

But... we need to save it as a UUID somewhere on our side, rather than the string we're using for backend_processor_id

Change #1275495 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[wikimedia/fundraising/SmashPig@master] Capture payment_service_id from Gravy responses

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

Change #1275496 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[mediawiki/extensions/DonationInterface@master] Add payment_service_id from Gravy into queue message

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

Change #1278542 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[wikimedia/fundraising/crm@master] Store and replay payment_service_id for Gravy recurring charges

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

Change #1275495 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Capture payment_service_id from Gravy responses

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

Moving back to needing review. This one is not yet pending deployment. 1/3 of the patches have been merged so far.

There are another two patches which still need review from the team https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/crm/+/1278542 (same Gerrit topic), and I need to update smashpig to pull in the smashpig patch for the DI patch to make it pass on CI https://gerrit.wikimedia.org/r/c/mediawiki/extensions/DonationInterface/+/1275496

Change #1275496 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Add payment_service_id from Gravy into queue message

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

Change #1278542 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Store and replay payment_service_id for Gravy recurring charges

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