Hi,
I'm coding an OT module. Basically, it's used to apply gift card credits, but the credit is verified remotely over SOAP. It's going well, but I have hit a couple of snags. Coders, can you help? Here's the (lacklustre) documentation I have been using so far:
http://www.zen-cart.com/wiki/index.p..._Total_Classes
My problems:
1) apply_credit()
For my process to work I must communicate with a remote SOAP server in this method. Basically, it's at this point in time that I deduct the amount from the gift card. When everything works, no problem.
However, I need the ability to abort transaction if something goes wrong.
I've tried zen_redirect() and a few other things, but it doesn't help. The transaction will end up in "New Orders." no matter what I have tried.
How can I roll back here?
2) Add custom text to the invoice
After apply_credit() I have new info I must add to the invoice (Authorization and Reference numbers, sent back from the Soap server) How can do this from this point?
Thank you for your time.
Bookmarks