Hello,
I followed your guide from here http://developer.authorize.net/tools/errorgenerationguide/ , but I cannot find a credit card number, with a cvv and a zip that will give me a succesful transaction. I only get declined. I am using a sandbox account to make the tests and or course the sandbox url. If you could tell me a credit card number with a cvv and zip that returns a succesful transaction for the sandbox I would much appreciate it as I cannot seem to get a succesful response.
Thank you very much
Solved! Go to Solution.
โ03-25-2015 04:18 AM
http://developer.authorize.net/api/reference/
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
<zip>44628</zip>
โ03-25-2015 04:40 AM
http://developer.authorize.net/api/reference/
<cardNumber>5424000000000015</cardNumber>
<expirationDate>1220</expirationDate>
<cardCode>999</cardCode>
<zip>44628</zip>
โ03-25-2015 04:40 AM
Hi,
Tried those and I'm getting this:
DECLINED::1::2::This transaction has been declined.::S
โ03-25-2015 04:50 AM
I see that in your link in the test tools those work.
This is my code (perhaps I'm doing something wrong):
function aim_processTrans($data, $test=false,$type="auth")
{
if($test)
{
$post_url = "https://test.authorize.net/gateway/transact.dll";
$loginid='myid';
$transkey='mykey';
}
else
{
$post_url = "https://secure.authorize.net/gateway/transact.dll";
$loginid='myid';
$transkey='mykey';
}
$post_values = array(
"x_login" => $loginid,
"x_tran_key" => $transkey,
"x_version" => "3.1",
"x_delim_data" => "TRUE",
"x_delim_char" => "|",
"x_relay_response" => "FALSE",
"x_type" => "AUTH_CAPTURE",
"x_method" => "CC",
"x_card_num" => "{$data['cnumber']}",
"x_exp_date" => "{$data['emonth']}{$data['eyear']}",
"x_amount" => "{$data['price']}",
"x_description" => "{$data['lname']}",
"x_first_name" => "{$data['fname']}",
"x_last_name" => "{$data['lname']}",
"x_address" => "{$data['addr']}",
"x_state" => "{$data['cstate']}",
"x_zip" => "{$data['zip']}"
);
$post_string = "";
foreach( $post_values as $key => $value )
{ $post_string .= "$key=" . urlencode( $value ) . "&"; }
$post_string = rtrim( $post_string, "& " );
$request = curl_init($post_url);
curl_setopt($request, CURLOPT_HEADER, 0);
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($request, CURLOPT_POSTFIELDS, $post_string);
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, FALSE);
$post_response = curl_exec($request);
curl_close ($request);
$response_array = explode($post_values["x_delim_char"],$post_response);
return $response_array;
}
โ03-25-2015 05:00 AM
echo out your post string to see what you are trying to send to authorize.net
โ03-25-2015 08:15 AM
i need a credit card
โ03-21-2018 08:15 PM
Please check the testing guide for it .
https://developer.authorize.net/hello_world/testing_guide/
โ03-21-2018 08:36 PM