Hey.
I'm developing a new payment gateway to plug into ecommerce (Paystation - 3rd party CC processing) but testing is annoying because any time there is a failure, my shopping cart has been emptied.
I follow through the flow and see that in all cases the cart is cleared (and put into a 'transaction') prior to going off to any of the payment methods. So OK. There's probably a reason for that.
I do see that these dropped transactions sit in the user transaction store/history with status 'pending'. Makes sense as a fallback, I guess.
I can redirect the user to view that stalled order - but they cannot change it - only pay it - and can't even cancel it, although it would seem they can attempt to pay again.
SO ... does it make any sense for me to re-construct the shopping cart for failed transactions? I think I can see the bits I need, although there seems to be no handy transaction_load() function to use.
Alternatively (or as well) where is the appropriate hook to flag an error warning the user "You have unpaid orders awaiting payment"? Especially on the store_invoice page. I guess I can do it in the theme, but that doesn't seem quite right.