r74385 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r74384‎ | r74385 | r74386 >
Date:20:26, 6 October 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Updated donate interface to pass optional first/last name and email params as well as use new email optout field name; Updated paypal gateway to allow for an optional url to use for the redirect page prior to PayPal
Modified paths:
  • /trunk/extensions/DonationInterface/donate_interface/donate_interface.php (modified) (history)
  • /trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/paypal_gateway/paypal_gateway.php
@@ -23,6 +23,7 @@
2424
2525 // default variables that should be set in LocalSettings.php
2626 $wgPaypalEmail = '';
 27+$wgPaypalUrl = 'http://wikimediafoundation.org/wiki/Special:ContributionTracking?';
2728
2829 /**
2930 * Hooks required to interface with the donation extension (include <donate> on page)
@@ -75,13 +76,13 @@
7677 */
7778 function paypalGatewayPage( &$url ) {
7879 // Business email address set in LocalSettings.php
79 - global $wgPaypalEmail;
 80+ global $wgPaypalEmail, $wgPaypalUrl;
8081
8182 // to go directly to Paypal, will be used for this extension in general
8283 //$url['paypal'] = "https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=" . urlencode( $wgPaypalEmail ) . "&lc=US&no_note=1&no_shipping=1&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted";
8384
8485 // specifically for Wikimedia, goes to processor page
85 - $url['paypal'] = 'http://wikimediafoundation.org/wiki/Special:ContributionTracking?';
 86+ $url['paypal'] = $wgPaypalUrl;
8687
8788 return true;
8889 }
Index: trunk/extensions/DonationInterface/donate_interface/donate_interface.php
@@ -355,7 +355,10 @@
356356 'language' => $wgRequest->getText( 'language', 'en' ),
357357 'comment' => $wgRequest->getText( 'comment', '' ),
358358 'comment-option' => $wgRequest->getText( 'comment-option', '0' ),
359 - 'email' => $wgRequest->getText( 'opt', '0' ),
 359+ 'email-opt' => $wgRequest->getText( 'email-opt', 0 ),
 360+ 'fname' => $wgRequest->getText( 'fname', null ),
 361+ 'lname' => $wgRequest->getText( 'lname', null ),
 362+ 'email' => $wgRequest->getText( 'email', null ),
360363 );
361364
362365 // ask payment processor extensions for their URL/page title

Status & tagging log