Page MenuHomePhabricator

Update Pending Transaction Resolver to handle PayPal
Closed, ResolvedPublic4 Estimated Story Points

Description

(at least) two changes are needed in the approvePaymentAndReturnStatus function to make the Resolve action handle the PayPal flow, both in the $approveResult->isSuccessful() block.

  • get donor details from $statusResult->getDonorDetails and when present, add them to the $donationsMessage array.
  • if the pending row says this was a recurring donation, and the $provider object supports creating recurring profiles (see T323962), call $provider->createRecurringPaymentsProfile()

Event Timeline

Dwisehaupt set the point value for this task to 4.Dec 12 2022, 9:26 PM

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

[wikimedia/fundraising/SmashPig@master] Rename 'token' param in getLatestPaymentStatus

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

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

[wikimedia/fundraising/SmashPig@master] Fix PaymentActionNotInitiated status mapping

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

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

[wikimedia/fundraising/crm@master] Allow info from status call to overwrite blank keys

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

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

[wikimedia/fundraising/crm@master] Make pending txn resolver work for PayPal

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

Change 883651 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Rename 'token' params in PayPal API calls

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

Change 884147 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Fix PaymentActionNotInitiated status mapping

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

Change 884148 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Allow info from status call to overwrite blank keys

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

Change 884149 merged by Wfan:

[wikimedia/fundraising/crm@master] Make pending txn resolver work for PayPal

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

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

[wikimedia/fundraising/crm@master] Initiate recurring profiles in PayPal resolver

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

Change 886129 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Initiate recurring profiles in PayPal resolver

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

I got this working on a single-donation run by deploying the correct credentials to SmashPig config. The old job is disabled and the new job should run every 10 minutes.

There's still some DonationInterface config under the civicrm config that we can clean up

Dwisehaupt claimed this task.
Dwisehaupt set Final Story Points to 4.