Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

{"errorCode": "5019", "errorMsg": "Invalid Hash."} #38

Open
mptechjolly opened this issue Jul 5, 2022 · 1 comment
Open

{"errorCode": "5019", "errorMsg": "Invalid Hash."} #38

mptechjolly opened this issue Jul 5, 2022 · 1 comment

Comments

@mptechjolly
Copy link

mptechjolly commented Jul 5, 2022

Hello,
Please help me out about hash issue, I m calling generate hash function on react native and each and every time receive invalid hash.

generateHash = (e) => {
console.log(e.hashName);
console.log(e.hashString);
var hashStringWithoutSalt = e.hashString;
var hashName = e.hashName;

var hashValue = e.hashString+"8pGhk7y2yCw1ZSEyKL0BKJI6zZ4duML6";
sha512(hashValue).then( hash => { hashValue = hash })
var result = { [hashName]: hashValue};
PayUBizSdk.hashGenerated(result);

}

also try to generate sha256 static hash, If I m not using any backend server then where I need to generate hash.

Ex : HAq16d|12345|1000|Shopping|Jolly|[email protected]|8pGhk7y2yCw1ZSEyKL0BKJI6zZ4duML6
response : abe48a93c8c3d16c25c0710b6edd47eb79bd3dbc84497a25395da0dc111614340aeaaac747d01af9d8aa65668adce7597f771de85abc1b903a16d1c7f441488c

Where I need to pass this generated hash and what about generateHash function?

Screenshot 2022-07-05 at 9 58 58 PM

I m use same way to generate hash but receive invalid hash each time

@Jananijann
Copy link

Jananijann commented Jul 8, 2022

@mptechjolly You should have the pipes even if you are not using any values for it.

Try using it like this: HAq16d|12345|1000|Shopping|Jolly|[email protected]|||||||||||8pGhk7y2yCw1ZSEyKL0BKJI6zZ4duML6

Also check the SHA512 hash value with some online SHA generator, to see if its producing the right value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants