Page MenuHomePhabricator

We are sending two pending messages for many gravy transactions
Open, Needs TriagePublic

Description

For transactions with an Adyen backend, we get one with the backend_processor_transaction_id = the Adyen auth PSP reference, and one with backend_processor_transaction_id = Adyen capture PSP reference. We seem to luck out and get the auth PSP reference stored in Civi's custom field.

This makes the pending txn resolver take longer than it should and make more API calls than it should, as well as potentially leaves us with inaccurate data.

We should only send one, and try to make sure it has the correct backend processor transaction ID that matches what we store for backend processors.

The markMessageSent function in gatewayAdapter should prevent us sending two messages to the same queue for the same order ID, but it's not doing it.

Event Timeline

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

[mediawiki/extensions/DonationInterface@master] Stop sending pending messages with adyen capture ID

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

OK, part of the issue is that we're clearing out the session (including the sent message keys) in finalizeInternalStatus before we actually push the message to the queue.

Change #1240376 merged by jenkins-bot:

[mediawiki/extensions/DonationInterface@master] Stop sending pending messages with adyen capture ID

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