-
Notifications
You must be signed in to change notification settings - Fork 4
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
Verifying URL encoded body #8
Comments
Hey Drew, |
Thanks for the update. IPN documentation was the one thing I felt that coinpayments lacked, and as a developer I found it very difficult to verify the IPNs with my own code. There are very few libraries that offer HMAC signature checking, and the ones that do still did not work. How is the body encoded or formatted when its signature is created? Is it just the raw text of the URL encoded form? |
I understand that this library is being updated to support URL encoded bodies, but despite that, I would appreciate more clarification/insight into how the form payload is manipulated before being signed. I am using cloudflare workers for my backend which requires me to use WebCrypto. For this reason, any insight into how I can manually verify the HMAC would be appreciated. |
Hey @DrewRidley, If you are managing multiple accounts the best i could suggest to you is to play around with:
Hope this helps. |
Thanks for the clarification. I was stumped up on how the payload is verified because I was generating an HMAC signature of the request 'body' and it did not match to the HMAC coinpayments generated. For this reason I wondered if the request headers were included in the HMAC signature, or if it was just the request body itself. |
You just fetch HMAC from header and use it on the body only. Could you please describe your setup roughly (no sensitive info plox)? Will try to emulate the same test case |
Hello,
the IPN body is a url-encoded form. I tried passing it as a string to the SDK to verify the signature, but the SDK indicates that it requires an object. I am confused on the format it expects.
Thanks in advance,
Drew.
The text was updated successfully, but these errors were encountered: