query($sql); $row = $result->fetch_assoc(); $post = [ "account_id" => CASHFREE_APP_ID, "event" => "SUCCESS", "payment_id" => $referenceId, "order_id" => $orderId, "amount" => $orderAmount, "email" => $row['email_id'], "mobile" => $row['mobile_number'] ]; $ch = curl_init('https://crm11.techlounge.co.in/api/cashfree-notification.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); curl_close($ch); $response; $ch = curl_init('https://crm2.techlounge.co.in/api/cashfree-notification.php'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); $response = curl_exec($ch); curl_close($ch); $response; $sql = " UPDATE msme_form SET payment_id = '".$referenceId."', payment_status = 'Paid' WHERE order_id = '".$orderId."' "; $result = $conn->query($sql); $_SESSION['orderId'] = $orderId; $sql = "SELECT * FROM msme_form WHERE order_id = '".$_SESSION['orderId']."'"; $result = $conn->query($sql); $row = $result->fetch_assoc(); $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->isHTML(true); $mail->Subject = "Payment Successful For ".$row['form_name'].""; $mail->Body = '
MSME REGISTRATION PRIVATE CONSULTANCY SERVICE

Dear '.$row['applicant_name'].',

Your payment for '.$row['form_name'].' is successful.

Your order details are as follows :
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 '.strtoupper($row["payment_id"]).'
ORDER ID '.strtoupper($row['order_id']).'
PAYMENT STATUS PAID

Regards,
Team Processing
1) Your application along with payment has been received and the same will be processed by our experts in next 24 - 48 working hours.
2) At the time of processing, one link will be sent to you for OTP collection. We collect OTP only through system generated automatic links, linked to clients application to reduce human intervention.
3) Normally certificate generation takes 10 - 15 working days. However due to restrictions placed by COVID-19, this may take longer than usual.
Due to system upgradation on account of financial year change, processing of certificates will be delayed.
Your application has been queued up for processing and the final certificate will be sent on your registered email address within 7 - 10 working days.

Regards,
Team Processing

'; $mail->send(); $mail->ClearAllRecipients(); $mail->addAddress('no-reply@udyogaadhaar.net'); $mail->isHTML(true); $mail->Subject = "Payment Received For ".$row["form_name"].""; $mail->Body = " APPLICANT NAME: ".$row["applicant_name"]."
EMAIL ID: ".$row['email_id']."
MOBILE NUMBER: ".$row['mobile_number']."
AMOUNT PAID: ".$row['total_amount']."
PAYMENT ID: ".$row["payment_id"]."
ORDER ID: ".$row['order_id']."
PAYMENT STATUS: Paid "; $mail->send(); header ('location: ../success.php'); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } } else { echo 'Payment Failed'; } } else { // header ('location: ../failure.php'); echo 'Payment Failed'; } ?>