Hi all,
I am implementing SIM integration method(authorize.net).I am using sim.php,simlib.php and simdata.php files provided by authorize.net.
But when i run sim.php file, i get this error code
103:This transection can not be accepted.
i have given the correct login name & password in the simdata.php file but don't know why i am receiving this error.
i am asuming password as transection key.Is transection key different from password?
Also mhash lib is not configured on my server. but i am generating the mhash by using the md5 method of php given below.
The function that does the same as mhash($key,$data) is as under.
function hmac ($key, $data)
{
// RFC 2104 HMAC implementation for php.
// Creates an md5 HMAC.
// Eliminates the need to install mhash to compute a HMAC
// Hacked by Lance Rushing
$b = 64; // byte length for md5
if (strlen($key) > $b) {
$key = pack("H*",md5($key));
}
$key = str_pad($key, $b, chr(0x00));
$ipad = str_pad('', $b, chr(0x36));
$opad = str_pad('', $b, chr(0x5c));
$k_ipad = $key ^ $ipad ;
$k_opad = $key ^ $opad;
return md5($k_opad . pack("H*",md5($k_ipad . $data)));
}
this funciton will generate the same key as generated by mhash..
Will this funciton serve the purpose or i have to install mhash lib on my testing server or there is some other problem
Please let me know.Your cooperation and help will be highly appreciated.