Page MenuHomePhabricator

Use auto-capture when authorizing recurring charges
Open, Needs TriagePublic

Description

In our recurring charge job, we always capture authorized transactions. The API calls are what takes the most time in the job, so if we can cut out the extra capture call, we might be able to charge more donations in less time.

We have added the manualCapture flag to our Adyen API calls but for now it is hardcoded depending on the payment method. The PaymentProvider entry points should accept an option so we can auto-capture from the recurring charge job and maintain the separate capture step from DonationInterface.

Event Timeline

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

[wikimedia/fundraising/SmashPig@master] Auto-capture recurring Adyen payments

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

I tried charging a recurring payment in test with the attached patch setting additionalData.manualCapture to false, but it wasn't automatically captured.

So I guess we would need to turn autocapture back on at the account level, then rely on the manualCapture: true flag being set for all other transactions.