Checksum Failed error in payu

23,658

Solution 1

Your checksum is not exact check variable that all are compulsory. Formula for checksum before transaction:

sha512 (key|txnid|amount|productinfo|firstname|email|udf1|udf2|udf3|udf4|udf5||||||<SALT>)

SALT will be provided by PayUMoney. The algorithm used is SHA2 which is globally well known algorithm. Use Google to find the desired function library for your implementation. Some example code is also mentioned below:

Example code for PHP:

$output = hash("sha512", $text);

http://softbuiltsolutions.com/uploads/readme/sZuRrXnkRVQXqv47f3hgy4LCmekcry-1443511890.pdf

Solution 2

Not sure if this was fixed , but could not find the answer anywhere, so thought will share what worked for me. Please make sure the amount is a float like 10.00 . This worked for me. Thanks

Solution 3

The POST must include the following keys compulsorily

"key" "txnid" "amount" "productinfo" "firstname" "email" "phone" "surl" "furl" "hash" "service_provider"

This information is in the documentation.

Share:
23,658
Sunil Kumar
Author by

Sunil Kumar

Updated on July 14, 2022

Comments

  • Sunil Kumar
    Sunil Kumar almost 2 years

    I am trying to integrate payu payment gateway and I have included all the mandatory fields but it's showing me an error after redirecting to payu's official site.

    Error. We are sorry we are unable to process your payment.
    Checksum Failed. Please contact your merchant.
    

    I have included following fields:

    <input type="hidden" name="key" value="key here" />
    <input type="hidden" name="txnid" value="67c778f0eed" />
    <input type="hidden" name="hash" value="sdfdsfsdfsdfgsdrgsdf"/>
    <input type="hidden" class="user2" name="firstname" value="sunil">
    <input type="hidden" name="surl" value="abc.com" size="64" />
    <input type="hidden" name="furl" value="abc.com" size="64" /></td>
    <input type="hidden" name="service_provider" value="payu_paisa" size="64" /> 
    <input id="pay_amoumt" type="hidden" name="amount" value="10">
    <input id="pay_amoumt" type="hidden" name="productinfo" value="general">
    

    I have assigned a static string to hash key. Is this a problem? Or is there anything else I have to do?