Advertisement
Guest User

Untitled

a guest
Mar 11th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.48 KB | None | 0 0
  1. <?php
  2.  
  3. use PHPMailer\PHPMailer\PHPMailer;
  4.  
  5. require "PHPMailer/PHPMailer.php";
  6. require "PHPMailer/Exception.php";
  7. require "PHPMailer/SMTP.php";
  8.  
  9. if ($_SERVER['REQUEST_METHOD'] != 'POST') {
  10. header('Location: index.html');
  11. exit();
  12. }
  13.  
  14. $ch = curl_init();
  15. curl_setopt($ch, CURLOPT_URL, 'https://ipnpb.sandbox.paypal.com/cgi-bin/webscr');
  16. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  17. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  18. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  19. curl_setopt($ch, CURLOPT_POST, 1);
  20. curl_setopt($ch, CURLOPT_POSTFIELDS, "cmd=_notify-validate&" . http_build_query($_POST));
  21. $response = curl_exec($ch);
  22. curl_close($ch);
  23.  
  24. if ($response == "VERIFIED" && $_POST['receiver_email'] == "paypalmmv@gmail.com") {
  25. $cEmail = $_POST['payer_email'];
  26. $name = $_POST['first_name'] . " " . $_POST['last_name'];
  27. $price = $_POST['mc_gross'];
  28. $currency = $_POST['mc_currency'];
  29. $item = $_POST['item_number'];
  30. $paymentStatus = $_POST['payment_status'];
  31.  
  32. if ($item == "NFA" && $currency == "USD" && $paymentStatus == "Completed" && $price == 1.5) {
  33. trigger_error("Well the if statement works");
  34. //$servername = "localhost";
  35. //$username = "nigger_ipn";
  36. //$password = "nigger";
  37. //$dbname = "nigger";
  38. //$conn = new mysqli($servername, $username, $password, $dbname);
  39. //if ($conn->connect_error) {
  40. // die("Connection failed: " . $conn->connect_error);
  41. //}
  42. //$sql = "SELECT * FROM `NFA` LIMIT 0, 4";
  43. //$result = $conn->query($sql);
  44. $mail = new PHPMailer();
  45. $mail->isSMTP();
  46. $mail->SMTPDebug = 0;
  47. $mail->Host = 'niggerjewhost';
  48. $mail->SMTPAuth = true;
  49. $mail->Username = "niggermeail";
  50. $mail->Password = "niggerpass";
  51. $mail->SMTPSecure = 'tls';
  52. $mail->setFrom('niggermail', 'niggeralts');
  53. $mail->addAddress($cEmail, $name);
  54. $mail->isHTML(true);
  55. $mail->Subject = "NiggerAlts 150x NFA Purchase Details";
  56. $mail->Body = "
  57. <center>Hi, <br><br>
  58. <center>Thank you for your purchase of 100x NFA alts at NiggerAlts.<br><br>
  59. <center>Purchased Alts: <br>";
  60. $mail->send();
  61. echo 'Message has been sent';
  62. if (!$mail->send()) {
  63. trigger_error("Message was not sent.");
  64. trigger_error("Mailer error: ") . $mail->ErrorInfo;
  65. } else {
  66. trigger_error("Message has been sent.");
  67. }
  68. }
  69. }
  70. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement