The gravy IDs are unreliable as a trxn_id - we have the trustly ID so ?always? match on that?
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Fix some data issues from gravy IDs in trustly settlement not relating | wikimedia/fundraising/crm | master | +52 -6 |
Related Objects
- Mentioned In
- T419708: Sprint E- Priorities
- Mentioned Here
- rMW857e80f2ccfa: Update git submodules
Event Timeline
Some data tidy up needed as small change in amount on 300 trustly transactions which were incorrectly matched using the ingress gravy ID
Change #1243600 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Fix some data issues from gravy IDs in trustly settlement not relating
So to articulate what I'm seeing ....
https://civicrm.wikimedia.org/civicrm/contact/view?reset=1&cid=37491778
Original Donation
January 4th, 2026 9:34 PM
Net Amount $50.00
Payment Method ACH
Contribution ID 137704363
Invoice Reference 244398214.1
GRAVY 2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f
Backend Processor trustly
Backend Processor Transaction ID 8068948556
Payment Orchestrator Reconciliation ID 1GRo9RXLmSOM6KLP947jFH
At that point a recurring was created
Processor ID 2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f
Transaction ID RECURRING GRAVY 2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f
Invoice ID 244398214.1
Then in Feb a new donation was made
Gateway Transaction ID acd093cb-a454-4708-aeb1-f25702516dd0
Backend Processor trustly
Backend Processor Transaction ID 8088912520
Payment Orchestrator Reconciliation ID 5G601KUfip6OYVXf9J0zbM
Original Amount Received (unconverted) $5.00
But in the trustly settlement report
P11KFUN-3618-20260210120000-20260211120000-0001of0001.csv
Trustly ID 8088912520
And Gravy ID - GRo9RXLmSOM6KLP947jFH
- only the trustly 1 related to the new contribution - the gravy is for the old
I,8088912520,2026-02-04T22:21:06.602Z,8068946921,3618,Deferred,1,51000017,9972,0d4195babc5dc038e5e000c59f2ca3effaa1d7f6627a001ed925f078126049a1,Capture,Completed,2026-02-10T20:14:20.427Z,2026-02-04T23:15:15.175Z,USD,5.00,30095591054,AC118,3304723,Sale,1GRo9RXLmSOM6KLP947jFH,ptx-gGWZtHuYpylLaHiXlaLdiExc,0.00
Smashpig.pending
| 140412206 | 2026-01-04 21:31:54 | gravy | WikimediaDonations | 244398214.1 | 2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f | {"gateway_txn_id":"2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f","response":false,"gateway_account":"WikimediaDonations","fee":0,"gross":"50.00","backend_processor":"trustly","backend_processor_txn_id":"1GRo9RXLmSOM6KLP947jFH","contribution_tracking_id":"244398214","country":"US","currency":"USD","email":"xxxxx@gmail.com","employer":"","gateway":"gravy","language":"en","order_id":"244398214.1","payment_method":"dd","payment_orchestrator_reconciliation_id":"1GRo9RXLmSOM6KLP947jFH","payment_submethod":"ach","recurring":"","user_ip":"","utm_campaign":"C2526_Email4","utm_medium":"email","utm_source":"sp75306996.default~default~SupportingWikipedia~default~control.dd.ach","date":1767562314,"contact_id":"63062290","contact_hash":"","source_name":"DonationInterface","source_type":"payments","source_host":"payments1007","source_run_id":1463175,"source_version":"857e80f2ccfaa462ac72226a13a408b0dcdf4e1f","source_enqueued_time":1767562314} | dd | 1 |
| 140412228 | 2026-01-04 21:34:05 | gravy | WikimediaDonations | 244398214.1 | 2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f | {"gateway_txn_id":"2992e0ce-6b1d-447a-80d1-2a4d11bbcb0f","response":false,"gateway_account":"WikimediaDonations","fee":0,"gross":"50.00","backend_processor":"trustly","backend_processor_txn_id":"8068946921","city":"","contribution_tracking_id":"244398214","country":"US","currency":"USD","email":"@gmail.com","employer":"","first_name":"M","gateway":"gravy","language":"en","last_name":"R","order_id":"244398214.1","payment_method":"dd","payment_orchestrator_reconciliation_id":"1GRo9RXLmSOM6KLP947jFH","payment_submethod":"ach","postal_code":"3","recurring":"","state_province":"FL","street_address":"1","user_ip":"","utm_campaign":"C2526_Email4","utm_medium":"email","utm_source":"sp75306996.default~default~SupportingWikipedia~default~control.dd.ach","date":1767562445,"contact_id":"63062290","contact_hash":"","source_name":"DonationInterface","source_type":"payments","source_host":"payments1007","source_run_id":1140093,"source_version":"857e80f2ccfaa462ac72226a13a408b0dcdf4e1f","source_enqueued_time":1767562445} | dd | |
The transaction WAS in the payments report from gravy - with status 'capture pending' - so where I'm going with this is that for Trustly we can use the settlement report for settlement but try to rely on other methods to ensure it is there (IPNS, payment report) and if it's 'really really not' then manual intervention
Here is the gravy line - it is showing capture_pending & captured at is empty - but there is not another one
more completed/gravy_all_transactions_report_2026_02_05-010203.csv
Gravy ID acd093cb-a454-4708-aeb1-f25702516dd0,
Order 244398214.2,
status capture_pending,
Created at 2026-02-04T22:21:05.887050+00:00,
Updated at 2026-02-04T22:21:07.199437+00:00,
Auhorized at 2026-02-04T22:21:05.964775+00:00
Captured at ,,,
500,USD,0,0,trustly,,
Trusly ID
payment_service_transaction_id 8088912520,
payment_service_id c9695cda-4dd9-4e8b-8f52-b654e46dda23,
trustly-trustly,Trustly
payment_source recurring,1,1,,,,500,succeeded,0,0,0,,0,
intent: authorize,
reconciliation_id5G601KUfip6OYVXf9J0zbM
It's interesting the backend_processor_txn_id flips from a gravy id to a trustly id between the auth and capture, gravy has both an auth id and capture id in their console. Is it us doing that or gravy, we should look into that
Change #1243600 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Fix some data issues from gravy IDs in trustly settlement not relating