Page MenuHomePhabricator

Store Adyen ShopperReference (processor_contact_id) in new custom field
Closed, ResolvedPublic

Description

We've been storing it in the invoice_id field of the contribution_recur table, which has a unique constraint on it.

Unfortunately, some tokens used for multiple active Ingenico recurring contributions have been mapped on the Adyen side to a single ShopperReference.

Ideally the ShopperReference would uniquely identify a single donor, but since we don't have accounts, we need to be able to have different ShopperReference values for each recurring contribution. We also need to be able to re-use the same ShopperReference value for multiple recurring contributions, which we can't do while we store it in a field with a unique constraint.

Add a new field to contribution_recur_smashpig, copy existing values from contribution_recur.invoice_id, and update code to store and read from the new field.

Event Timeline

Ejegg updated the task description. (Show Details)

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

[wikimedia/fundraising/crm@master] Create new field for Adyen Shopper Reference

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

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

[wikimedia/fundraising/crm@master] Regenerate SmashPig Civix files

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

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

[wikimedia/fundraising/crm@master] Copy invoice_id to processor_contact_id

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

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

[wikimedia/fundraising/crm@master] WIP store and retrieve ShopperReference from new field

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

Change 966566 merged by Ejegg:

[wikimedia/fundraising/crm@master] Regenerate SmashPig Civix files

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

Change 966557 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Create new field for Adyen Shopper Reference

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

OK, I'm feeling more comfortable with this. I've tried recurring cc and iDEAL donations and they record and charge just fine.

Change 966579 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Copy invoice_id to processor_contact_id

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

Change 966590 merged by jenkins-bot:

[wikimedia/fundraising/crm@master] Store and retrieve ShopperReference from new field

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

XenoRyet set Final Story Points to 2.