I'm having some problems running custom code. Here what I want to do:
I've build a function that writes an XML from the order that is made and saves it to the server. I need it to be executed after an iDeal payment is done and is successful. The XML gets send to the supplier of the goods and can process the order this way.
The function is on pastebin: http://pastebin.com/VBsRy5Av
I've tried adding my function to the thankyou page, the problem with that is that when a visitor presses F5 on that page, the code executes again and I can't let that happen. My guess is it has to run after the payment and before the thanks-page.
I'm using the iDeal plugin by Coen Jacobs: http://www.woothemes.com/extension/ideal-mollie/
Hope someone can help me because I've been breaking my head on this...