Razor Pay Payment Will Refunding Amount Continuously
I'm developing e-commerce application. I used razor pay for payment gateway. payment is successfully happening but amount will be refunding automatically. what is the issue? some p
Solution 1:
You need to capture the amount from your backend.
Step 1:- When your payment is successful you will receive one paymentId as a response from Razorpay
Step 2:- That id along with amount you need to send it to razorpay then the amount is going to capture.
request({
method: 'POST',
url: 'https://<YOUR_KEY_ID<YOUR_KEY_SECRET>@api.razorpay.com/v1/payments/' + generatedRazorpayId +'/capture',
form: {
amount: amountPaid
}
}, function (error, response, body) {
console.log('Status:', response.statusCode);
console.log('Headers:', JSON.stringify(response.headers));
console.log('Response:', body);
});
If you are using firebase you need to trigger the function.
Post a Comment for "Razor Pay Payment Will Refunding Amount Continuously"