-
-
Save w3guy/55d136cd19c0e1d78c3c to your computer and use it in GitHub Desktop.
2Checkout Return
This file contains 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