// Merge -> revision 8059

git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@8062 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
rMalie
2011-08-16 09:10:40 +00:00
parent bbb8acc0de
commit 21ca4d15d7
31 changed files with 188 additions and 84 deletions
+4 -2
View File
@@ -42,9 +42,11 @@ foreach ($_POST AS $key => $value)
$postString .= $key.'='.urlencode($value).'&';
$postString .= 'x_exp_date='.str_pad($_POST["x_exp_date_m"], 2, "0",STR_PAD_LEFT).$_POST["x_exp_date_y"];
if (Tools::getValue('x_test_request'))
$postString .= 'Test_Mode=1';
/* Do the CURL request ro Authorize.net */
$request = curl_init(
Tools::getValue('x_test_request') ? 'https://test.authorize.net/gateway/transact.dll' : 'https://secure.authorize.net/gateway/transact.dll');
$request = curl_init('https://secure.authorize.net/gateway/transact.dll');
curl_setopt($request, CURLOPT_HEADER, 0);
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($request, CURLOPT_POSTFIELDS, $postString);