Server IP : 162.214.80.37 / Your IP : 216.73.216.68 Web Server : Apache System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : imyrqtmy ( 2189) PHP Version : 8.2.18 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0750) : /home2/imyrqtmy/public_html/agriba/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php require 'includes/db-conn.inc.php'; if(isset($_GET)){ // Store the values in separate variables $orderID = $_GET['oid']; $rp_payment_id = $_GET['rp_payment_id']; $rp_signature = $_GET['rp_signature']; $sqladd = mysqli_query($conn,"update order_master set onlinepaymentstatus='1', payment='$rp_payment_id' where detailsorder_id = '$orderID'") or die(mysqli_error($conn)); if(mysqli_affected_rows($conn) > 0){ $query=mysqli_query($conn,"update tbl_order set cart_status='1' where order_id='$orderID'"); //stock update $sqlstock=mysqli_query($conn,"select * from tbl_order_details where order_id='$orderID'") or die(mysqli_query($conn)); while($datastock=mysqli_fetch_assoc($sqlstock)) { $stockproductid = $datastock['product_id'] ; $stockqty = $datastock['quanitity']; $stocksize = $datastock['size'] ; $sqlstockselect=mysqli_query($conn,"select * from tbl_product_price where productId='$stockproductid' and punit='$stocksize'") or die(mysqli_query($conn)); $datastockorignal=mysqli_fetch_assoc($sqlstockselect); $stockorignal_qty =$datastockorignal['pqty']; $update_stock=$stockorignal_qty-$stockqty; $query=mysqli_query($conn,"update tbl_product_price set pqty='$update_stock' where productId='$stockproductid' and punit='$stocksize'"); } // stock update close unset($_SESSION['rand']); // echo "<script>location.href='myorder.php';</script>"; // echo "<script>location.href='online-order-confirmation.php?detailid=$orderID';</script>"; echo "<script>location.href='thank-you.php?detailid=$orderID';</script>"; } } ?>