Last active
December 30, 2015 08:06
-
-
Save craigchristenson/3841142 to your computer and use it in GitHub Desktop.
2Checkout Return
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$hashSecretWord = 'tango'; //2Checkout Secret Word | |
$hashSid = 1303908; //2Checkout account number | |
$hashTotal = '1.00'; //Sale total to validate against | |
$hashOrder = $_REQUEST['order_number']; //2Checkout Order Number | |
$StringToHash = strtoupper(md5($hashSecretWord . $hashSid . $hashOrder . $hashTotal)); | |
if ($StringToHash != $_REQUEST['key']) { | |
$result = "Fail - Hash Mismatch"; | |
} else { | |
$result = "Success - Hash Matched"; | |
} | |
echo $result; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment