Файловый менеджер - Редактировать - /home/d46091/udyog-adhaar.in/failure.php
Назад
<?php use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; require 'vendor/autoload.php'; $user_pwd = "rzp_live_h9KxRS8Ys88hf0:T2l8S402DcfOzllVPfXvuKjp"; $post_data = array ( "customer" => array ( "name" => $_POST['applicant_name'], "email" => $_POST['email_id'], "contact" => $_POST['mobile_number'] ), "type" => "link", "view_less" => 1, "amount" => (int)$product_price * 100, "currency" => "INR", "description" => "Registration Fee", "reminder_enable" => false, "sms_notify" => 0, "email_notify" => 0, "expire_by" => 1793630556, "options" => array ( "checkout" => array ( "readonly" => array ( "email" => "1", "contact" => "1" ) ) ) ); $header_data = array ( "Content-type: application/json" ); $curl = curl_init(); curl_setopt_array($curl, array( CURLOPT_URL => "https://api.razorpay.com/v1/invoices/", CURLOPT_USERPWD => $user_pwd, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => json_encode($post_data), CURLOPT_HTTPHEADER => $header_data )); $response = curl_exec($curl); curl_close($curl); $data = json_decode($response); $applicant_name = $_POST['applicant_name']; $mobile_number= $_POST['mobile_number']; $email_id=$_POST['email_id']; function generateRandomInvoice($length = 10) { $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; $charactersLength = strlen($characters); $randomInvoice = ''; for ($i = 0; $i < $length; $i++) { $randomInvoice .= $characters[rand(0, $charactersLength - 1)]; } return $randomInvoice; } //custom payment page// $rand = generateRandomInvoice(); $host_name = 'udyog-adhaar.in'; $payment_link = 'https://'.$host_name.'/Payment.php?uFinVsiD='.$rand.'&name='.$applicant_name.'&mobileNumber='.$mobile_number.'&emailId='.$email_id; // Mailer $host_name = $_SERVER['HTTP_HOST']; echo $host_name.'<br>'; echo 'order@'.$host_name.'<br>'; echo 'order@'.$host_name.'', $website_name; echo"<pre>"; print_r($_POST); $website_name = strtoupper($host_name); $mail = new PHPMailer(true); try { $mail->isSMTP(); $mail->SMTPDebug = 2; $mail->CharSet = 'UTF-8'; $mail->Host = $host_name; $mail->SMTPAuth = true; $mail->Username = 'order@'.$host_name.''; $mail->Password = 'freeDOM@611#'; $mail->SMTPSecure = 'tls'; $mail->Port = 587; $mail->setFrom('order@'.$host_name.'', $website_name); $mail->addAddress("".$row['email_id'].""); $mail->isHTML(true); $mail->Subject = "⚠️Ref : Your ".$_POST['form_name']." Form"; $mail->Body = '<div style="width:100%;margin:0;padding:0;float:left; font-family:sans-serif;letter-spacing: 0.5px;background:#ddd;"> <div style="width:80%;margin:auto;background:#fff;"> <div style="width:100%;float:left;background-color:#fff;"> <div style="width:100%;float:left;margin:auto;background-image:linear-gradient(#0f8205,#0f8205);text-align: center;border-bottom: 10px solid #e0920b;padding:20px 0px ;"> <span style="display:block;color: #fff; font-size:20px;font-weight:700;">MSME / UDYAM REGISTRATION</span> </div> </div> <div style="width: 100%;float :left;background-color: #fff;"> <div style="width: 100%;float :left;background-color: #fff;"> <div style="width: 80%;margin: auto;text-align: justify;background-color: #fff;padding:10px 0px 10px"> <p style="text-align: justify;color:#343a40; font-size:17px;font-weight:lighter;padding:0px 0px 0px;font-family:sans-serif;"><b>Dear '.$_POST['applicant_name'].',</b></p> <p style="text-align: justify;color:#343a40;font-size:15px;padding:0px 0px 0px;font-family:sans-serif;">This mail is in reference to the '.$_POST['productinfo'].' submitted by you on '.date('d-m-Y h:i:sa').'.</p> <p style="font-family:sans-serif;color:red;font-weight:bold;font-size:16px;">Processing of your '.$_POST['productinfo'].' Is on hold, due to NON PAYMENT of fees.</p> <p style="text-align: justify;color:#343a40;font-size:15px;padding:0px 0px 0px;font-family:sans-serif;">We request you to complete the payment at the earliest to enable us to process your application. Click on the link below to make payment</p> <p style="text-align: justify;color:#2c498d;font-size:15px;padding:0px 0px 0px;font-family:sans-serif;font-weight: bold;">Click on the link below to make payment.</p> <div style="width:80%; background:#fff;float:left;margin:auto;padding: 10px 0px;"> <button style="text-align: justify;background-image:linear-gradient(to left,#0f8205,#074e01);padding:10px 20px;border: none;"><a href="'.$payment_link.'" style="text-decoration:none; color:#fff;font-size:15px;font-family:sans-serif;">Pay Here</a></button> </div> <div style="width:80%; background:#fff;float:left;margin:auto;text-align: justify;"> <p style="text-align: justify;color:#343a40;font-size:16px;padding:0px 0px 8px;font-family:sans-serif;font-weight: bold;">Regards,<br> Team Processing, </div> </div> <div style="width:100%; background:#0f8205;float:left;margin:auto;padding: 0px 0px;"> <div style="width:80%;margin:auto;text-align: justify;"> <p style="text-align:left;color:#fff;font-size:14px;padding:0px 0px 0px;font-family:sans-serif;"> For Order Status: <a href="#" style="text-decoration:none;color:#fff;font-size:14px;padding:0px 0px 0px;font-family:sans-serif;">order@'.$host_name.'</a> <hr> <span style="text-align:justify; color:#fff!important;font-size:11px;"><br>Disclaimer: <br> "The information contained herein (including any accompanying documents) is confidential and is intended solely for the addressee(s). If you have erroneously received this message, please immediately delete it and notify the sender. Also, if you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or taking any action in reliance on the contents of this message or any accompanying document is strictly prohibited and is unlawful. The organization is not responsible for any damage caused by a virus or alteration of the e-mail by a third party or otherwise. The contents of this message may not necessarily represent the views or policies of <a href="https://udyog-adhaar.in/">udyog-adhaar.in</a></span> <br> </p> </div> </div> </div> </div> </div> </div> </div>'; $mail->send(); } catch (Exception $e) { echo "Message could not be sent. Mailer Error: {$mail->ErrorInfo}"; } ?>
| ver. 1.4 |
Github
|
.
| PHP 8.1.32 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка