Index: trunk/extensions/DonationInterface/donationinterface.php |
— | — | @@ -5,7 +5,7 @@ |
6 | 6 | * |
7 | 7 | * To install the DontaionInterface extension, put the following line in LocalSettings.php: |
8 | 8 | * require_once( "\$IP/extensions/DonationInterface/donationinterface.php" ); |
9 | | - * |
| 9 | + * |
10 | 10 | */ |
11 | 11 | |
12 | 12 | |
— | — | @@ -21,7 +21,7 @@ |
22 | 22 | // Extension credits that will show up on Special:Version |
23 | 23 | $wgExtensionCredits['specialpage'][] = array( |
24 | 24 | 'name' => 'Donation Interface', |
25 | | - 'author' => 'Katie Horn', |
| 25 | + 'author' => array( 'Katie Horn', 'Ryan Kaldari' , 'Arthur Richards', 'Jeremy Postlethwaite' ), |
26 | 26 | 'version' => '1.0.0', |
27 | 27 | 'descriptionmsg' => 'donationinterface-desc', |
28 | 28 | 'url' => 'http://www.mediawiki.org/wiki/Extension:DonationInterface', |
— | — | @@ -30,12 +30,12 @@ |
31 | 31 | $donationinterface_dir = dirname( __FILE__ ) . '/'; |
32 | 32 | |
33 | 33 | /** |
34 | | - * Figure out what we've got enabled. |
| 34 | + * Figure out what we've got enabled. |
35 | 35 | */ |
36 | 36 | |
37 | | -$optionalParts = array( //define as fail closed. This variable will be unset before we leave this file. |
38 | | - 'Extras' => false, //this one gets set in the next loop, so don't bother. |
39 | | - 'CustomFilters' => false, //Also gets set in the next loop. |
| 37 | +$optionalParts = array( //define as fail closed. This variable will be unset before we leave this file. |
| 38 | + 'Extras' => false, //this one gets set in the next loop, so don't bother. |
| 39 | + 'CustomFilters' => false, //Also gets set in the next loop. |
40 | 40 | 'Stomp' => false, |
41 | 41 | 'ConversionLog' => false, //this is definitely an Extra |
42 | 42 | 'Minfraud' => false, //this is definitely an Extra |
— | — | @@ -45,7 +45,7 @@ |
46 | 46 | 'ReferrerFilter' => false, //extra |
47 | 47 | 'SourceFilter' => false, //extra |
48 | 48 | 'Minfraud_as_filter' => false, //extra |
49 | | - |
| 49 | + |
50 | 50 | ); |
51 | 51 | |
52 | 52 | foreach ($optionalParts as $subextension => $enabled){ |
— | — | @@ -53,26 +53,26 @@ |
54 | 54 | global $$globalname; |
55 | 55 | if ( isset( $$globalname ) && $$globalname === true ) { |
56 | 56 | $optionalParts[$subextension] = true; |
57 | | - //this is getting annoying. |
| 57 | + //this is getting annoying. |
58 | 58 | if ( $subextension === 'ReferrerFilter' || |
59 | 59 | $subextension === 'SourceFilter' || |
60 | 60 | $subextension === 'Minfraud_as_filter' || |
61 | 61 | $subextension === 'ConversionLog' || |
62 | 62 | $subextension === 'Minfraud' || |
63 | 63 | $subextension === 'Recaptcha' ) { |
64 | | - |
| 64 | + |
65 | 65 | //we have extras |
66 | 66 | $optionalParts['Extras'] = true; |
67 | | - |
| 67 | + |
68 | 68 | if ( $subextension === 'ReferrerFilter' || |
69 | 69 | $subextension === 'SourceFilter' || |
70 | 70 | $subextension === 'Minfraud_as_filter' ){ |
71 | | - |
72 | | - //and at least one of them is a custom filter. |
| 71 | + |
| 72 | + //and at least one of them is a custom filter. |
73 | 73 | $optionalParts['CustomFilters'] = true; |
74 | 74 | } |
75 | 75 | } |
76 | | - |
| 76 | + |
77 | 77 | } |
78 | 78 | } |
79 | 79 | |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | $wgAutoloadClasses['activemq_stomp'] = $donationinterface_dir . 'activemq_stomp/activemq_stomp.php'; # Tell MediaWiki to load the extension body. |
126 | 126 | } |
127 | 127 | |
128 | | -//Extras classes - required for ANY optional class that is considered an "extra". |
| 128 | +//Extras classes - required for ANY optional class that is considered an "extra". |
129 | 129 | if ($optionalParts['Extras'] === true){ |
130 | 130 | $wgAutoloadClasses['Gateway_Extras'] = $donationinterface_dir . "extras/extras.body.php"; |
131 | 131 | } |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | * Global form dir and RapidHTML whitelist |
175 | 175 | */ |
176 | 176 | $wgDonationInterfaceHtmlFormDir = dirname( __FILE__ ) . "/gateway_forms/rapidhtml/html"; |
177 | | -//ffname is the $key from now on. |
| 177 | +//ffname is the $key from now on. |
178 | 178 | $wgDonationInterfaceAllowedHtmlForms = array( |
179 | 179 | 'demo' => $wgDonationInterfaceHtmlFormDir . "/demo.html", |
180 | 180 | 'globalcollect_test' => $wgDonationInterfaceHtmlFormDir . "/globalcollect_test.html", |
— | — | @@ -183,17 +183,17 @@ |
184 | 184 | |
185 | 185 | /** |
186 | 186 | * The URL to redirect a transaction to PayPal |
187 | | - * This should probably point to ContributionTracking. |
| 187 | + * This should probably point to ContributionTracking. |
188 | 188 | */ |
189 | 189 | $wgDonationInterfacePaypalURL = ''; |
190 | 190 | $wgDonationInterfaceRetrySeconds = 5; |
191 | 191 | |
192 | | -//all of the following variables make sense to override directly, |
193 | | -//or change "DonationInterface" to the gateway's id to override just for that gateway. |
| 192 | +//all of the following variables make sense to override directly, |
| 193 | +//or change "DonationInterface" to the gateway's id to override just for that gateway. |
194 | 194 | //for instance: To override $wgDonationInterfaceUseSyslog just for GlobalCollect, add |
195 | 195 | // $wgGolbalCollectGatewayUseSyslog = true |
196 | | -// to LocalSettings. |
197 | | -// |
| 196 | +// to LocalSettings. |
| 197 | +// |
198 | 198 | |
199 | 199 | $wgDonationInterfaceDisplayDebug = false; |
200 | 200 | $wgDonationInterfaceUseSyslog = false; |
— | — | @@ -249,14 +249,14 @@ |
250 | 250 | $wgDonationInterfaceSMaxAge = 6000; |
251 | 251 | |
252 | 252 | /** |
253 | | - * Configure price cieling and floor for valid contribution amount. Values |
| 253 | + * Configure price cieling and floor for valid contribution amount. Values |
254 | 254 | * should be in USD. |
255 | 255 | */ |
256 | 256 | $wgDonationInterfacePriceFloor = '1.00'; |
257 | 257 | $wgDonationInterfacePriceCeiling = '10000.00'; |
258 | 258 | |
259 | 259 | /** |
260 | | - * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime. |
| 260 | + * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime. |
261 | 261 | */ |
262 | 262 | //$wgDonationInterfaceThankYouPage = 'https://wikimediafoundation.org/wiki/Thank_You'; |
263 | 263 | $wgDonationInterfaceThankYouPage = 'Donate-thanks'; |
— | — | @@ -267,11 +267,11 @@ |
268 | 268 | if ( $optionalParts['GlobalCollect'] === true ){ |
269 | 269 | $wgGlobalCollectGatewayURL = 'https://ps.gcsip.nl/wdl/wdl'; |
270 | 270 | $wgGlobalCollectGatewayTestingURL = 'https://'; // GlobalCollect testing URL |
271 | | - |
| 271 | + |
272 | 272 | $wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID |
273 | | - |
| 273 | + |
274 | 274 | $wgGlobalCollectGatewayHtmlFormDir = $donationinterface_dir . 'globalcollect_gateway/forms/html'; |
275 | | - //this really should be redefined in LocalSettings. |
| 275 | + //this really should be redefined in LocalSettings. |
276 | 276 | $wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
277 | 277 | } |
278 | 278 | |
— | — | @@ -279,25 +279,25 @@ |
280 | 280 | if ( $optionalParts['PayflowPro'] === true ){ |
281 | 281 | $wgPayflowProGatewayURL = 'https://payflowpro.paypal.com'; |
282 | 282 | $wgPayflowProGatewayTestingURL = 'https://pilot-payflowpro.paypal.com'; // Payflow testing URL |
283 | | - |
| 283 | + |
284 | 284 | $wgPayflowProGatewayPartnerID = ''; // PayPal or original authorized reseller |
285 | 285 | $wgPayflowProGatewayVendorID = ''; // paypal merchant login ID |
286 | 286 | $wgPayflowProGatewayUserID = ''; // if one or more users are set up, authorized user ID, else same as VENDOR |
287 | 287 | $wgPayflowProGatewayPassword = ''; // merchant login password |
288 | | - |
| 288 | + |
289 | 289 | $wgPayflowProGatewayHtmlFormDir = $donationinterface_dir . 'payflowpro_gateway/forms/html'; |
290 | | - //this really should be redefined in LocalSettings. |
| 290 | + //this really should be redefined in LocalSettings. |
291 | 291 | $wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
292 | 292 | } |
293 | 293 | |
294 | 294 | //Stomp globals |
295 | 295 | if ($optionalParts['Stomp'] === true){ |
296 | 296 | $wgStompServer = ""; |
297 | | - //$wgStompQueueName = ""; //only set this with an actual value. Default is unset. |
298 | | - //$wgPendingStompQueueName = ""; //only set this with an actual value. Default is unset. |
| 297 | + //$wgStompQueueName = ""; //only set this with an actual value. Default is unset. |
| 298 | + //$wgPendingStompQueueName = ""; //only set this with an actual value. Default is unset. |
299 | 299 | } |
300 | 300 | |
301 | | -//Extras globals - required for ANY optional class that is considered an "extra". |
| 301 | +//Extras globals - required for ANY optional class that is considered an "extra". |
302 | 302 | if ($optionalParts['Extras'] === true){ |
303 | 303 | $wgDonationInterfaceExtrasLog = ''; |
304 | 304 | } |
— | — | @@ -311,7 +311,7 @@ |
312 | 312 | 'challenge' => array( -1, -1 ), |
313 | 313 | 'reject' => array( -1, -1 ), |
314 | 314 | ); |
315 | | - |
| 315 | + |
316 | 316 | /** |
317 | 317 | * A value for tracking the 'riskiness' of a transaction |
318 | 318 | * |
— | — | @@ -365,7 +365,7 @@ |
366 | 366 | * advantage of sharing minFraud info with other filters. |
367 | 367 | */ |
368 | 368 | $wgMinFraudStandalone = TRUE; |
369 | | - |
| 369 | + |
370 | 370 | } |
371 | 371 | |
372 | 372 | //Minfraud as Filter globals |
— | — | @@ -472,7 +472,7 @@ |
473 | 473 | } |
474 | 474 | |
475 | 475 | /** |
476 | | - * APIS |
| 476 | + * APIS |
477 | 477 | */ |
478 | 478 | // enable the API |
479 | 479 | $wgAPIModules['donate'] = 'DonationApi'; |
— | — | @@ -486,7 +486,7 @@ |
487 | 487 | |
488 | 488 | |
489 | 489 | /** |
490 | | - * ADDITIONAL MAGICAL GLOBALS |
| 490 | + * ADDITIONAL MAGICAL GLOBALS |
491 | 491 | */ |
492 | 492 | |
493 | 493 | // Resource modules |
— | — | @@ -513,7 +513,7 @@ |
514 | 514 | ); |
515 | 515 | |
516 | 516 | // form validation resource |
517 | | -//TODO: Move this somewhere gateway-agnostic. |
| 517 | +//TODO: Move this somewhere gateway-agnostic. |
518 | 518 | $wgResourceModules[ 'pfp.form.core.validate' ] = array( |
519 | 519 | 'scripts' => 'validate_input.js', |
520 | 520 | 'dependencies' => 'pfp.form.core.pfp_css', |
— | — | @@ -522,8 +522,8 @@ |
523 | 523 | ); |
524 | 524 | |
525 | 525 | // form placeholders |
526 | | -//TODO: Move this somewhere gateway-agnostic. |
527 | | -$wgResourceModules[ 'pfp.form.core.placeholders' ] = array( |
| 526 | +//TODO: Move this somewhere gateway-agnostic. |
| 527 | +$wgResourceModules[ 'pfp.form.core.placeholders' ] = array( |
528 | 528 | 'scripts' => 'form_placeholders.js', |
529 | 529 | 'dependencies' => 'pfp.form.core.validate', |
530 | 530 | 'messages' => array( |
— | — | @@ -548,7 +548,7 @@ |
549 | 549 | ) + $wgResourceTemplate; |
550 | 550 | |
551 | 551 | // API JS |
552 | | -//TODO: Either move this somewhere gateway-agnostic, or move it to the pfp installer section. |
| 552 | +//TODO: Either move this somewhere gateway-agnostic, or move it to the pfp installer section. |
553 | 553 | $wgResourceModules[ 'pfp.form.core.api' ] = array( |
554 | 554 | 'scripts' => 'pfp_api_controller.js', |
555 | 555 | 'localBasePath' => $donationinterface_dir . 'payflowpro_gateway', |
— | — | @@ -556,7 +556,7 @@ |
557 | 557 | ); |
558 | 558 | |
559 | 559 | // Logo link override |
560 | | -//TODO: Move this somewhere gateway-agnostic. |
| 560 | +//TODO: Move this somewhere gateway-agnostic. |
561 | 561 | $wgResourceModules[ 'pfp.core.logolink_override' ] = array( |
562 | 562 | 'scripts' => 'logolink_override.js', |
563 | 563 | 'localBasePath' => $donationinterface_dir . 'payflowpro_gateway', |
— | — | @@ -587,7 +587,7 @@ |
588 | 588 | } |
589 | 589 | |
590 | 590 | //Minfraud magical globals |
591 | | -if ( $optionalParts['Minfraud'] === true ){ //We do not want this in filter mode. |
| 591 | +if ( $optionalParts['Minfraud'] === true ){ //We do not want this in filter mode. |
592 | 592 | $wgExtensionFunctions[] = 'efMinFraudSetup'; |
593 | 593 | } |
594 | 594 | |