Index: trunk/www/sites/www/community/donations/button.php =================================================================== --- trunk/www/sites/www/community/donations/button.php (revision 1537669) +++ trunk/www/sites/www/community/donations/button.php (revision 1537670) @@ -1,20 +1,20 @@ Paypal Donation
- - + +
Index: trunk/www/sites/www/community/donations/index.php =================================================================== --- trunk/www/sites/www/community/donations/index.php (revision 1537669) +++ trunk/www/sites/www/community/donations/index.php (revision 1537670) @@ -1,92 +1,92 @@ "Donations" ]); require('../../aether/header.php'); $site_root = "../../"; ?>

Donations

Donating is the easiest and fastest way to efficiently support KDE and its projects. KDE projects are available for free therefore your donation is needed to cover things that require money like servers, contributor meetings, etc.

KDE e.V. is the non-profit organization behind the KDE community. It is based in Germany and thus donations are tax deductible in Germany. If you live in another EU country your donation might also be tax deductible. Please consult your tax advisor for details.


One Time Donation Recurring Donation

');"> " /> - - + +

Previous donations page

Other ways to donate

$value) { if($get_magic_quotes_exists == true && get_magic_quotes_gpc() == 1) { $value = urlencode(stripslashes($value)); } else { $value = urlencode($value); } $req .= "&$key=$value"; } if ($do_debug) { $debug = fopen('/tmp/data.txt', 'a+'); + fwrite($debug, "Raw Data: $raw_post_data\n"); + fwrite($debug, "PHP Decoded: " . var_export($_POST, true) . "\n"); fwrite($debug, "verify: $req\n"); } $ch = curl_init('https://www.paypal.com/cgi-bin/webscr'); curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); curl_setopt($ch, CURLOPT_POSTFIELDS, $req); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_FORBID_REUSE, 1); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close')); // In wamp-like environments that do not come bundled with root authority certificates, // please download 'cacert.pem' from "http://curl.haxx.se/docs/caextract.html" and set // the directory path of the certificate as shown below: // curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__) . '/cacert.pem'); if( !($res = curl_exec($ch)) ) { if ($do_debug) { fwrite($debug, "Error in calling curl_exec\n"); } curl_close($ch); exit; } curl_close($ch); if (strcmp ($res, "VERIFIED") == 0) { // assign posted variables to local variables $item_name = $_POST['item_name']; $item_number = $_POST['item_number']; $payment_status = $_POST['payment_status']; $payment_amount = $_POST['mc_gross']; $payment_currency = $_POST['mc_currency']; $txn_id = $_POST['txn_id']; $memo = $_POST['memo']; $receiver_email = $_POST['receiver_email']; $payer_email = $_POST['payer_email']; $donate_url = $_POST['custom']; require("donations_auth.inc"); /* $query = "CREATE TABLE IF NOT EXISTS donations ( id "; $query .= "INT AUTO_INCREMENT PRIMARY KEY, date DATETIME, "; $query .= "amount float(10,2), message VARCHAR(255), "; $query .= "transactionid VARCHAR(255) UNIQUE, donate_url VARCHAR(255) )"; mysql_query($query,$sq); echo mysql_error(); */ // check the payment_status is Completed if ( $payment_status != "Completed") { if ($do_debug) { fwrite($debug, "Unexpected payment status: ".$payment_status."\n"); } die("Payment status is ".$payment_status); } // check that receiver_email is your Primary PayPal email if ( $receiver_email != "kde-ev-board@kde.org") { if ($do_debug) { fwrite($debug, "Unexpected receiver email: ".$receiver_email."\n"); } die("Unknown email"); } // check that payment_amount/payment_currency are correct if ( $payment_currency != "EUR" ) { if ($do_debug) { fwrite($debug, "Unexpected payment currency: ".$payment_currency."\n"); } die("Unknown currency used"); } // sanitise date $date = strtotime( $_POST["payment_date"] ); if ( $date === false ) { echo "Date parsing failed, assuming now()"; $date = time(); } $date = date("Y-m-d H:i:s", $date); // process payment $query = "REPLACE into donations VALUES( '', \"".$date."\""; $query .= ", ".$payment_amount.", \"".addslashes( $memo )."\""; $query .= ",\"".$txn_id."\", \"".addslashes( $donate_url )."\" )"; mysql_query($query, $sq); if ($do_debug) { fwrite( $debug, "\nQuery:".$query."\n" ); fwrite( $debug, "Error:".mysql_error()."\n" ); } } else if (strcmp ($res, "INVALID") == 0) { if ($do_debug) { fwrite($debug, "Invalid transaction\n"); } } else { if ($do_debug) { fwrite($debug, "Paypal returned neither VERIFIED nor INVALID\n"); fwrite($debug, $res."\n"); } } if ($do_debug) { fwrite( $debug, "\n---------------------------------------\n" ); fclose($debug); } ?>