I am using third-party integration for on-site credit/debit card payment functionality.
With a purpose to audit transactions and as well as for order status flow customization, I need to save customer and payment related details in custom table.
But whenever, any error is detected from third-party gateway(i.e. Insufficient balance) while placing an order and thus invoking authorize/capture request to third party gateway, Magento rollbacks transaction including my custom table audit entries. I know, reverting transaction to its begin stage is a perfect thing for data integrity and according to standard Magento architecture, but I just do not want to get my custom entries in my custom table to get rolled back.
How do I prevent Magento from doing this?
Can observer(dispatchEvent) be used to audit data as I am not sure if observer actually bypasses the standard transaction rollback call?
- dispatching custom using
Mage::dispatchEvent, is of no help
- direct query(core/resource) to insert records will also get rolled back in case of any error/exception before order successfully gets placed.