I've recently been handed a project that entails (for some odd reason) using WGET to validate and charge credit cards for a local company. I've managed to get the syntax down pretty well, tho the responses I'm getting through the browser confuse me completely. When I attempt to call the secure URL through WGET, I get a "Transaction denied" message. When I use the same URL in the browser "Go" bar, it gives me a "Transaction approved" message.
Do I need to have the script calling WGET on a secure server?
Any help anyone can offer will be greatly appreciated.
I've included the code below.
$card_num = "4007000000027"; // test (false) VISA card number
$exp_date = "0206"; // test exp date
$url = "https://secure.merchantcommerce.net/gateway/transact.dll?x_Login=imactest&x_Amount=2.00&x_Card_Num=$card_num&x_Exp_Date=$exp_date";
// $return = file_get_contents($url.$data);
$command = "wget -dv -N -O '-' -- ".addslashes($url);
$return = exec($command);