Forum Academy Marketplace Showcase Pricing Features

How to save response object from external script in database?

Using Razorpay, their handler function returns response object which I need to store in database. How do I access the response object sent from an external script? Here is the code from their documentation -

"handler": function (response) {
       alert(response.razorpay_payment_id);
       alert(response.razorpay_order_id);
       alert(response.razorpay_signature)
}

It is used in the HTML element which calls the razorpay script. I can send alerts and probably console log this but how do I store it in the database?