r99228 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99227‎ | r99228 | r99229 >
Date:18:38, 7 October 2011
Author:khorn
Status:ok
Tags:fundraising 
Comment:
Donationinterface.php has now eaten the two current gateway adapters. Identified some more things as possible cruft.
Modified paths:
  • /branches/fundraising/extensions/DonationInterface/donationinterface.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php (modified) (history)
  • /branches/fundraising/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php (modified) (history)

Diff [purge]

Index: branches/fundraising/extensions/DonationInterface/donationinterface.php
@@ -69,7 +69,6 @@
7070 $wgAutoloadClasses['DonationData'] = $donationinterface_dir . 'gateway_common/DonationData.php';
7171 $wgAutoloadClasses['GatewayAdapter'] = $donationinterface_dir . 'gateway_common/gateway.adapter.php';
7272 $wgAutoloadClasses['GatewayForm'] = $donationinterface_dir . 'gateway_common/GatewayForm.php';
73 -$wgAutoloadClasses['DonationApi'] = $donationinterface_dir . 'gateway_common/donation.api.php';
7473
7574 //load all possible form classes
7675 $wgAutoloadClasses['Gateway_Form'] = $donationinterface_dir . 'gateway_forms/Form.php';
@@ -94,6 +93,17 @@
9594 $wgAutoloadClasses['Gateway_Form_SingleColumn'] = $donationinterface_dir . 'gateway_forms/SingleColumn.php';
9695
9796
 97+//GlobalCollect gateway classes
 98+if ( $optionalParts['GlobalCollect'] === true ){
 99+ $wgAutoloadClasses['GlobalCollectGateway'] = $donationinterface_dir . 'globalcollect_gateway/globalcollect_gateway.body.php';
 100+ $wgAutoloadClasses['GlobalCollectGatewayResult'] = $donationinterface_dir . 'globalcollect_gateway/globalcollect_resultswitcher.body.php';
 101+ $wgAutoloadClasses['GlobalCollectAdapter'] = $donationinterface_dir . 'globalcollect_gateway/globalcollect.adapter.php';
 102+}
 103+//PayflowPro gateway classes
 104+if ( $optionalParts['PayflowPro'] === true ){
 105+ $wgAutoloadClasses['PayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.body.php';
 106+ $wgAutoloadClasses['PayflowProAdapter'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro.adapter.php';
 107+}
98108
99109 //Stomp classes
100110 if ($optionalParts['Stomp'] === true){
@@ -148,19 +158,113 @@
149159 $wgDonationInterfaceTest = false;
150160
151161 /**
 162+ * The URL to redirect a transaction to PayPal
 163+ */
 164+$wgDonationInterfacePaypalURL = '';
 165+$wgDonationInterfaceRetrySeconds = 5;
 166+
 167+//all of the following variables make sense to override directly,
 168+//or change "DonationInterface" to the gateway's id to override just for that gateway.
 169+//for instance: To override $wgDonationInterfaceUseSyslog just for GlobalCollect, add
 170+// $wgGolbalCollectGatewayUseSyslog = true
 171+// to LocalSettings.
 172+//
 173+
 174+$wgDonationInterfaceDisplayDebug = false;
 175+$wgDonationInterfaceUseSyslog = false;
 176+$wgDonationInterfaceSaveCommStats = false;
 177+
 178+$wgDonationInterfaceCSSVersion = 1;
 179+$wgDonationInterfaceTimeout = 5;
 180+$wgDonationInterfaceDefaultForm = 'TwoStepTwoColumn';
 181+
 182+/**
 183+ * A string or array of strings for making tokens more secure
 184+ *
 185+ * Please set this! If you do not, tokens are easy to get around, which can
 186+ * potentially leave you and your users vulnerable to CSRF or other forms of
 187+ * attack.
 188+ */
 189+$wgDonationInterfaceSalt = $wgSecretKey;
 190+
 191+/**
 192+ * A string that can contain wikitext to display at the head of the credit card form
 193+ *
 194+ * This string gets run like so: $wg->addHtml( $wg->Parse( $wgpayflowGatewayHeader ))
 195+ * You can use '@language' as a placeholder token to extract the user's language.
 196+ *
 197+ */
 198+$wgDonationInterfaceHeader = NULL;
 199+
 200+/**
 201+ * A string containing full URL for Javascript-disabled credit card form redirect
 202+ */
 203+$wgDonationInterfaceNoScriptRedirect = null;
 204+
 205+/**
 206+ * Proxy settings
 207+ *
 208+ * If you need to use an HTTP proxy for outgoing traffic,
 209+ * set wgPayflowGatweayUseHTTPProxy=TRUE and set $wgPayflowProGatewayHTTPProxy
 210+ * to the proxy desination.
 211+ * eg:
 212+ * $wgPayflowProGatewayUseHTTPProxy=TRUE;
 213+ * $wgPayflowProGatewayHTTPProxy='192.168.1.1:3128'
 214+ */
 215+$wgDonationInterfaceUseHTTPProxy = FALSE;
 216+$wgDonationInterfaceHTTPProxy = '';
 217+
 218+/**
 219+ * Set the max-age value for Squid
 220+ *
 221+ * If you have Squid enabled for caching, use this variable to configure
 222+ * the s-max-age for cached requests.
 223+ * @var int Time in seconds
 224+ */
 225+$wgDonationInterfaceSMaxAge = 6000;
 226+
 227+/**
 228+ * Configure price cieling and floor for valid contribution amount. Values
 229+ * should be in USD.
 230+ */
 231+$wgDonationInterfacePriceFloor = '1.00';
 232+$wgDonationInterfacePriceCeiling = '10000.00';
 233+
 234+/**
152235 * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime.
153236 */
154237 //$wgDonationInterfaceThankYouPage = 'https://wikimediafoundation.org/wiki/Thank_You';
155238 $wgDonationInterfaceThankYouPage = 'Donate-thanks';
156239 $wgDonationInterfaceFailPage = 'Donate-error';
157240
158 -/**
159 - * The URL to redirect a transaction to PayPal
160 - */
161 -$wgDonationInterfacePaypalURL = '';
162 -$wgDonationInterfaceRetrySeconds = 5;
163241
 242+//GlobalCollect gateway globals
 243+if ( $optionalParts['GlobalCollect'] === true ){
 244+ $wgGlobalCollectGatewayURL = 'https://ps.gcsip.nl/wdl/wdl';
 245+ $wgGlobalCollectGatewayTestingURL = 'https://'; // GlobalCollect testing URL
 246+
 247+ $wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID
 248+
 249+ $wgGlobalCollectGatewayHtmlFormDir = $donationinterface_dir . 'globalcollect_gateway/forms/html';
 250+ //this really should be redefined in LocalSettings.
 251+ $wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
 252+}
164253
 254+//PayflowPro gateway globals
 255+if ( $optionalParts['PayflowPro'] === true ){
 256+ $wgPayflowProGatewayURL = 'https://payflowpro.paypal.com';
 257+ $wgPayflowProGatewayTestingURL = 'https://pilot-payflowpro.paypal.com'; // Payflow testing URL
 258+
 259+ $wgPayflowProGatewayPartnerID = ''; // PayPal or original authorized reseller
 260+ $wgPayflowProGatewayVendorID = ''; // paypal merchant login ID
 261+ $wgPayflowProGatewayUserID = ''; // if one or more users are set up, authorized user ID, else same as VENDOR
 262+ $wgPayflowProGatewayPassword = ''; // merchant login password
 263+
 264+ $wgPayflowProGatewayHtmlFormDir = $donationinterface_dir . 'payflowpro_gateway/forms/html';
 265+ //this really should be redefined in LocalSettings.
 266+ $wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
 267+}
 268+
165269 //Paypal gateway globals
166270 if ( $optionalParts['Paypal'] === true ){
167271 // default variables that should be set in LocalSettings.php
@@ -267,12 +371,9 @@
268372
269373 /**
270374 * HTTP Proxy settings
271 - *
272 - * Default to settings in DonationInterface
273375 */
274 - //TODO: I think we can get rid of these entirely, due to the way we are now checking for globals in the extras.
275 - //$wgDonationInterfaceRecaptchaUseHTTPProxy = $wgDonationInterfaceUseHTTPProxy;
276 - //$wgDonationInterfaceRecaptchaHTTPProxy = $wgDonationInterfaceHTTPProxy;
 376+ $wgDonationInterfaceRecaptchaUseHTTPProxy = false;
 377+ $wgDonationInterfaceRecaptchaHTTPProxy = false;
277378
278379 /**
279380 * Use SSL to communicate with reCaptcha
@@ -286,7 +387,21 @@
287388 $wgDonationInterfaceRecaptchaComsRetryLimit = 3;
288389 }
289390
 391+/**
 392+ * SPECIAL PAGES
 393+ */
290394
 395+//GlobalCollect gateway special pages
 396+if ( $optionalParts['GlobalCollect'] === true ){
 397+ $wgSpecialPages['GlobalCollectGateway'] = 'GlobalCollectGateway';
 398+ $wgSpecialPages['GlobalCollectGatewayResult'] = 'GlobalCollectGatewayResult';
 399+}
 400+//PayflowPro gateway special pages
 401+if ( $optionalParts['PayflowPro'] === true ){
 402+ $wgSpecialPages['PayflowProGateway'] = 'PayflowProGateway';
 403+}
 404+
 405+
291406 /**
292407 * HOOKS
293408 */
@@ -294,8 +409,14 @@
295410 //Unit tests
296411 $wgHooks['UnitTestsList'][] = 'efDonationInterfaceUnitTests';
297412
 413+//PayflowPro gateway hooks
 414+if ( $optionalParts['PayflowPro'] === true ){
 415+ //TODO: Determine once and for all if this is actually as crufty as it looks.
 416+ $wgHooks['DonationInterface_Value'][] = 'pfpGatewayValue';
 417+ $wgHooks['DonationInterface_Page'][] = 'pfpGatewayPage';
 418+}
298419
299 -//Paypal gateway globals
 420+//Paypal gateway hooks
300421 if ( $optionalParts['Paypal'] === true ){
301422 //TODO: Determine if this is all cruft. I'm guessing "Probably".
302423 /**
@@ -333,12 +454,23 @@
334455 }
335456
336457 /**
337 - * ADDITIONAL MAGICAL GLOBALS
 458+ * APIS
338459 */
339 -
340460 // enable the API
341461 $wgAPIModules['donate'] = 'DonationApi';
 462+$wgAutoloadClasses['DonationApi'] = $donationinterface_dir . 'gateway_common/donation.api.php';
342463
 464+//Payflowpro API
 465+if ( $optionalParts['PayflowPro'] === true ){
 466+ $wgAPIModules['pfp'] = 'ApiPayflowProGateway';
 467+ $wgAutoloadClasses['ApiPayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/api_payflowpro_gateway.php';
 468+}
 469+
 470+
 471+/**
 472+ * ADDITIONAL MAGICAL GLOBALS
 473+ */
 474+
343475 // Resource modules
344476 $wgResourceTemplate = array(
345477 'localBasePath' => $donationinterface_dir . 'modules',
@@ -355,6 +487,26 @@
356488
357489 $wgExtensionMessagesFiles['DonateInterface'] = $donationinterface_dir . 'donate_interface/donate_interface.i18n.php';
358490
 491+
 492+//GlobalCollect gateway magical globals
 493+
 494+//TODO: all the bits where we make the i18n make sense for multiple gateways. This is clearly less than ideal.
 495+if ( $optionalParts['GlobalCollect'] === true ){
 496+ $wgExtensionMessagesFiles['GlobalCollectGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.i18n.php';
 497+ $wgExtensionMessagesFiles['GlobalCollectGatewayCountries'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.countries.i18n.php';
 498+ $wgExtensionMessagesFiles['GlobalCollectGatewayUSStates'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.us-states.i18n.php';
 499+ $wgExtensionAliasesFiles['GlobalCollectGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.alias.php';
 500+}
 501+
 502+//PayflowPro gateway magical globals
 503+if ( $optionalParts['PayflowPro'] === true ){
 504+ $wgExtensionMessagesFiles['PayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.i18n.php';
 505+ $wgExtensionMessagesFiles['PayflowProGatewayCountries'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.countries.i18n.php';
 506+ $wgExtensionMessagesFiles['PayflowProGatewayUSStates'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.us-states.i18n.php';
 507+ $wgExtensionAliasesFiles['PayflowProGateway'] = $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.alias.php';
 508+ $wgAjaxExportList[] = "fnPayflowProofofWork";
 509+}
 510+
359511 //Paypal magical globals
360512 if ( $optionalParts['Paypal'] === true ){
361513 $wgExtensionMessagesFiles['PaypalGateway'] = $donationinterface_dir . 'paypal_gateway/paypal_gateway.i18n.php';
@@ -395,27 +547,11 @@
396548 require_once( $donationinterface_dir . 'paypal_gateway/paypal_gateway.php' );
397549 }
398550
399 -
400 -
401 -
402 -
403 -
404 -
405 -//This is going to be a little funky.
406 -//Override this in LocalSettings.php BEFORE you include this file, if you want
407 -//to disable gateways.
408 -//TODO: Unfunktify, if you have a better idea here for auto-loading the classes after LocalSettings.php runs all the way.
409 -if ( !isset( $wgDonationInterfaceEnabledGateways ) ) {
410 - $wgDonationInterfaceEnabledGateways = array(
411 - 'payflowpro',
412 - 'globalcollect'
413 - );
 551+//---PayflowPro functions---
 552+if ($optionalParts['PayflowPro'] === true){
 553+ require_once( $donationinterface_dir . 'payflowpro_gateway/payflowpro_gateway.php' );
414554 }
415555
416 -foreach ( $wgDonationInterfaceEnabledGateways as $gateway ) {
417 - //include 'em
418 - require_once( $donationinterface_dir . $gateway . '_gateway/' . $gateway . '_gateway.php' );
419 -}
420556
421557
422558 function efDonationInterfaceUnitTests( &$files ) {
Index: branches/fundraising/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php
@@ -20,37 +20,37 @@
2121
2222 // Set up the new special page
2323 $dir = dirname( __FILE__ ) . '/';
24 -$wgAutoloadClasses['PayflowProGateway'] = $dir . 'payflowpro_gateway.body.php';
25 -$wgAutoloadClasses['PayflowProAdapter'] = $dir . 'payflowpro.adapter.php';
 24+//$wgAutoloadClasses['PayflowProGateway'] = $dir . 'payflowpro_gateway.body.php';
 25+//$wgAutoloadClasses['PayflowProAdapter'] = $dir . 'payflowpro.adapter.php';
2626
27 -$wgExtensionMessagesFiles['PayflowProGateway'] = $dir . 'payflowpro_gateway.i18n.php';
28 -$wgExtensionMessagesFiles['PayflowProGatewayCountries'] = $dir . 'payflowpro_gateway.countries.i18n.php';
29 -$wgExtensionMessagesFiles['PayflowProGatewayUSStates'] = $dir . 'payflowpro_gateway.us-states.i18n.php';
30 -$wgExtensionAliasesFiles['PayflowProGateway'] = $dir . 'payflowpro_gateway.alias.php';
31 -$wgSpecialPages['PayflowProGateway'] = 'PayflowProGateway';
32 -$wgAjaxExportList[] = "fnPayflowProofofWork";
 27+//$wgExtensionMessagesFiles['PayflowProGateway'] = $dir . 'payflowpro_gateway.i18n.php';
 28+//$wgExtensionMessagesFiles['PayflowProGatewayCountries'] = $dir . 'payflowpro_gateway.countries.i18n.php';
 29+//$wgExtensionMessagesFiles['PayflowProGatewayUSStates'] = $dir . 'payflowpro_gateway.us-states.i18n.php';
 30+//$wgExtensionAliasesFiles['PayflowProGateway'] = $dir . 'payflowpro_gateway.alias.php';
 31+//$wgSpecialPages['PayflowProGateway'] = 'PayflowProGateway';
 32+//$wgAjaxExportList[] = "fnPayflowProofofWork";
3333
3434
3535 // set defaults, these should be assigned in LocalSettings.php
36 -$wgPayflowProGatewayURL = 'https://payflowpro.paypal.com';
37 -$wgPayflowProGatewayTestingURL = 'https://pilot-payflowpro.paypal.com'; // Payflow testing URL
 36+//$wgPayflowProGatewayURL = 'https://payflowpro.paypal.com';
 37+//$wgPayflowProGatewayTestingURL = 'https://pilot-payflowpro.paypal.com'; // Payflow testing URL
3838
39 -$wgPayFlowProGatewayCSSVersion = 1;
40 -
41 -$wgPayflowProGatewayPartnerID = ''; // PayPal or original authorized reseller
42 -$wgPayflowProGatewayVendorID = ''; // paypal merchant login ID
43 -$wgPayflowProGatewayUserID = ''; // if one or more users are set up, authorized user ID, else same as VENDOR
44 -$wgPayflowProGatewayPassword = ''; // merchant login password
 39+//$wgPayFlowProGatewayCSSVersion = 1;
 40+//
 41+//$wgPayflowProGatewayPartnerID = ''; // PayPal or original authorized reseller
 42+//$wgPayflowProGatewayVendorID = ''; // paypal merchant login ID
 43+//$wgPayflowProGatewayUserID = ''; // if one or more users are set up, authorized user ID, else same as VENDOR
 44+//$wgPayflowProGatewayPassword = ''; // merchant login password
4545 // a boolean to determine if we're in testing mode
46 -$wgPayflowProGatewayTest = FALSE;
 46+//$wgPayflowProGatewayTest = FALSE;
4747
4848 // timeout in seconds for communicating with paypal
49 -$wgPayflowProGatewayTimeout = 5;
 49+//$wgPayflowProGatewayTimeout = 5;
5050
5151 /**
5252 * The default form to use
5353 */
54 -$wgPayflowProGatewayDefaultForm = 'TwoStepTwoColumn';
 54+//$wgPayflowProGatewayDefaultForm = 'TwoStepTwoColumn';
5555
5656 /**
5757 * A string or array of strings for making tokens more secure
@@ -59,54 +59,49 @@
6060 * potentially leave you and your users vulnerable to CSRF or other forms of
6161 * attack.
6262 */
63 -$wgPayflowProGatewaySalt = $wgSecretKey;
 63+//$wgPayflowProGatewaySalt = $wgSecretKey;
6464
65 -$wgPayflowProGatewayDBserver = $wgDBserver;
66 -$wgPayflowProGatewayDBname = $wgDBname;
67 -$wgPayflowProGatewayDBuser = $wgDBuser;
68 -$wgPayflowProGatewayDBpassword = $wgDBpassword;
 65+///**
 66+// * A string that can contain wikitext to display at the head of the credit card form
 67+// *
 68+// * This string gets run like so: $wg->addHtml( $wg->Parse( $wgpayflowGatewayHeader ))
 69+// * You can use '@language' as a placeholder token to extract the user's language.
 70+// *
 71+// */
 72+//$wgPayflowProGatewayHeader = NULL;
 73+//
 74+///**
 75+// * A string containing full URL for Javascript-disabled credit card form redirect
 76+// */
 77+//$wgPayflowProGatewayNoScriptRedirect = null;
 78+//
 79+///**
 80+// * Proxy settings
 81+// *
 82+// * If you need to use an HTTP proxy for outgoing traffic,
 83+// * set wgPayflowGatweayUseHTTPProxy=TRUE and set $wgPayflowProGatewayHTTPProxy
 84+// * to the proxy desination.
 85+// * eg:
 86+// * $wgPayflowProGatewayUseHTTPProxy=TRUE;
 87+// * $wgPayflowProGatewayHTTPProxy='192.168.1.1:3128'
 88+// */
 89+//$wgPayflowProGatewayUseHTTPProxy = FALSE;
 90+//$wgPayflowProGatewayHTTPProxy = '';
 91+//
 92+///**
 93+// * Set the max-age value for Squid
 94+// *
 95+// * If you have Squid enabled for caching, use this variable to configure
 96+// * the s-max-age for cached requests.
 97+// * @var int Time in seconds
 98+// */
 99+//$wgPayflowProGatewaySMaxAge = 6000;
69100
70101 /**
71 - * A string that can contain wikitext to display at the head of the credit card form
72 - *
73 - * This string gets run like so: $wg->addHtml( $wg->Parse( $wgpayflowGatewayHeader ))
74 - * You can use '@language' as a placeholder token to extract the user's language.
75 - *
76 - */
77 -$wgPayflowProGatewayHeader = NULL;
78 -
79 -/**
80 - * A string containing full URL for Javascript-disabled credit card form redirect
81 - */
82 -$wgPayflowProGatewayNoScriptRedirect = null;
83 -
84 -/**
85 - * Proxy settings
86 - *
87 - * If you need to use an HTTP proxy for outgoing traffic,
88 - * set wgPayflowGatweayUseHTTPProxy=TRUE and set $wgPayflowProGatewayHTTPProxy
89 - * to the proxy desination.
90 - * eg:
91 - * $wgPayflowProGatewayUseHTTPProxy=TRUE;
92 - * $wgPayflowProGatewayHTTPProxy='192.168.1.1:3128'
93 - */
94 -$wgPayflowProGatewayUseHTTPProxy = FALSE;
95 -$wgPayflowProGatewayHTTPProxy = '';
96 -
97 -/**
98 - * Set the max-age value for Squid
99 - *
100 - * If you have Squid enabled for caching, use this variable to configure
101 - * the s-max-age for cached requests.
102 - * @var int Time in seconds
103 - */
104 -$wgPayflowProGatewaySMaxAge = 6000;
105 -
106 -/**
107102 * Directory for HTML forms (used by RapidHtml form class)
108103 * @var string
109104 */
110 -$wgPayflowProGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html";
 105+//$wgPayflowProGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html";
111106
112107 /**
113108 * An array of allowed HTML forms.
@@ -115,34 +110,27 @@
116111 * /never/ be loaded by the rapid html form loader!
117112 * @var string
118113 */
119 -$wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
 114+//$wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
120115
121 -/**
122 - * Configure PayflowproGateway to use syslog for log messages rather than wfDebugLog
123 - *
124 - * @var bool
125 - */
126 -$wgPayflowProGatewayUseSyslog = false;
 116+///**
 117+// * Configure price ceiling and floor for valid contribution amount. Values
 118+// * should be in USD.
 119+// */
 120+//$wgPayflowProGatewayPriceFloor = '1.00';
 121+//$wgPayflowProGatewayPriceCeiling = '10000.00';
127122
128123 /**
129 - * Configure price ceiling and floor for valid contribution amount. Values
130 - * should be in USD.
131 - */
132 -$wgPayflowProGatewayPriceFloor = '1.00';
133 -$wgPayflowProGatewayPriceCeiling = '10000.00';
134 -
135 -/**
136124 * Hooks required to interface with the donation extension (include <donate> on page)
137125 *
138126 * gwValue supplies the value of the form option, the name that appears on the form
139127 * and the currencies supported by the gateway in the $values array
140 - */
141 -$wgHooks['DonationInterface_Value'][] = 'pfpGatewayValue';
142 -$wgHooks['DonationInterface_Page'][] = 'pfpGatewayPage';
 128+// */
 129+//$wgHooks['DonationInterface_Value'][] = 'pfpGatewayValue';
 130+//$wgHooks['DonationInterface_Page'][] = 'pfpGatewayPage';
143131
144 -// enable the API
145 -$wgAPIModules['pfp'] = 'ApiPayflowProGateway';
146 -$wgAutoloadClasses['ApiPayflowProGateway'] = $dir . 'api_payflowpro_gateway.php';
 132+//// enable the API
 133+//$wgAPIModules['pfp'] = 'ApiPayflowProGateway';
 134+//$wgAutoloadClasses['ApiPayflowProGateway'] = $dir . 'api_payflowpro_gateway.php';
147135
148136 /**
149137 * Hook to register form value and display name of this gateway
Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_resultswitcher.body.php
@@ -36,8 +36,7 @@
3737 * @param $par Mixed: parameter passed to the page or null
3838 */
3939 public function execute( $par ) {
40 - global $wgRequest, $wgOut, $wgExtensionAssetsPath,
41 - $wgPayFlowProGatewayCSSVersion;
 40+ global $wgRequest, $wgOut, $wgExtensionAssetsPath;
4241
4342 $referrer = $wgRequest->getHeader( 'referer' );
4443
@@ -54,7 +53,7 @@
5554
5655 $wgOut->addExtensionStyle(
5756 $wgExtensionAssetsPath . '/DonationInterface/gateway_forms/css/gateway.css?284' .
58 - $wgPayFlowProGatewayCSSVersion );
 57+ $this->adapter->getGlobal( 'CSSVersion' ) );
5958
6059 $this->setHeaders();
6160
Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.php
@@ -1,4 +1,7 @@
22 <?php
 3+/**
 4+ * TODO: Remove this file. :)
 5+ */
36
47 # Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly.
58 if ( !defined( 'MEDIAWIKI' ) ) {
@@ -18,37 +21,37 @@
1922 'url' => 'http://www.mediawiki.org/wiki/Extension:GlobalCollectGateway',
2023 );
2124
22 -$wgGlobalCollectGatewayUseSyslog = false;
 25+//$wgGlobalCollectGatewayUseSyslog = false;
2326
2427 // Set up the new special page
2528 $dir = dirname( __FILE__ ) . '/';
26 -$wgAutoloadClasses['GlobalCollectGateway'] = $dir . 'globalcollect_gateway.body.php';
27 -$wgAutoloadClasses['GlobalCollectGatewayResult'] = $dir . 'globalcollect_resultswitcher.body.php';
28 -$wgAutoloadClasses['GlobalCollectAdapter'] = $dir . 'globalcollect.adapter.php';
29 -$wgExtensionMessagesFiles['GlobalCollectGateway'] = $dir . '../payflowpro_gateway/payflowpro_gateway.i18n.php';
30 -$wgExtensionMessagesFiles['GlobalCollectGatewayCountries'] = $dir . '../payflowpro_gateway/payflowpro_gateway.countries.i18n.php';
31 -$wgExtensionMessagesFiles['GlobalCollectGatewayUSStates'] = $dir . '../payflowpro_gateway/payflowpro_gateway.us-states.i18n.php';
32 -$wgExtensionAliasesFiles['GlobalCollectGateway'] = $dir . '../payflowpro_gateway/payflowpro_gateway.alias.php';
33 -$wgSpecialPages['GlobalCollectGateway'] = 'GlobalCollectGateway';
34 -$wgSpecialPages['GlobalCollectGatewayResult'] = 'GlobalCollectGatewayResult';
 29+//$wgAutoloadClasses['GlobalCollectGateway'] = $dir . 'globalcollect_gateway.body.php';
 30+//$wgAutoloadClasses['GlobalCollectGatewayResult'] = $dir . 'globalcollect_resultswitcher.body.php';
 31+//$wgAutoloadClasses['GlobalCollectAdapter'] = $dir . 'globalcollect.adapter.php';
 32+//$wgExtensionMessagesFiles['GlobalCollectGateway'] = $dir . '../payflowpro_gateway/payflowpro_gateway.i18n.php';
 33+//$wgExtensionMessagesFiles['GlobalCollectGatewayCountries'] = $dir . '../payflowpro_gateway/payflowpro_gateway.countries.i18n.php';
 34+//$wgExtensionMessagesFiles['GlobalCollectGatewayUSStates'] = $dir . '../payflowpro_gateway/payflowpro_gateway.us-states.i18n.php';
 35+//$wgExtensionAliasesFiles['GlobalCollectGateway'] = $dir . '../payflowpro_gateway/payflowpro_gateway.alias.php';
 36+//$wgSpecialPages['GlobalCollectGateway'] = 'GlobalCollectGateway';
 37+//$wgSpecialPages['GlobalCollectGatewayResult'] = 'GlobalCollectGatewayResult';
3538 //$wgAjaxExportList[] = "fnGlobalCollectofofWork";
3639 // set defaults, these should be assigned in LocalSettings.php
37 -$wgGlobalCollectGatewayURL = 'https://ps.gcsip.nl/wdl/wdl';
38 -$wgGlobalCollectGatewayTestingURL = 'https://'; // GlobalCollect testing URL
 40+//$wgGlobalCollectGatewayURL = 'https://ps.gcsip.nl/wdl/wdl';
 41+//$wgGlobalCollectGatewayTestingURL = 'https://'; // GlobalCollect testing URL
3942
40 -$wgGlobalCollectGatewayCSSVersion = 1;
 43+//$wgGlobalCollectGatewayCSSVersion = 1;
4144
42 -$wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID
 45+//$wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID
4346 // a boolean to determine if we're in testing mode
44 -$wgGlobalCollectGatewayTest = FALSE;
 47+//$wgGlobalCollectGatewayTest = FALSE;
4548
4649 // timeout in seconds for communicating with [gateway]
47 -$wgGlobalCollectGatewayTimeout = 2;
 50+//$wgGlobalCollectGatewayTimeout = 2;
4851
4952 /**
5053 * The default form to use
5154 */
52 -$wgGlobalCollectGatewayDefaultForm = 'TwoStepTwoColumn';
 55+//$wgGlobalCollectGatewayDefaultForm = 'TwoStepTwoColumn';
5356
5457 /**
5558 * A string or array of strings for making tokens more secure
@@ -57,7 +60,7 @@
5861 * potentially leave you and your users vulnerable to CSRF or other forms of
5962 * attack.
6063 */
61 -$wgGlobalCollectGatewaySalt = $wgSecretKey;
 64+//$wgGlobalCollectGatewaySalt = $wgSecretKey;
6265
6366
6467 /**
@@ -67,12 +70,12 @@
6871 * You can use '@language' as a placeholder token to extract the user's language.
6972 *
7073 */
71 -$wgGlobalCollectGatewayHeader = NULL;
 74+//$wgGlobalCollectGatewayHeader = NULL;
7275
7376 /**
7477 * A string containing full URL for Javascript-disabled credit card form redirect
7578 */
76 -$wgGlobalCollectGatewayNoScriptRedirect = null;
 79+//$wgGlobalCollectGatewayNoScriptRedirect = null;
7780
7881 /**
7982 * Proxy settings
@@ -84,8 +87,8 @@
8588 * $wgGlobalCollectGatewayUseHTTPProxy=TRUE;
8689 * $wgGlobalCollectGatewayHTTPProxy='192.168.1.1:3128'
8790 */
88 -$wgGlobalCollectGatewayUseHTTPProxy = FALSE;
89 -$wgGlobalCollectGatewayHTTPProxy = '';
 91+//$wgGlobalCollectGatewayUseHTTPProxy = FALSE;
 92+//$wgGlobalCollectGatewayHTTPProxy = '';
9093
9194 /**
9295 * Set the max-age value for Squid
@@ -94,13 +97,13 @@
9598 * the s-max-age for cached requests.
9699 * @var int Time in seconds
97100 */
98 -$wgGlobalCollectGatewaySMaxAge = 6000;
 101+//$wgGlobalCollectGatewaySMaxAge = 6000;
99102
100103 /**
101104 * Directory for HTML forms (used by RapidHtml form class)
102105 * @var string
103106 */
104 -$wgGlobalCollectGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html";
 107+//$wgGlobalCollectGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html";
105108
106109 /**
107110 * An array of allowed HTML forms.
@@ -109,17 +112,17 @@
110113 * /never/ be loaded by the rapid html form loader!
111114 * @var string
112115 */
113 -$wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
 116+//$wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms;
114117
115 -/**
116 - * Configure price cieling and floor for valid contribution amount. Values
117 - * should be in USD.
118 - */
119 -$wgGlobalCollectGatewayPriceFloor = '1.00';
120 -$wgGlobalCollectGatewayPriceCeiling = '10000.00';
121 -
122 -/**
123 - * Thank You & Fail pages.
124 - */
125 -$wgGlobalCollectGatewayThankYouPage = $wgDonationInterfaceThankYouPage;
126 -$wgGlobalCollectGatewayFailPage = $wgDonationInterfaceFailPage;
\ No newline at end of file
 118+///**
 119+// * Configure price cieling and floor for valid contribution amount. Values
 120+// * should be in USD.
 121+// */
 122+//$wgGlobalCollectGatewayPriceFloor = '1.00';
 123+//$wgGlobalCollectGatewayPriceCeiling = '10000.00';
 124+//
 125+///**
 126+// * Thank You & Fail pages.
 127+// */
 128+//$wgGlobalCollectGatewayThankYouPage = $wgDonationInterfaceThankYouPage;
 129+//$wgGlobalCollectGatewayFailPage = $wgDonationInterfaceFailPage;
\ No newline at end of file

Follow-up revisions

RevisionCommit summaryAuthorDate
r99261General cruft removal + one silly bug fix....khorn21:22, 7 October 2011
r99272Killing two lines of cruft: The countryCodes.inc file should no longer be acc...khorn21:56, 7 October 2011

Status & tagging log