select p.id, p.trk_archived from paymenttransaction.blc_payment p
join paymenttransaction.blc_payment_transaction pt on p.id = pt.payment_id
where p.trk_archived = 'Y'
and p.audit_updater = 'anonymous'
and pt.status = 'SUCCESS'
and (pt.type = 'AUTHORIZE' or pt.type = 'AUTHORIZE_AND_CAPTURE')
and pt.management_state = 'AUTOMATIC_REVERSAL_NOT_ALLOWED';
Note
|
If these payments were archived via the read all cart payments endpoint, then we expect the audit_updater to be anonymous indicating that the anonymous user’s lookup of their payments after the TTL expired caused the archival. Additionally, we check that the payment has a successful checkout transaction (Authorize or AuthorizeAndCapture) & that the transaction’s management_state is AUTOMATIC_REVERSAL_NOT_ALLOWED , indicating that the checkout was successfully completed.
|