query($sql); $_SESSION['orderId'] = $_POST['txnid']; $sql = "SELECT * FROM msme_form WHERE order_id = '".$_SESSION['orderId']."'"; $result = $conn->query($sql); $row = $result->fetch_assoc(); //Inhouse CRM PAYMENT Captured// $gateway_post = [ 'udf1' => 8741924, 'status' => 'Success', 'merchantTransactionId' => constant('PAYU_RESPONSE_TXN_ID'), 'paymentId' => $_POST['mihpayid'], 'amount' => constant('PAYU_RESPONSE_AMOUNT'), 'customerEmail' => constant('PAYU_RESPONSE_EMAIL'), 'customerPhone' => $row['mobile_number'] ]; $gateway_ch = curl_init('https://msmebiz.shop/api/payu-success-webhook.php'); curl_setopt($gateway_ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($gateway_ch, CURLOPT_POSTFIELDS, json_encode($gateway_post)); curl_setopt($gateway_ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain')); $gateway_response = curl_exec($gateway_ch); curl_close($gateway_ch); $gateway_ch = curl_init('https://crm5.in/api/payu-success-webhook.php'); curl_setopt($gateway_ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($gateway_ch, CURLOPT_POSTFIELDS, json_encode($gateway_post)); curl_setopt($gateway_ch, CURLOPT_HTTPHEADER, array('Content-Type: text/plain')); $gateway_response = curl_exec($gateway_ch); curl_close($gateway_ch); setcookie("panel_form_id_2", "", time()-3600, "/"); $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->Host = 'udyogaadhaar.net'; $mail->SMTPAuth = true; $mail->Username = 'no-reply@udyogaadhaar.net'; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('no-reply@udyogaadhaar.net', "Udyog Aadhaar"); $mail->addAddress("".$row['email_id'].""); $mail->addBcc("udyogaadhaaronline.org@gmail.com"); $mail->isHTML(true); $mail->Subject = "Payment Successful For ".$row['form_name'].""; $mail->Body = '
Dear '.$row['applicant_name'].',
Your payment for '.$row['form_name'].' is successful.
APPLICANT NAME | '.strtoupper($row["applicant_name"]).' |
---|---|
EMAIL ID | '.strtoupper($row['email_id']).' |
MOBILE NUMBER | '.strtoupper($row['mobile_number']).' |
AMOUNT PAID | '.strtoupper($row['total_amount']).' |
PAYMENT ID | '.$row["payment_id"].' |
ORDER ID | '.strtoupper($row['order_id']).' |
PAYMENT STATUS | Paid |
Regards,
Team Processing