Page MenuHomePhabricator

Order ID regeneration on recurring change is not functioning, leads to missing token failmail.
Closed, ResolvedPublic

Description

Donor starts a recurring donation, message with recurring=1 and order_id 12345.1 is sent to pending queue

Donor does not finish, message stays on pending queue

Donor starts a non-recurring donation. In session_resetOnSwitch, we note the change in recurring status and clear order_id out of session. However, we maintain the contribution_tracking_id. DonationData regenerates same order_id from contribution_tracking_id.

Message with recurring=0 and order_id 12345.1 is sent to pending queue.

IPN comes in with order_id 12345.1.

Record capture job (different class depending on gateway) combines the data from the first pending message with the IPN to send a message to the donations queue with recurring=1 but no subscr_id or payment token.

Failmail

Event Timeline

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

[mediawiki/extensions/DonationInterface@master] Fix order_id reset on recurring change

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

Thank you so much for the detailed explanation of how this bug manifests! Really helpful.

Change 842446 had a related patch set uploaded (by Jgleeson; author: Jgleeson):

[mediawiki/extensions/DonationInterface@master] Add test for new gateway adapter session_resetOnSwitch scenario

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

Change 842021 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Fix order_id reset on recurring change

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

Change 842446 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Add test for new gateway adapter session_resetOnSwitch scenario

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