Sunil Kumar
Sunil Kumar

Reputation: 311

Checksum Failed error in payu

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?

Upvotes: 4

Views: 25177

Answers (4)

Nithesh P
Nithesh P

Reputation: 51

check your frontend and backend field name of object are matching to each other.if its not matching it will give error while generating hash code.

Upvotes: 0

Mr.Javed Multani
Mr.Javed Multani

Reputation: 13274

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

Upvotes: 6

New2SAPUI5
New2SAPUI5

Reputation: 33

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

Upvotes: 3

Vijay Kumar Kanta
Vijay Kumar Kanta

Reputation: 1131

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.

Upvotes: 1

Related Questions