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

how to handle bad request on request failure #37

Open
yogesh789 opened this issue Jan 9, 2020 · 1 comment
Open

how to handle bad request on request failure #37

yogesh789 opened this issue Jan 9, 2020 · 1 comment

Comments

@yogesh789
Copy link

yogesh789 commented Jan 9, 2020

I am trying to handle the bad request error when it failed on the razorpay payment gateway, i have written Below code which is mention in the razorpay payment gateway Docs. i have successfully implemented success request however getting error on the bad request. please find below code for which is i am trying to implement

{
"key_id": "vghbjnkm", // Enter the Key ID generated from the Dashboard
//"key_secret": "vhbhbbhhbhbhbh", // Enter the Key ID generated from the Dashboard
"amount": $('#payingtotal_amount').val()* 100, // Amount is in currency subunits. Default currency is INR. Hence, 50000 refers to 50000 paise or INR 500.
"currency": "INR",
"name": "FLOWERET",
"description": $('#paydescription').val(),
"image": "/favicon.png",
"order_id": $('#razorpay_order_id').val(),//This is a sample Order ID. Create an Order using Orders API. (https://razorpay.com/docs/payment-gateway/orders/integration/#step-1-create-an-order). Refer the Checkout form table given below
"handler": function (response) {
console.log("response razorpay", response)
console.log("response razorpay", response.status)
alert(response.razorpay_payment_id);
alert(response.razorpay_signature);
}
}

@harman28
Copy link
Contributor

harman28 commented May 6, 2020

What is the error you're getting here?

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