Changeset View
Changeset View
Standalone View
Standalone View
fundraisers/randameetings2017/notify.php
1 | <?php namespace Listener; | 1 | <?php namespace Listener; | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | $do_debug = true; | 3 | $do_debug = true; | ||
4 | die("Donation to the Randa Meeting 2017 are not supported anymore. See <a href="/donations">Donnations</a>"); | ||||
4 | 5 | | |||
5 | require('paypalIPN.php'); | 6 | require('paypalIPN.php'); | ||
6 | 7 | | |||
7 | use PaypalIPN; | 8 | use PaypalIPN; | ||
8 | 9 | | |||
9 | $ipn = new PaypalIPN(); | 10 | $ipn = new PaypalIPN(); | ||
10 | 11 | | |||
11 | $verified = $ipn->verifyIPN(); | 12 | $verified = $ipn->verifyIPN(); | ||
12 | $data_text = ""; | 13 | $data_text = ""; | ||
13 | foreach ($_POST as $key => $value) { | 14 | foreach ($_POST as $key => $value) { | ||
14 | $data_text .= $key . " = " . $value . "\r\n"; | 15 | $data_text .= $key . " = " . $value . "\r\n"; | ||
15 | } | 16 | } | ||
16 | // Create debug file | 17 | // Create debug file | ||
17 | if ($do_debug) { | 18 | if ($do_debug) { | ||
18 | $debug = fopen('/tmp/randa2017.txt', 'a+'); | 19 | $debug = fopen('/tmp/randa2017.txt', 'a+'); | ||
19 | fwrite($debug, "verify: $data_text\n"); | 20 | fwrite($debug, "verify: $data_text\n"); | ||
20 | } | 21 | } | ||
21 | 22 | | |||
22 | if ($verified) { | 23 | if ($verified) { | ||
23 | require_once("config.php"); | 24 | require_once("www_config.php"); | ||
24 | $payment_amount = $_POST['mc_gross']; | 25 | $payment_amount = $_POST['mc_gross']; | ||
25 | $payment_status = $_POST['payment_status']; | 26 | $payment_status = $_POST['payment_status']; | ||
26 | $receiver_email = $_POST["receiver_email"]; | 27 | $receiver_email = $_POST["receiver_email"]; | ||
27 | $txn_id = $_POST['txn_id']; | 28 | $txn_id = $_POST['txn_id']; | ||
28 | if ($_POST['option_selection1'] === "Yes") { | 29 | if ($_POST['option_selection1'] === "Yes") { | ||
29 | $name = $_POST['address_name']; | 30 | $name = $_POST['address_name']; | ||
30 | } else { | 31 | } else { | ||
31 | $name = ""; | 32 | $name = ""; | ||
▲ Show 20 Lines • Show All 48 Lines • Show Last 20 Lines |