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

webhook verify dones not work. #64

Closed
formobi opened this issue May 11, 2024 · 8 comments
Closed

webhook verify dones not work. #64

formobi opened this issue May 11, 2024 · 8 comments

Comments

@formobi
Copy link

formobi commented May 11, 2024

No description provided.

@formobi
Copy link
Author

formobi commented May 11, 2024

Tried using following function, it does not work. changed it to get, it gets executed but gives error.
app.post('/webhook', function (req, res) {
try {
Cashfree.PGVerifyWebhookSignature(req.headers["x-webhook-signature"], req.rawBody, req.headers["x-webhook-timestamp"]))
} catch (err) {
console.log(err.message)
}
})

@suhas-cashfree
Copy link
Collaborator

How are you using this ?

@suhas-cashfree
Copy link
Collaborator

Once you register for a webhook with Cashfree, that is the end-point which is given in the example.

@formobi
Copy link
Author

formobi commented May 12, 2024 via email

@suhas-cashfree
Copy link
Collaborator

suhas-cashfree commented May 12, 2024

1> Do you mean registering via api as "return_url"? I have seen some places
notify_url too OR registering on cashfree dashboard?

You can use "notify_url" or register from cashfree dashboard.

2> If I provide GET instead of post then the webhook gets called. But the
headers do not have signatures.

May be you are setting "return_url". Return Url is used to redirect the user post payment. Return Url will do a get call to your specified end point, You have to use "notify_url" or register from dashboard

@formobi
Copy link
Author

formobi commented May 13, 2024 via email

@suhas-cashfree
Copy link
Collaborator

@suhas-cashfree
Copy link
Collaborator

Closing this for now. Please create a new ticket if the issue persists

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