Page MenuHomePhabricator

Create Ingenico orphan rectifier maintenance script
Closed, ResolvedPublic2 Estimated Story Points

Description

Implement this as a SmashPig maintenance script. It will have similar behavior to the GlobalCollect orphan rectifier, but it will identify pending payments by the hostedCheckoutId.

Event Timeline

ggellerman triaged this task as Medium priority.May 2 2017, 9:26 PM
ggellerman set the point value for this task to 2.
ggellerman moved this task from Triage to Sprint C Feb 15 - March 1 on the Fundraising-Backlog board.

Change 435003 had a related patch set uploaded (by Mepps; owner: Mepps):
[mediawiki/extensions/DonationInterface@master] Add cancelPayment for rectifyOrphan

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

Change 435003 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Add cancelPayment for rectifyOrphan

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

@Ejegg I'm testing this locally but it's not finding the IngenicoAdapter class. I notice it's not in vendor/autoload.php but don't know why it's missing.

Oho, do we need to export it specifically in DonationInterface's composer.json? I think that lists a few of the other adaptors.

Or we could add parameter maps to SmashPig for the necessary functions and cut out DonationInterface entirely :)

Change 440884 had a related patch set uploaded (by Ejegg; owner: Ejegg):
[mediawiki/extensions/DonationInterface@master] Add ingenico to composer classmap

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

Change 440884 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Add ingenico to composer classmap

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

Current issue: reliance on Title class in defineTransactions. Solution - set in defaults and add option as in globalcollect.

Change 441243 had a related patch set uploaded (by Mepps; owner: Mepps):
[mediawiki/extensions/DonationInterface@master] WIP: Return url without Title Class for Ingenico

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

Change 441423 had a related patch set uploaded (by Mepps; owner: Mepps):
[wikimedia/fundraising/crm@master] Add returnUrl, remove returnTitle

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

Change 441243 merged by jenkins-bot:
[mediawiki/extensions/DonationInterface@master] Return url without Title Class for Ingenico

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

Change 441423 abandoned by Mepps:
Add returnUrl, remove returnTitle

Reason:
I assume we no longer need this.

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

It's on me to check in on this. Last I remember I had tested my patch locally and it worked but I need to retest and confirm.

@Ejegg so the latest here is that I'm getting an error when I try to run the drush script "Class 'IngenicoAdapter' not found" but I can't figure out why.

So I'm running it locally and not getting a lot of feedback. I'm going to work on adding more because it's not deleting the orphans from the smashpig db.

We saw 227 Ingenico donations stopped @ 600 between 2018-09-05 1:07 and 2018-09-05 23:09 - this rate is more than Donor Services can manually settle.

Per {T194543} is it possible technically to have a script on hand for manually settling batches of status 600s (where we could upload a .csv, to push them through), until the Ingenico orphan rectifier is working?

This is a donor-facing issue and I am hoping we can get this working before too many more donors experience this.

Okay making progress, for some reason I needed to add time=0 which is a little curious because I got a bunch of orphans with that parameter and none without. I'm seeing also error messages that may be expected because I'm testing with 3d secure..

Set bogus return url to create testing orphans without 3d secure.

Hmm now I've got a valid visa orphan but I'm getting an error of: [debugMessage:protected] =} Mastercard third rail

It tunrs out that maps to this status in GlobalCollectAdapter:
"case 430354: // issuer unknown"
That error message seems misleading.

mepps added a subscriber: XenoRyet.

I got donations in the db locally with the script as it is. Does someone else want to test? @Ejegg? @XenoRyet? I do think the orphan slayer module could use some batching though because the paypal one times out.

To test this:

  1. Change the returnTo url for Ingenico in setGatewayDefaults in IngenicoAdapter
  2. Enter a donation with a test credit card from https://epayments.developer-ingenico.com/documentation/testcases/ and make sure the currency amount and type match the approval requirements. City should be Amsterdam.
  3. run Smashpig/Maintenance/ConsumePendingQueue.php
  4. run drush orphan-slayer ingenico --time=0
  5. run drush qc
  6. Check for donation in civi :)

Following the steps I was able to get donations to the db locally as well.

@Ejegg should we go ahead and turn this on? We'd need to add settings to donationinterface.settings.php and create the job.

Sure! Let's go for it. We won't need to add credentials there, at least, as those are all handled via SmashPig for Ingenico.

Put it on my calendar for Monday.

@mepps @Ejegg should Ingenico’s stopped at 600 show their filter scores? Today I’m seeing ‘empty sets’ for them when I specify gateway='ingenico' & use the new ‘4000…’ order IDs. I tried searching a Merchant Reference # as well but see no data.

spun off into T204872