Page MenuHomePhabricator

Prevent to assign order id to processor_contact_id
Closed, ResolvedPublicBUG REPORT

Description

Validation error during recurring charge, in field: processor_contact_id. Message: Input should be a valid UUID, invalid character: expected an optional prefix of urn:uuid: followed by [0-9a-fA-F-], found .
248169602.1
248170334.1
248169925.1
248140922.1
248169660.1
248139545.1
248138563.1
248133159.1

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
XenoRyet triaged this task as High priority.Jul 6 2026, 7:48 PM

Change #1309698 had a related patch set uploaded (by Wfan; author: Wfan):

[wikimedia/fundraising/SmashPig@master] set the processor_contact_id to null if not uuid

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

Change #1309698 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] set the processor_contact_id to null if not uuid

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

select entity_id, processor_contact_id from civicrm_contribution_recur cr JOIN civicrm_contribution_recur_smashpig crs ON crs.entity_id = cr.id WHERE cr.payment_processor_id = 19 AND crs.processor_contact_id IS NOT NULL AND crs.processor_contact_id NOT REGEXP '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' AND cr.cancel_date IS NULL;

+-----------+----------------------+

entity_idprocessor_contact_id

+-----------+----------------------+

2819316248133922.1
2819319248140664.1
2819325248170032.1
2819366248397423.1
2820095248169661.1
2820096248169670.1
2820098248170072.1
2820196248420030.1
2820480248169984.1
2820485248169794.1
2820486248169854.1
2827412248649937.1
2827413248648953.1
2829405248648126.1
2829406248648452.1
2829407248648776.1
2829408248649536.1
2829409248650233.1
2829410248650894.1
2829411248650993.1
2842709249038625.1
2842712249061167.1
2843532249164367.1
2843909249115985.1
2843910249161769.2
2845119249162142.1
2852620249240955.1
2854229249355336.1
2854230249373870.1
2854689249460156.1
2854690249459943.1
2854691249460544.1
2854692249461174.1
2854693249461404.1
2856387249458583.1
2856388249458970.1
2856389249459004.1
2856390249459420.1
2856391249459692.1
2856392249460700.1
2856393249461266.1
2856394249461502.1
2862305249571057.1

+-----------+----------------------+

then I cleaned up:
UPDATE civicrm_contribution_recur_smashpig SET processor_contact_id = NULL WHERE entity_id IN (xxx,xxxx);

We hunted down that they are getting into civi in the first place from the adyen audit, the adyen adyen transactions use this column while gravy adyen doesnt. The adyen audit wins over the gravy audit so they are coming in from that. To plug the hole we can add a catch to exclude gravy adyen from adding this field in the audit

https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/SmashPig/+/819220 some history reference of why we have assigned processor_contact_id as order_id to get tokenization info from adyen if not there.

Change #1312011 had a related patch set uploaded (by Wfan; author: Wfan):

[wikimedia/fundraising/crm@master] Do not assign processor_contact_id from order id if not need to tokenize

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

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

[wikimedia/fundraising/SmashPig@master] Only assign valid UUIDs to gravy buyer_id

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

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

[wikimedia/fundraising/SmashPig@master] Fix validator mutation for buyer_id and names

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

Change #1314123 abandoned by Ejegg:

[wikimedia/fundraising/SmashPig@master] Only assign valid UUIDs to gravy buyer_id

Reason:

Fixing WFan's filter instead: I103d17e77f8367882c19d842593a8afaccb06cb8

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

Change #1314127 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Fix validator mutation for buyer_id and names

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

XenoRyet set Final Story Points to 4.

Change #1312011 abandoned by Wfan:

[wikimedia/fundraising/crm@master] Do not assign processor_contact_id from order id if not need to tokenize

Reason:

https://gerrit.wikimedia.org/r/c/wikimedia/fundraising/SmashPig/+/1309698 catch it before send for process

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

Change #1312011 restored by Wfan:

[wikimedia/fundraising/crm@master] Do not assign processor_contact_id from order id if not need to tokenize

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