Hi,
I have cURL installed on my system and have used for years to make credit card transactions, here's example code:
$ch = curl_init("https://secure1.merchantmanager.com/ccgateway.asp");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, 1);
// $urlstring is the credit card information
curl_setopt($ch, CURLOPT_POSTFIELDS, $urlstring);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 0);
curl_setopt($ch, CURLOPT_REFERER, "https://secured.com/~fxxxx/golf/checkout.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($ch);
curl_close($ch);
Now I'm working on doing a batch process which will post multiple transactions. Do I need to do curl_close(), and then reopen curl, or can I simply do:
curl_setopt($ch, CURLOPT_POSTFIELDS, $urlstring); //i.e. a new value for the new transaction
$data= curl_exec($ch)
for each additional transaction?
thanks for your advice,
Sam Fullman