Page MenuHomePhabricator

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


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

Ejegg created this task.Apr 26 2017, 9:45 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 26 2017, 9:45 PM
ggellerman triaged this task as Medium priority.May 2 2017, 9:26 PM
ggellerman set the point value for this task to 2.

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

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

mepps added a comment.Jun 18 2018, 2:09 PM

@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.

Ejegg added a comment.Jun 18 2018, 3:28 PM

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

Ejegg added a comment.Jun 18 2018, 3:30 PM

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

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

mepps added a comment.Jun 18 2018, 6:18 PM

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

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

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

Change 441423 abandoned by Mepps:
Add returnUrl, remove returnTitle

I assume we no longer need this.

mepps added a comment.Sep 4 2018, 8:17 PM

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.

mepps added a comment.Sep 6 2018, 12:03 AM

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.

mepps added a comment.Sep 7 2018, 2:41 PM

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..

mepps added a comment.Sep 7 2018, 4:43 PM

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

mepps added a comment.Sep 7 2018, 8:00 PM

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

mepps added a comment.Sep 7 2018, 8:04 PM

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.

mepps added a comment.EditedSep 11 2018, 4:55 PM

To test this:

  1. Change the returnTo url for Ingenico in setGatewayDefaults in IngenicoAdapter
  2. Enter a donation with a test credit card from 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.

Ejegg added a comment.Sep 14 2018, 7:36 PM

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.

mepps added a comment.Sep 14 2018, 7:51 PM

Put it on my calendar for Monday.

mepps closed this task as Resolved.Sep 18 2018, 8:11 PM

This is deployed.

MBeat33 added a comment.EditedSep 19 2018, 6:10 PM

@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