show order information after successful paid |
how can we show order information after getting the successful checkout payment process?
codeigniter3 As you can see in the below PHP code I'm using the Paytm payment gateway in my project for checkout process, When the user submits their shipping address and goes to checkout process order, the checkout process returns a response to a **callback_URL** based on the API payment response. Yes, but Paytm releases its payment information, but I want to show my user's order status and information here. user shipping address submission $this->form_validation->set_rules('name', 'Name', 'required'); $this->form_validation->set_rules('email', 'Email', 'required|valid_email'); $this->form_validation->set_rules('password', 'Password', 'required'); $this->form_validation->set_rules('phone', 'Phone', 'required'); $this->form_validation->set_rules('address', 'Address', 'required'); checkout process order $paramList["MID"] = PAYTM_MERCHANT_MID; $paramList["ORDER_ID"] = 'id'; $paramList["CUST_ID"] = 'customer_id'; $paramList["INDUSTRY_TYPE_ID"] = INDUSTRY_TYPE_ID; $paramList["CHANNEL_ID"] = $CHANNEL_ID; $paramList["TXN_AMOUNT"] = $item["subtotal"]; $paramList["WEBSITE"] = PAYTM_MERCHANT_WEBSITE; $paramList["CALLBACK_URL"] = base_url('Checkout/payment_response'); $paramList["MSISDN"] = 'xxxxxxxxxx'; //Mobile number of customer $paramList["EMAIL"] = 'xxxxxxxxxx'; //Email ID of customer $paramList["VERIFIED_BY"] = "MSISDN"; $paramList["IS_USER_VERIFIED"] = "YES"; $checkSum = $this->paytm->getChecksumFromArray($paramList,PAYTM_MERCHANT_KEY); $transaction_url = PAYTM_TXN_URL; $data = array('paramList' => $paramList,'transaction_url' => $transaction_url,'checkSum' => $checkSum); // ,'order_id' => $order_id $this->load->view('order_process',$data); This is the callback_URL of the checkout process. Here I want if the payment status is successful then I should be shown the complete order information of the user according to the order ID submitted by the callback_URL $paytmChecksum = ""; $paramList = array(); $isValidChecksum = FALSE; $paramList = $_POST; $paytmChecksum = isset($_POST["CHECKSUMHASH"]) ? $_POST["CHECKSUMHASH"] : ""; //Sent by Paytm pg $isValidChecksum = $this->paytm->verifychecksum_e($paramList, PAYTM_MERCHANT_KEY, $paytmChecksum); //will return TRUE or FALSE string. if($isValidChecksum == "TRUE") { if ($_POST["STATUS"] == "TXN_SUCCESS") { //Here we can show order information }else{ echo 'Transaction Failed'; } }else{ echo 'Not Valid Check Sum'; }
See if there is such a possibility in the API of the payment system.
I think to get the information you need to make a new request to the server. Or find out if the data is coming to $_POST |
Welcome Guest, Not a member yet? Register Sign In |