Page MenuHomePhabricator

Adyen audit file completing but trxn missing
Open, Needs TriagePublic

Description

Last week one contribution tracking resulted in 3 contributions for CID 56972047

which can be seen here

2 of them wound up with the same gateway_txn_id and one of those then didn't get settlement data

  • order ID 240553123.1
idtrxn_idlog_datelog_actionsourceadyen
134139252GRAVY 11bba11f-ea71-4684-9014-dd3dd28cabb92025-11-25 10:45:55InsertSmashPigHGHXVXHP2BRBVZ99
134213556GRAVY 29e760b9-6ed3-4f21-9cb9-ad96186c9b562025-11-26 12:53:07Insertadyen Recon AuditorBG5TCXWZFZW297B9
134225317GRAVY 5523ffbf-28a2-48cf-b088-f5c3703610382025-11-26 22:50:06Insertgravy Recon AuditorHGHXVXHP2BRBVZ99

missing one

So - from an adyen audit processor pov it got there before gravy & failed to create the missing one...

HGHXVXHP2BRBVZ99 2aenYqT8nagQnVFTJf24Lo

Event Timeline

@Cstone just fyi - I think you are looking at others like this - but this was a bit earlier

Looks like they somehow hit the payment API 3 times in the same second with the same information:

I see log lines in triplicate if I run
zgrep 240553123 payments*20251126* | sort -k3 | less

In gravy.js we take pains to avoid a double submission of card payments with debounce and disabling the submit buttons. But for the google pay button we don't seem to do anything to prevent multiple clicks. Let's debounce the handleGooglePayButtonClick function and maybe also disable the button when we start processing the first click.

OK - looking at it the error happened in the Smashpig processing from the IPN

This one was cross matched

https://civicrm.wikimedia.org/civicrm/contact/view/contribution?reset=1&action=view&id=134139252

"id": "11bba11f-ea71-4684-9014-dd3dd28cabb9",
"reconciliation_id": "XScDYni4lf3Rz2xIzjSUT",

But wound up in Civi with a that ID matched to ['5523ffbf-28a2-48cf-b088-f5c370361038', '2aenYqT8nagQnVFTJf24Lo'],

SO the trxn_id and payment processor reconciliation ID are from different transactions

If we retrieved Pending using sql that prioritises the correct one it looks like

select * FROM smashpig.pending WHERE order_id LIKE '240553123%' ORDER BY (gateway_txn_id = '11bba11f-ea71-4684-9014-dd3dd28cabb9') DESC, (message LIKE 'HZPXFQZ29CB2XP69') DESC

Change #1214730 had a related patch set uploaded (by Eileen; author: Eileen):

[wikimedia/fundraising/SmashPig@master] Add ability to prioritise pendings by gateway_txn_id, message string

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

Change #1214730 merged by jenkins-bot:

[wikimedia/fundraising/SmashPig@master] Add ability to prioritise pendings by gateway_txn_id, message string

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