Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="localhost";
- $dbUser="wifi_rarkom_2016";
- $dbPassword="wifi_rarkom_2016";
- $dbName="ifpt";
- $value=mysqli_connect($host,$dbUser,$dbPassword,$dbName) or die(mysqli_error());
- include_once 'easepay-lib.php';
- $SALT='I4R3IJICRY';
- $result = response( $_POST, $SALT );
- $hash=$_POST['hash'];
- $firstname=$_POST['firstname'];
- $amount=$_POST['net_amount_debit'];
- $email=$_POST['email'];
- $phone=$_POST['phone'];
- $easepayid=$_POST['easepayid'];
- $addedon=$_POST['addedon'];
- $status=$_POST['status'];
- $txnid=$_POST['txnid'];
- if ($status=="success") {
- # code...
- $query ="INSERT INTO payment(hash,firstname,net_amount_debit,email,phone,easepay_id,added_on,status,txn_id) VALUES('$hash','$firstname','$amount','$email','$phone','$easepayid','$addedon','$status','$txnid');";
- $query .="UPDATE user SET status_madePayment=1,payment_Renewal=1 WHERE email = '$email';";
- $sql=mysqli_multi_query($value,$query);
- // print_r($result);
- // print_r($_POST);
- // if ($query) {
- # code...
- // }
- // echo json_encode($_POST);
- // echo json_encode($result);
- echo "Payment Completed Successfully";
- // sleep(10);
- header("Location: http://localhost:8000/user/membership?status=success");
- // echo " <a href=\"http://localhost:8000/user/membership\">Goto Profile</a>";
- } else{
- $query ="INSERT INTO payment(hash,firstname,net_amount_debit,email,phone,easepay_id,added_on,status,txn_id) VALUES('$hash','$firstname','$amount','$email','$phone','$easepayid','$addedon','$status','$txnid');";
- $sql=mysqli_query($value,$query);
- header("Location: http://localhost:8000/user/membership?status=failure");
- }
- ?>
Add Comment
Please, Sign In to add comment