Laravel How to store payment gateway response url data value in database

Home / Uncategorized / Laravel How to store payment gateway response url data value in database

Question:
Currently, i’m integrating a new payment gateway in laravel. In response url, I am getting a datastring from the payment gateway like:http://www.example.com/payment/response?txn_status=00&txn_msg=success&txn_err_msg=NA&clnt_txn_ref=000000&tpsl_txn_id=000000&txn_amt=1.00&hash=0000000000000000000

I want to store the url datastring value into a database How should I able to do it in laravel?


Answer:
As url string contains the get parameters, so your route will be ‘get’. Then you have to write this:$GetData = Input::get();

//To print
echo "

";
print_r($GetData);

//To log the response
Log::info("Payment response : ".print_r($GetData, true));

Now, to insert this response, use laravel eloquent or the simple query.
Read more

Leave a Reply

Your email address will not be published. Required fields are marked *