- hash_hmac: documentation ( source)
<?
$access_key = "OJPGR41P5NV22ZSF86IX"; //put your own access_key - found in admin panel
$secret_key = "7dc45f07f7c4cd88536c198b34ef43af61061d95"; //put your own secret_key - found in admin panel
$txn_id = "27042015121151082151-Ez6SvBr3ff";
$value = 450; //Charge amount is in INR by default
$data_string = "merchantAccessKey=" . $access_key
. "&transactionId=" . $txn_id
. "&amount=" . $value;
$signature = hash_hmac('sha1', $data_string, $secret_key);
$amount = array('value' => $value, 'currency' => 'INR');
echo $signature;
?>