I'm developing a payment gateway for the South African payment processor PayFast. I've got it all up and running, but I'm running into a snag when it comes to the order in which things are done in Isotope.
1. Payment Gateway configured to "pending"
2. Checkout/Review
3. => Payment gateway
4. Payment Gateway initiates ITN (postpayment process, set's order to complete).
5. Payment Gateway returns to Checkout/Complete, which sets order back to "pending" (from 1)
Even the other way around doesn't work either, if configured to "complete" payment gateway tries to set invalid payments to "on_hold" and then the checkout/complete sets it back to "complete" again.
The postsaleProcess() is called async by the payment gateway, so you can't know when it will complete. I think the only way is to use the writeOrder hook, which happens AFTER the order has been initialised with the default payment gateway's status. Anyone know what base class to make it? or possibly any other ideas?
Bookmarks