3v4l.org

run code in 200+ php & hhvm versions
Bugs & Features
<? $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; ?>
Output for 5.4.0 - 7.2.0
b2927d573d4dc2b2c60903610da7c2b3ce9f9d43
Output for 4.3.0 - 5.3.29
<? $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; ?>