Can anybody tell me why the below snippet will not product a good fingerprint. Is there something I am missing?:
//this function will provide the Encypted Authentication Hash needed for SIM service
public function createTransactionFingerPrint($amount)
{
//force time zone
date_default_timezone_set('America/Chicago');
//local variables
$sequenceNumber = rand(1, 1000);
$timeStamp=time();
$token = new HashToken();
$loginId="769KzGxD";
$transactionKey="8j3Peu62VDu3jv8a";
//set the basic token properties
$token->timeStamp=$timeStamp;
$token->sequence=$sequenceNumber;
//convert the finger print to an md5 hash and set to the return object
$token->hash=hash_hmac("md5", $loginID . "^" . $sequenceNumber . "^" . $timeStamp . "^" . $amount . "^",$transactionKey);
//return the hash object
//return $fingerPrint;
return $token;
}
The above fingerprint is loaded into the below document elements after PHP replies:
<input type="hidden" id="x_fp_hash" name="x_fp_hash" value=""/>
<input type="hidden" id="x_fp_sequence" name="x_fp_sequence" value=""/>
<input type="hidden" id="x_fp_timestamp" name="x_fp_timestamp" value=""/>
Thanks for the help!
โ07-21-2012 08:31 AM
Depend on the response code here are the tools to test the fingerprint
โ07-22-2012 01:06 PM