USAePay, looks like your hash example is wrong. Consider your example listed here: http://wiki.usaepay.com/developer/transactionapi?#calculating_hash_value
You use as input string sale:sd*s3j002jd:53.21:34576721:1234
, but claim it md5 hashes to 52d534dd45388432ac0a44c9174ffb3f
, but this is wrong.
Using Mac OS built-in md5
binary:
$md5 -s sale:sd*s3j002jd:53.21:3456721:1234
MD5 ("sale:sd*s3j002jd:53.21:3456721:1234") = 423ce7188315e73be5d81dbe7f28db22
You can even dump this code in PHP repl and run it -- same result.
$umcommand = "sale" ;
$pin = "sd*s3j002jd";
$amount = "53.21" ;
$invoice = "3456721" ;
$hashseed = "1234"; // mktime returns the current time in seconds since epoch.
$hashdata = $umcommand . ":" . $pin . ":" . $amount . ":" . $invoice . ":" . $hashseed ;
$hash = md5 ( $hashdata ); // php includes a built-in md5 function that will create the hash
print($hash);
Hello Davis,
Thank you for your concern with our documentation. But if you look closely at the invoice in your prehash value vs the one in our prehash value, you'll notice you used 3456721 where we used 34576721. If you try again with sale:sd_s3j002jd:53.21:34576721:1234 instead of sale:sd_s3j002jd:53.21:3456721:1234 you should receive the same hash value listed in our documention.