When the sale is completed,the buyer return with sale parameters back to the approved URL that we defined. on 2checkout so i have defined mine localhost/XYZ/index.php?r=order/authenticateCheckout
Now according to documentation as code is given in this URL click here 2checkout documentation
I have given this code in my approval action
<?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;
?>
Now every thing working fine when the hashkeymatched i display confirmation ur payment has been completed but when the hashkey is mismatched then what should i do cancel the payment ? how i will do that becauase they did not mention any way in the documentation. Please help.