Changeset View
Changeset View
Standalone View
Standalone View
fundraisers/randameetings2014/notify.php
1 | <?php | 1 | <?php | ||
---|---|---|---|---|---|
2 | 2 | | |||
3 | $do_debug = true; | 3 | $do_debug = true; | ||
4 | 4 | | |||
5 | die("Donation to the Randa Meeting 2014 are not supported anymore. See <a href="/donations">Donnations</a>"); | ||||
6 | | ||||
5 | // STEP 1: read POST data | 7 | // STEP 1: read POST data | ||
6 | 8 | | |||
7 | // Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. | 9 | // Reading POSTed data directly from $_POST causes serialization issues with array data in the POST. | ||
8 | // Instead, read raw POST data from the input stream. | 10 | // Instead, read raw POST data from the input stream. | ||
9 | $raw_post_data = file_get_contents('php://input'); | 11 | $raw_post_data = file_get_contents('php://input'); | ||
10 | $raw_post_array = explode('&', $raw_post_data); | 12 | $raw_post_array = explode('&', $raw_post_data); | ||
11 | $myPost = array(); | 13 | $myPost = array(); | ||
12 | foreach ($raw_post_array as $keyval) { | 14 | foreach ($raw_post_array as $keyval) { | ||
▲ Show 20 Lines • Show All 56 Lines • ▼ Show 20 Line(s) | 63 | if (strcmp ($res, "VERIFIED") == 0) { | |||
69 | $receiver_email = $_POST['receiver_email']; | 71 | $receiver_email = $_POST['receiver_email']; | ||
70 | $payer_email = $_POST['payer_email']; | 72 | $payer_email = $_POST['payer_email']; | ||
71 | if ($_POST['option_selection1'] === "Yes") { | 73 | if ($_POST['option_selection1'] === "Yes") { | ||
72 | $memo = $_POST['address_name']; | 74 | $memo = $_POST['address_name']; | ||
73 | } else { | 75 | } else { | ||
74 | $memo = ""; | 76 | $memo = ""; | ||
75 | } | 77 | } | ||
76 | 78 | | |||
77 | require("donations_auth.inc"); | 79 | require("config.php"); | ||
78 | 80 | | |||
79 | // check the payment_status is Completed | 81 | // check the payment_status is Completed | ||
80 | if ( $payment_status != "Completed") { | 82 | if ( $payment_status != "Completed") { | ||
81 | if ($do_debug) { | 83 | if ($do_debug) { | ||
82 | fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); | 84 | fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); | ||
83 | } | 85 | } | ||
84 | die("Payment status is ".$payment_status); | 86 | die("Payment status is ".$payment_status); | ||
85 | } | 87 | } | ||
▲ Show 20 Lines • Show All 53 Lines • Show Last 20 Lines |