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);
@CharlesMcewen - nice catch! that was a subtle one...indeed. Thanks for the reply.