Index: branches/fundraising/extensions/DonationInterface/donationinterface.php |
— | — | @@ -69,7 +69,6 @@ |
70 | 70 | $wgAutoloadClasses['DonationData'] = $donationinterface_dir . 'gateway_common/DonationData.php'; |
71 | 71 | $wgAutoloadClasses['GatewayAdapter'] = $donationinterface_dir . 'gateway_common/gateway.adapter.php'; |
72 | 72 | $wgAutoloadClasses['GatewayForm'] = $donationinterface_dir . 'gateway_common/GatewayForm.php'; |
73 | | -$wgAutoloadClasses['DonationApi'] = $donationinterface_dir . 'gateway_common/donation.api.php'; |
74 | 73 | |
75 | 74 | //load all possible form classes |
76 | 75 | $wgAutoloadClasses['Gateway_Form'] = $donationinterface_dir . 'gateway_forms/Form.php'; |
— | — | @@ -94,6 +93,17 @@ |
95 | 94 | $wgAutoloadClasses['Gateway_Form_SingleColumn'] = $donationinterface_dir . 'gateway_forms/SingleColumn.php'; |
96 | 95 | |
97 | 96 | |
| 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 | +} |
98 | 108 | |
99 | 109 | //Stomp classes |
100 | 110 | if ($optionalParts['Stomp'] === true){ |
— | — | @@ -148,19 +158,113 @@ |
149 | 159 | $wgDonationInterfaceTest = false; |
150 | 160 | |
151 | 161 | /** |
| 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 | +/** |
152 | 235 | * Default Thank You and Fail pages for all of donationinterface - language will be calc'd and appended at runtime. |
153 | 236 | */ |
154 | 237 | //$wgDonationInterfaceThankYouPage = 'https://wikimediafoundation.org/wiki/Thank_You'; |
155 | 238 | $wgDonationInterfaceThankYouPage = 'Donate-thanks'; |
156 | 239 | $wgDonationInterfaceFailPage = 'Donate-error'; |
157 | 240 | |
158 | | -/** |
159 | | - * The URL to redirect a transaction to PayPal |
160 | | - */ |
161 | | -$wgDonationInterfacePaypalURL = ''; |
162 | | -$wgDonationInterfaceRetrySeconds = 5; |
163 | 241 | |
| 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 | +} |
164 | 253 | |
| 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 | + |
165 | 269 | //Paypal gateway globals |
166 | 270 | if ( $optionalParts['Paypal'] === true ){ |
167 | 271 | // default variables that should be set in LocalSettings.php |
— | — | @@ -267,12 +371,9 @@ |
268 | 372 | |
269 | 373 | /** |
270 | 374 | * HTTP Proxy settings |
271 | | - * |
272 | | - * Default to settings in DonationInterface |
273 | 375 | */ |
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; |
277 | 378 | |
278 | 379 | /** |
279 | 380 | * Use SSL to communicate with reCaptcha |
— | — | @@ -286,7 +387,21 @@ |
287 | 388 | $wgDonationInterfaceRecaptchaComsRetryLimit = 3; |
288 | 389 | } |
289 | 390 | |
| 391 | +/** |
| 392 | + * SPECIAL PAGES |
| 393 | + */ |
290 | 394 | |
| 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 | + |
291 | 406 | /** |
292 | 407 | * HOOKS |
293 | 408 | */ |
— | — | @@ -294,8 +409,14 @@ |
295 | 410 | //Unit tests |
296 | 411 | $wgHooks['UnitTestsList'][] = 'efDonationInterfaceUnitTests'; |
297 | 412 | |
| 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 | +} |
298 | 419 | |
299 | | -//Paypal gateway globals |
| 420 | +//Paypal gateway hooks |
300 | 421 | if ( $optionalParts['Paypal'] === true ){ |
301 | 422 | //TODO: Determine if this is all cruft. I'm guessing "Probably". |
302 | 423 | /** |
— | — | @@ -333,12 +454,23 @@ |
334 | 455 | } |
335 | 456 | |
336 | 457 | /** |
337 | | - * ADDITIONAL MAGICAL GLOBALS |
| 458 | + * APIS |
338 | 459 | */ |
339 | | - |
340 | 460 | // enable the API |
341 | 461 | $wgAPIModules['donate'] = 'DonationApi'; |
| 462 | +$wgAutoloadClasses['DonationApi'] = $donationinterface_dir . 'gateway_common/donation.api.php'; |
342 | 463 | |
| 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 | + |
343 | 475 | // Resource modules |
344 | 476 | $wgResourceTemplate = array( |
345 | 477 | 'localBasePath' => $donationinterface_dir . 'modules', |
— | — | @@ -355,6 +487,26 @@ |
356 | 488 | |
357 | 489 | $wgExtensionMessagesFiles['DonateInterface'] = $donationinterface_dir . 'donate_interface/donate_interface.i18n.php'; |
358 | 490 | |
| 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 | + |
359 | 511 | //Paypal magical globals |
360 | 512 | if ( $optionalParts['Paypal'] === true ){ |
361 | 513 | $wgExtensionMessagesFiles['PaypalGateway'] = $donationinterface_dir . 'paypal_gateway/paypal_gateway.i18n.php'; |
— | — | @@ -395,27 +547,11 @@ |
396 | 548 | require_once( $donationinterface_dir . 'paypal_gateway/paypal_gateway.php' ); |
397 | 549 | } |
398 | 550 | |
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' ); |
414 | 554 | } |
415 | 555 | |
416 | | -foreach ( $wgDonationInterfaceEnabledGateways as $gateway ) { |
417 | | - //include 'em |
418 | | - require_once( $donationinterface_dir . $gateway . '_gateway/' . $gateway . '_gateway.php' ); |
419 | | -} |
420 | 556 | |
421 | 557 | |
422 | 558 | function efDonationInterfaceUnitTests( &$files ) { |
Index: branches/fundraising/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php |
— | — | @@ -20,37 +20,37 @@ |
21 | 21 | |
22 | 22 | // Set up the new special page |
23 | 23 | $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'; |
26 | 26 | |
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"; |
33 | 33 | |
34 | 34 | |
35 | 35 | // 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 |
38 | 38 | |
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 |
45 | 45 | // a boolean to determine if we're in testing mode |
46 | | -$wgPayflowProGatewayTest = FALSE; |
| 46 | +//$wgPayflowProGatewayTest = FALSE; |
47 | 47 | |
48 | 48 | // timeout in seconds for communicating with paypal |
49 | | -$wgPayflowProGatewayTimeout = 5; |
| 49 | +//$wgPayflowProGatewayTimeout = 5; |
50 | 50 | |
51 | 51 | /** |
52 | 52 | * The default form to use |
53 | 53 | */ |
54 | | -$wgPayflowProGatewayDefaultForm = 'TwoStepTwoColumn'; |
| 54 | +//$wgPayflowProGatewayDefaultForm = 'TwoStepTwoColumn'; |
55 | 55 | |
56 | 56 | /** |
57 | 57 | * A string or array of strings for making tokens more secure |
— | — | @@ -59,54 +59,49 @@ |
60 | 60 | * potentially leave you and your users vulnerable to CSRF or other forms of |
61 | 61 | * attack. |
62 | 62 | */ |
63 | | -$wgPayflowProGatewaySalt = $wgSecretKey; |
| 63 | +//$wgPayflowProGatewaySalt = $wgSecretKey; |
64 | 64 | |
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; |
69 | 100 | |
70 | 101 | /** |
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 | | -/** |
107 | 102 | * Directory for HTML forms (used by RapidHtml form class) |
108 | 103 | * @var string |
109 | 104 | */ |
110 | | -$wgPayflowProGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html"; |
| 105 | +//$wgPayflowProGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html"; |
111 | 106 | |
112 | 107 | /** |
113 | 108 | * An array of allowed HTML forms. |
— | — | @@ -115,34 +110,27 @@ |
116 | 111 | * /never/ be loaded by the rapid html form loader! |
117 | 112 | * @var string |
118 | 113 | */ |
119 | | -$wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
| 114 | +//$wgPayflowProGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
120 | 115 | |
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'; |
127 | 122 | |
128 | 123 | /** |
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 | | -/** |
136 | 124 | * Hooks required to interface with the donation extension (include <donate> on page) |
137 | 125 | * |
138 | 126 | * gwValue supplies the value of the form option, the name that appears on the form |
139 | 127 | * 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'; |
143 | 131 | |
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'; |
147 | 135 | |
148 | 136 | /** |
149 | 137 | * 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 @@ |
37 | 37 | * @param $par Mixed: parameter passed to the page or null |
38 | 38 | */ |
39 | 39 | public function execute( $par ) { |
40 | | - global $wgRequest, $wgOut, $wgExtensionAssetsPath, |
41 | | - $wgPayFlowProGatewayCSSVersion; |
| 40 | + global $wgRequest, $wgOut, $wgExtensionAssetsPath; |
42 | 41 | |
43 | 42 | $referrer = $wgRequest->getHeader( 'referer' ); |
44 | 43 | |
— | — | @@ -54,7 +53,7 @@ |
55 | 54 | |
56 | 55 | $wgOut->addExtensionStyle( |
57 | 56 | $wgExtensionAssetsPath . '/DonationInterface/gateway_forms/css/gateway.css?284' . |
58 | | - $wgPayFlowProGatewayCSSVersion ); |
| 57 | + $this->adapter->getGlobal( 'CSSVersion' ) ); |
59 | 58 | |
60 | 59 | $this->setHeaders(); |
61 | 60 | |
Index: branches/fundraising/extensions/DonationInterface/globalcollect_gateway/globalcollect_gateway.php |
— | — | @@ -1,4 +1,7 @@ |
2 | 2 | <?php |
| 3 | +/** |
| 4 | + * TODO: Remove this file. :) |
| 5 | + */ |
3 | 6 | |
4 | 7 | # Alert the user that this is not a valid entry point to MediaWiki if they try to access the special pages file directly. |
5 | 8 | if ( !defined( 'MEDIAWIKI' ) ) { |
— | — | @@ -18,37 +21,37 @@ |
19 | 22 | 'url' => 'http://www.mediawiki.org/wiki/Extension:GlobalCollectGateway', |
20 | 23 | ); |
21 | 24 | |
22 | | -$wgGlobalCollectGatewayUseSyslog = false; |
| 25 | +//$wgGlobalCollectGatewayUseSyslog = false; |
23 | 26 | |
24 | 27 | // Set up the new special page |
25 | 28 | $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'; |
35 | 38 | //$wgAjaxExportList[] = "fnGlobalCollectofofWork"; |
36 | 39 | // 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 |
39 | 42 | |
40 | | -$wgGlobalCollectGatewayCSSVersion = 1; |
| 43 | +//$wgGlobalCollectGatewayCSSVersion = 1; |
41 | 44 | |
42 | | -$wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID |
| 45 | +//$wgGlobalCollectGatewayMerchantID = ''; // GlobalCollect ID |
43 | 46 | // a boolean to determine if we're in testing mode |
44 | | -$wgGlobalCollectGatewayTest = FALSE; |
| 47 | +//$wgGlobalCollectGatewayTest = FALSE; |
45 | 48 | |
46 | 49 | // timeout in seconds for communicating with [gateway] |
47 | | -$wgGlobalCollectGatewayTimeout = 2; |
| 50 | +//$wgGlobalCollectGatewayTimeout = 2; |
48 | 51 | |
49 | 52 | /** |
50 | 53 | * The default form to use |
51 | 54 | */ |
52 | | -$wgGlobalCollectGatewayDefaultForm = 'TwoStepTwoColumn'; |
| 55 | +//$wgGlobalCollectGatewayDefaultForm = 'TwoStepTwoColumn'; |
53 | 56 | |
54 | 57 | /** |
55 | 58 | * A string or array of strings for making tokens more secure |
— | — | @@ -57,7 +60,7 @@ |
58 | 61 | * potentially leave you and your users vulnerable to CSRF or other forms of |
59 | 62 | * attack. |
60 | 63 | */ |
61 | | -$wgGlobalCollectGatewaySalt = $wgSecretKey; |
| 64 | +//$wgGlobalCollectGatewaySalt = $wgSecretKey; |
62 | 65 | |
63 | 66 | |
64 | 67 | /** |
— | — | @@ -67,12 +70,12 @@ |
68 | 71 | * You can use '@language' as a placeholder token to extract the user's language. |
69 | 72 | * |
70 | 73 | */ |
71 | | -$wgGlobalCollectGatewayHeader = NULL; |
| 74 | +//$wgGlobalCollectGatewayHeader = NULL; |
72 | 75 | |
73 | 76 | /** |
74 | 77 | * A string containing full URL for Javascript-disabled credit card form redirect |
75 | 78 | */ |
76 | | -$wgGlobalCollectGatewayNoScriptRedirect = null; |
| 79 | +//$wgGlobalCollectGatewayNoScriptRedirect = null; |
77 | 80 | |
78 | 81 | /** |
79 | 82 | * Proxy settings |
— | — | @@ -84,8 +87,8 @@ |
85 | 88 | * $wgGlobalCollectGatewayUseHTTPProxy=TRUE; |
86 | 89 | * $wgGlobalCollectGatewayHTTPProxy='192.168.1.1:3128' |
87 | 90 | */ |
88 | | -$wgGlobalCollectGatewayUseHTTPProxy = FALSE; |
89 | | -$wgGlobalCollectGatewayHTTPProxy = ''; |
| 91 | +//$wgGlobalCollectGatewayUseHTTPProxy = FALSE; |
| 92 | +//$wgGlobalCollectGatewayHTTPProxy = ''; |
90 | 93 | |
91 | 94 | /** |
92 | 95 | * Set the max-age value for Squid |
— | — | @@ -94,13 +97,13 @@ |
95 | 98 | * the s-max-age for cached requests. |
96 | 99 | * @var int Time in seconds |
97 | 100 | */ |
98 | | -$wgGlobalCollectGatewaySMaxAge = 6000; |
| 101 | +//$wgGlobalCollectGatewaySMaxAge = 6000; |
99 | 102 | |
100 | 103 | /** |
101 | 104 | * Directory for HTML forms (used by RapidHtml form class) |
102 | 105 | * @var string |
103 | 106 | */ |
104 | | -$wgGlobalCollectGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html"; |
| 107 | +//$wgGlobalCollectGatewayHtmlFormDir = dirname( __FILE__ ) . "/forms/html"; |
105 | 108 | |
106 | 109 | /** |
107 | 110 | * An array of allowed HTML forms. |
— | — | @@ -109,17 +112,17 @@ |
110 | 113 | * /never/ be loaded by the rapid html form loader! |
111 | 114 | * @var string |
112 | 115 | */ |
113 | | -$wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
| 116 | +//$wgGlobalCollectGatewayAllowedHtmlForms = $wgDonationInterfaceAllowedHtmlForms; |
114 | 117 | |
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 |