Closed i-suraj closed 6 years ago
That hash is manually defined.. if you want to test it with your data create hash using this php function and replace data accordingly
<?php
echo makeHash("LLKwG0","123123123","10.0","test","Name","test@gmail.com");
function makeHash($key, $txnid, $amount, $productinfo, $firstname, $email){
$salt = "qauKbEAJ";
$payhash_str = $key . '|' . checkNull($txnid) . '|' . checkNull($amount) . '|' . checkNull($productinfo) . '|' . checkNull($firstname) . '|' . checkNull($email) . '|||||||||||' . $salt;
$hash = strtolower(hash('sha512', $payhash_str));
return $hash;
}
function checkNull($value)
{
if ($value == null) {
return '';
} else {
return $value;
}
}
?>
To know how payumoney works have a look at PayuMoney Docs and check (Integration reference)
I checked your code and found following issues
I tried your credentials in this function
<?php
//(key,txid,amount, productId, name,email)
echo makeHash("gez8KIo6","1534073035308","1.0","test","Name","test@gmail.com");
function makeHash($key, $txnid, $amount, $productinfo, $firstname, $email){
$salt = "rwsdJ8ZkJw";
$payhash_str = $key . '|' . checkNull($txnid) . '|' . checkNull($amount) . '|' . checkNull($productinfo) . '|' . checkNull($firstname) . '|' . checkNull($email) . '|||||||||||' . $salt;
$hash = strtolower(hash('sha512', $payhash_str));
return $hash;
}
function checkNull($value)
{
if ($value == null) {
return '';
} else {
return $value;
}
}
and I got
de7f81c1c972272beea1b091d75a92556a9726b9e6118deb3e9de2ee410f0c9a11ff41d9902b92b1d2868730e467472bd69f1709a6c10c12e064d09419be8697
this is different from your hash tested on
Due to inactivity closing this issue
I have tried everything, but it still give me the error message {"success":false}
I had same issue but i was able to solve this just by setting the amount to as
let amount= parseFloat("10");
The issue is with data type. This solution worked for me. Hope this will help you.
passing this float amount is not working for whole numbers, we have to pass transactions like 10 rupees 100 rupees and all, this will send as 10 only and causing issue taking it as integer and crashing the SDK.
i tried many times still getting this error... {success: false}
my option parameters are as follows:-
my salt is rwsdJ8ZkJw