D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
mpwalmi
/
www
/
Filename :
fog_anant_season_pay.php
back
Copy
<?php include('admin/config.php'); if (count($_POST) > 0) { $post = $_POST; $post['events1'] = ((isset($post['events1'])) ? '1' : '0'); $post['events2'] = ((isset($post['events2'])) ? '1' : '0'); $post['events3'] = ((isset($post['events3'])) ? '1' : '0'); $post['events4'] = ((isset($post['events4'])) ? '1' : '0'); $post['events5'] = ((isset($post['events5'])) ? '1' : '0'); $post['events6'] = ((isset($post['events5'])) ? '1' : '0'); $post['total_entry_fee'] = $post['no_of_person'] * 55; $post['total_nakshra'] = $post['no_nakshra'] * 500; $post['total_cricket'] = $post['no_cricket'] * 500; $post['total_jungle_roti'] = $post['no_jungle_roti'] * 150; $post['total_jungle_safari'] = $post['no_jungle_safari'] * 50; $post['total_camel_ride'] = $post['no_camel_ride'] * 50; $post['total_horse_ride'] = $post['no_horse_ride'] * 50; $post['total_amount'] = $post['total_entry_fee'] + $post['total_nakshra'] + $post['total_jungle_roti'] + $post['total_jungle_safari'] + $post['total_camel_ride'] + $post['total_horse_ride']; $sal = "INSERT INTO `fog_anand`(`name`, `mobile`, `dateofarrive`, `timeofarrive`, `no_of_person`, `total_entry_fee`, `events1`, `no_nakshra`, `total_nakshra`, `events2`, `no_jungle_roti`, `total_jungle_roti`, `events3`, `no_jungle_safari`, `total_jungle_safari`, `events4`, `no_camel_ride`, `total_camel_ride`, `events5`, `no_horse_ride`, `total_horse_ride` , `events6`, `no_cricket`, `total_cricket` , `total_amount`) VALUES ('" . $post['name'] . "','" . $post['mobile'] . "','" . $post['dateofarrive'] . "','" . $post['timeofarrive'] . "','" . $post['no_of_person'] . "','" . $post['total_entry_fee'] . "','" . $post['events1'] . "','" . $post['no_nakshra'] . "','" . $post['total_nakshra'] . "','" . $post['events2'] . "','" . $post['no_jungle_roti'] . "','" . $post['total_jungle_roti'] . "','" . $post['events3'] . "','" . $post['no_jungle_safari'] . "','" . $post['total_jungle_safari'] . "','" . $post['events4'] . "','" . $post['no_camel_ride'] . "','" . $post['total_camel_ride'] . "','" . $post['events5'] . "','" . $post['no_horse_ride'] . "','" . $post['total_horse_ride'] . "','" . $post['events6'] . "','" . $post['no_cricket'] . "','" . $post['total_cricket'] . "','" . $post['total_amount'] . "')"; $run = mysqli_query($con, $sal); $insert = mysqli_insert_id($con); if ($run) { // echo '<script>alert("Thank You for filling this form.");</script>'; } else { // echo '<script>alert("Something Went Wrong");</script>'; } // payu money $amount = $post['total_amount']; $product_info = $insert; $customer_name = $post['name']; $customer_emial = 'harshamaravi@gmail.com'; $customer_mobile = $post['mobile']; $customer_address = 'Bhopal '; $MERCHANT_KEY = 'iHdfkZ'; //change merchant with yours $SALT = 'nAHQ97KdFY74IydhkGEbZk95C562oUGW'; //change salt with yours $txnid = substr(hash('sha256', mt_rand() . microtime()), 0, 20); //optional udf values $udf1 = ''; $udf2 = ''; $udf3 = ''; $udf4 = ''; $udf5 = ''; $hashstring = $MERCHANT_KEY . '|' . $txnid . '|' . $amount . '|' . $product_info . '|' . $customer_name . '|' . $customer_emial . '|' . $udf1 . '|' . $udf2 . '|' . $udf3 . '|' . $udf4 . '|' . $udf5 . '||||||' . $SALT; $hash = strtolower(hash('sha512', $hashstring)); $success = 'https://mpwalmi.org/payment_status.php'; $fail = 'https://mpwalmi.org/payment_status.php'; $cancel = 'https://mpwalmi.org/payment_status.php'; $data = array( 'mkey' => $MERCHANT_KEY, 'tid' => $txnid, 'hash' => $hash, 'amount' => $amount, 'name' => $customer_name, 'productinfo' => $product_info, 'mailid' => $customer_emial, 'phoneno' => $customer_mobile, 'address' => $customer_address, 'action' => "https://secure.payu.in", // 'action' => "https://test.payu.in", 'sucess' => $success, 'failure' => $fail, 'cancel' => $cancel ); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>MP walmi | payment</title> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> </head> <body> <div class="container mt-5 "> <div class="row"> <div class="col-md-2"></div> <div class="col-md-8 d-none"> <div class="card"> <h5 class="card-header bg-success text-white">Checkout Confirmation</h5> <div class="card-body"> <form action="<?php echo $data['action']; ?>/_payment" method="post" id="payuForm" name="payuForm"> <input type="hidden" name="key" value="<?php echo $data['mkey']; ?>" /> <input type="hidden" name="hash" value="<?php echo $data['hash']; ?>" /> <input type="hidden" name="txnid" value="<?php echo $data['tid']; ?>" /> <div class="form-group"> <label class="control-label">Total Payable Amount</label> <input class="form-control" name="amount" value="<?php echo $data['amount']; ?>" readonly /> </div> <div class="form-group"> <label class="control-label">Your Name</label> <input class="form-control" type="hidden" name="firstname" id="firstname" value="<?php echo $data['name']; ?>" readonly /> </div> <div class="form-group"> <label class="control-label">Email</label> <input class="form-control" type="hidden" name="email" id="email" value="<?php echo $data['mailid']; ?>" readonly /> </div> <div class="form-group"> <label class="control-label">Phone</label> <input class="form-control" type="hidden" name="phone" value="<?php echo $data['phoneno']; ?>" readonly /> </div> <div class="form-group"> <label class="control-label"> Booking Info</label> <textarea class="form-control" name="productinfo" readonly><?php echo $data['productinfo']; ?></textarea> </div> <div class="form-group"> <label class="control-label">Address</label> <input class="form-control" type="hidden" name="address1" value="<?php echo $data['address']; ?>" readonly /> </div> <div class="form-group"> <input name="surl" type="hidden" value="<?php echo $data['sucess']; ?>" size="64" type="hidden" /> <input name="furl" type="hidden" value="<?php echo $data['failure']; ?>" size="64" type="hidden" /> <!--for test environment comment service provider --> <input type="hidden" name="service_provider" value="payu_paisa" size="64" /> <input name="curl" value="<?php echo $data['cancel']; ?> " type="hidden" /> </div> <div class="form-group float-right"> <input type="submit" value="Pay Now" id="pay" class="btn btn-success" /> </div> </form> </div> </div> </div> <div class="col-md-2"></div> </div> <!-- Footer --> </div> </body> <script> window.onload = function() { document.forms['payuForm'].submit(); } </script> </html>