I'm using the WorldPay payment gateway on a website I'm working on. It handles all the credit card authorisation, and then calls a PHP file on my server with information about the transaction. It grabs the output from my script and displays it in the WorldPay chrome.
I don't know the inner workings, but I imagine that they'd be using something similar to cURL to post the transaction details to my script and to then retrieve the output.
My script writes the necessary information into an XML file, sends an email and then thanks the customer for shopping with us.
My problem is that when I test my file by calling it directly (by turning off the security checks and visiting http://example.com/mysite/myscript.php
in my browser), everything works as planned, however when I go through the payment system (so I assumed my script is being called via cURL), it fails on this line:
$xml = simplexml_load_file('./info.xml');
Any ideas??
Clarification: that line returns false, which breaks the following lines.