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