ok
Direktori : /home2/selectio/www/y1jobportal.in/apps-api/ |
Current File : /home2/selectio/www/y1jobportal.in/apps-api/web-payment.php |
<?php ob_start(); session_start(); include_once('config/config.php'); include_once('config/custom-functions.php'); include 'config/send-sms.php'; $fn = new custom_functions(); $payment_details = json_decode($_POST['payment_details'], true); /*login*/ print_r($payment_details); $name = $payment_details['name']; $amount = $payment_details['amount']; $transaction_id = $payment_details['razorpay_payment_id']; $id = $payment_details['id']; if ((isset($transaction_id))) { $statement = $pdo->prepare("UPDATE `customer` SET transaction_id='".$transaction_id."',process=4 where id=$id"); $result=$statement->execute(); $statement = $pdo->prepare("INSERT INTO tbl_transaction (customer_id, transaction_id, amount) VALUES (?,?,?);"); $result=$statement->execute([$id,$transaction_id,$amount]); if($result){ $response["message"] = "Payment Successfully Completed"; $_SESSION['candidate']['process'] = 4; header('location:../index.php'); }else{ $response['error'] = true; $response['message'] = "Something Went Wrong..."; } print_r(json_encode($response)); }else{ $response['error'] = true; $response['message'] = "Function not Call..."; print_r(json_encode($response)); }