Skip to content

Fix :TCB Payment Notification overwritten to Duplicate after concurrent IPN processing#22

Merged
av-dev2 merged 1 commit intoAakvatech-Limited:developfrom
LISACORNEL:latest-fix
Apr 20, 2026
Merged

Fix :TCB Payment Notification overwritten to Duplicate after concurrent IPN processing#22
av-dev2 merged 1 commit intoAakvatech-Limited:developfrom
LISACORNEL:latest-fix

Conversation

@LISACORNEL
Copy link
Copy Markdown
Collaborator

Summary
When TCB fires the same IPN multiple times simultaneously, the MySQL named lock serializes the workers correctly — but the late workers, after waking from the lock, would call _finalize("Duplicate", payment_entry="", sales_order="") on the same notification row that the winning worker had already marked Processed. This blanked the payment_entry and sales_order links on the record.
Fix: before calling _finalize("Duplicate", ...), check the current status of the notification row. If it is already Processed, skip the finalize — the winning worker's data is left intact.

@LISACORNEL LISACORNEL changed the title Fix TCB Payment Notification overwritten to Duplicate after concurrent IPN processing Fix :TCB Payment Notification overwritten to Duplicate after concurrent IPN processing Apr 20, 2026
@av-dev2 av-dev2 merged commit e016337 into Aakvatech-Limited:develop Apr 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants