Community Forums 

Main Content

Hash Verification - Mal Advice Please

    Aug 21 2009 06:02:02

    #1

    Zen Monkey

    Join date : 2009-08-21      Posts : 26

    Can anyone tell me how the hash verification code is generated as in what calculation do i have to do to generate the hash verification code dynamically on the fly say using php in my pages along with my secret code, so idont have to keep recreating the button code in the button maker every time i update the price or product name etc.

    Thanks



    Aug 21 2009 18:57:57

    #2

    Debbie Q

    Join date : 2008-09-18      Posts : 4994

    $secret_key = "1f190a22037de1499b1d2d687ad0667b";
    $product = "My description";
    $price = "9.99";
    $units = "0";

    $p = substr(addslashes($product), 0, 10);
    $hash = md5($secret_key . $p . $price . $units);

    Debbie Q

    Mal's Support: www.mals-e.com/support.php
    GT's Forms and examples: www.malsforms.com
    Helpful java scripts: www.gemasana.com/mals
    Shipping help documents: www.stoner.org.uk/mals

    My Create-A-Book Publishing - mycreateabook.com
    Personalized Books, Music CDs and Gifts for all ages and occasions.

    Please help me out and share my site on your networks.




    Aug 21 2009 20:31:15

    #3

    Zen Monkey

    Join date : 2009-08-21      Posts : 26

    Thanks Debbie, exacty what i was looking for.

    Greatly appreciated.