r106367 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106366‎ | r106367 | r106368 >
Date:20:56, 15 December 2011
Author:jamesur
Status:ok
Tags:
Comment:
adjust billing length of recurring paypal contributions to be configuarable and default to until canceled
Modified paths:
  • /trunk/extensions/ContributionTracking/ContributionTracking.php (modified) (history)
  • /trunk/extensions/ContributionTracking/ContributionTracking.processor.php (modified) (history)

Diff [purge]

Index: trunk/extensions/ContributionTracking/ContributionTracking.processor.php
@@ -301,7 +301,7 @@
302302 * gateway to complete the transaction.
303303 */
304304 static function getRepostFields( $input ) {
305 - global $wgContributionTrackingPayPalBusiness, $wgContributionTrackingReturnToURLDefault;
 305+ global $wgContributionTrackingPayPalBusiness, $wgContributionTrackingReturnToURLDefault, $wgContributionTrackingRPPLength;
306306 // Set the action and tracking ID fields
307307 $input = ContributionTrackingProcessor::stage_repost( $input );
308308
@@ -378,7 +378,7 @@
379379
380380 $repost['fields']['t3'] = "M"; // The unit of measurement for for p3 (M = month)
381381 $repost['fields']['p3'] = '1'; // Billing cycle duration
382 - $repost['fields']['srt'] = '12'; // # of billing cycles
 382+ $repost['fields']['srt'] = $wgContributionTrackingRPPLength; // # of billing cycles
383383 $repost['fields']['src'] = '1'; // Make this 'recurring'
384384 $repost['fields']['sra'] = '1'; // Turn on re-attempt on failure
385385 $repost['fields']['cmd'] = '_xclick-subscriptions';
Index: trunk/extensions/ContributionTracking/ContributionTracking.php
@@ -33,7 +33,7 @@
3434
3535 $wgAutoloadClasses['ApiContributionTracking'] = $dir . 'ApiContributionTracking.php';
3636 $wgAutoloadClasses['ContributionTrackingProcessor'] = $dir . 'ContributionTracking.processor.php';
37 -
 37+
3838 //this only works if contribution tracking is inside a mediawiki DB, which typically it isn't.
3939 $wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates';
4040
@@ -75,6 +75,12 @@
7676 */
7777 $wgContributionTrackingPayPalBusiness = 'donations@wikimedia.org';
7878
 79+/**
 80+ * Recurring PayPal subscription Length. Default of 0 is unlimited until canceled
 81+ */
 82+
 83+$wgContributionTrackingRPPLength = '0';
 84+
7985 # Unit tests
8086 $wgHooks['UnitTestsList'][] = 'efContributionTrackingUnitTests';
8187

Follow-up revisions

RevisionCommit summaryAuthorDate
r106375MFT r103611, r103620, r103622, r104210, r104368, r106136, r106367awjrichards21:29, 15 December 2011

Status & tagging log