/* ---------------------------------------------------------------------- */ $merchantid = "merchantid"; $secret = "xxxxxx"; $timestamp = strftime("%Y%m%d%H%M%S"); mt_srand((double)microtime()*1000000); /* orderid:Replace this with the order id you want to use.The order id must be unique. In the example below a combination of the timestamp and a random number is used. */ $orderid = $timestamp."-".mt_rand(1, 999); /* In this example these values are hardcoded. In reality you may pass these values from another script or take it from a database. $curr = "EUR"; $amount = "3000";*/ /*----------------------------------------------- Below is the code for creating the digital signature using the MD5 algorithm provided by PHP. you can use the SHA1 algorithm alternatively. */ $tmp = "$timestamp.$merchantid.$orderid.$amount.$curr"; $md5hash = md5($tmp); $tmp = "$md5hash.$secret"; $md5hash = md5($tmp); ?>
