Файловый менеджер - Редактировать - /home/gqdcvggs/forchange.me/config.php
Назад
<?php define('STRIPE_SECRET_KEY', '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'); define('STRIPE_PUBLIC_KEY', 'pk_live_51LmhGsHQanXHoJn0qgKjMAisGwy6TzfZyUnzSq2Yc9qDmAQv8Syu9wuFDZVjgpg8kWUxm9bQ8MMi8E3WwNayGXus00Oe5tyNIP'); define('SITE_URL', 'https://forchange.me'); // Configuration email define('SMTP_HOST', 'mail.imators.com'); define('SMTP_USERNAME', 'no-reply@imators.com'); define('SMTP_PASSWORD', 'imators.management4455*#@'); define('SMTP_PORT', 587); define('SMTP_FROM_EMAIL', 'no-reply@imators.com'); define('SMTP_FROM_NAME', 'Imators Developer'); ?> ``` ```php // success.php <?php session_start(); require_once('vendor/autoload.php'); require_once('config.php'); use PHPMailer\PHPMailer\PHPMailer; use PHPMailer\PHPMailer\Exception; if(isset($_SESSION['project_data'])) { $data = $_SESSION['project_data']; try { $mail = new PHPMailer(true); $mail->isSMTP(); $mail->Host = SMTP_HOST; $mail->SMTPAuth = true; $mail->Username = SMTP_USERNAME; $mail->Password = SMTP_PASSWORD; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = SMTP_PORT; $invoice_number = 'INV-' . time(); $invoice_date = date('Y-m-d'); $invoice_html = " <!DOCTYPE html> <html> <head> <style> body { font-family: Arial, sans-serif; } .invoice { max-width: 800px; margin: 0 auto; padding: 20px; } .header { text-align: center; margin-bottom: 30px; } .details { margin-bottom: 30px; } .table { width: 100%; border-collapse: collapse; } .table th, .table td { padding: 10px; border: 1px solid #ddd; } </style> </head> <body> <div class='invoice'> <div class='header'> <h1>INVOICE</h1> <p>#$invoice_number</p> <p>Date: $invoice_date</p> </div> <div class='details'> <p><strong>To:</strong> {$data['name']}</p> <p><strong>Email:</strong> {$data['email']}</p> <p><strong>Phone:</strong> {$data['phone']}</p> </div> <table class='table'> <tr> <th>Description</th> <th>Amount</th> </tr> <tr> <td>{$data['projectType']} Development ({$data['complexity']})</td> <td>€{$data['amount']}</td> </tr> </table> <div style='margin-top: 20px;'> <p><strong>Features:</strong></p> <ul>"; foreach($data['features'] as $feature) { $invoice_html .= "<li>$feature</li>"; } $invoice_html .= " </ul> </div> </div> </body> </html>"; $mail->setFrom(SMTP_FROM_EMAIL, SMTP_FROM_NAME); $mail->addAddress($data['email'], $data['name']); $mail->Subject = "Invoice #$invoice_number - Thank you for your payment"; $mail->isHTML(true); $mail->Body = $invoice_html; $mail->send(); } catch(Exception $e) { error_log("Email error: " . $e->getMessage()); } unset($_SESSION['project_data']); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Payment Successful</title> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="bg-black text-white min-h-screen flex items-center justify-center"> <div class="text-center"> <div class="mb-6"> <svg class="mx-auto h-16 w-16 text-green-500" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M5 13l4 4L19 7"></path> </svg> </div> <h1 class="text-4xl mb-4">Payment Successful!</h1> <p class="text-gray-400 mb-8">Thank you for your payment. An invoice has been sent to your email.</p> <a href="/" class="bg-white text-black px-6 py-2 rounded-lg hover:bg-gray-100 transition duration-300"> Return to Home </a> </div> </body> </html>
| ver. 1.6 |
Github
|
.
| PHP 8.1.33 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка