You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What are you trying to do?
Get the refund transaction on the EVENT_AFTER_REFUND_TRANSACTION event.
Right now, the event only passes the parent transaction and the amount.
But if we need the reference, or more specifically the transactionId, of the refund itself we need to make another query for the latest transaction where the parentId is the transaction we're refunding.
This is a race condition and a poor implementation when the refund transaction could be passed in the event.
What's your proposed solution?
The code here triggers the event and creates a RefundTransactionEvent.
The Event structure should have an optional property reference to the $refundTransaction, which is created a few lines earlier.
It can't be a required property since the BEFORE event wont have it.
The text was updated successfully, but these errors were encountered:
What are you trying to do?
Get the refund transaction on the EVENT_AFTER_REFUND_TRANSACTION event.
Right now, the event only passes the parent transaction and the amount.
But if we need the reference, or more specifically the transactionId, of the refund itself we need to make another query for the latest transaction where the parentId is the transaction we're refunding.
This is a race condition and a poor implementation when the refund transaction could be passed in the event.
What's your proposed solution?
The code here triggers the event and creates a RefundTransactionEvent.
The Event structure should have an optional property reference to the $refundTransaction, which is created a few lines earlier.
It can't be a required property since the BEFORE event wont have it.
The text was updated successfully, but these errors were encountered: