Index: trunk/extensions/ContributionTracking/ContributionTracking.processor.php |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | * gateway to complete the transaction. |
303 | 303 | */ |
304 | 304 | static function getRepostFields( $input ) { |
305 | | - global $wgContributionTrackingPayPalBusiness, $wgContributionTrackingReturnToURLDefault; |
| 305 | + global $wgContributionTrackingPayPalBusiness, $wgContributionTrackingReturnToURLDefault, $wgContributionTrackingRPPLength; |
306 | 306 | // Set the action and tracking ID fields |
307 | 307 | $input = ContributionTrackingProcessor::stage_repost( $input ); |
308 | 308 | |
— | — | @@ -378,7 +378,7 @@ |
379 | 379 | |
380 | 380 | $repost['fields']['t3'] = "M"; // The unit of measurement for for p3 (M = month) |
381 | 381 | $repost['fields']['p3'] = '1'; // Billing cycle duration |
382 | | - $repost['fields']['srt'] = '12'; // # of billing cycles |
| 382 | + $repost['fields']['srt'] = $wgContributionTrackingRPPLength; // # of billing cycles |
383 | 383 | $repost['fields']['src'] = '1'; // Make this 'recurring' |
384 | 384 | $repost['fields']['sra'] = '1'; // Turn on re-attempt on failure |
385 | 385 | $repost['fields']['cmd'] = '_xclick-subscriptions'; |
Index: trunk/extensions/ContributionTracking/ContributionTracking.php |
— | — | @@ -33,7 +33,7 @@ |
34 | 34 | |
35 | 35 | $wgAutoloadClasses['ApiContributionTracking'] = $dir . 'ApiContributionTracking.php'; |
36 | 36 | $wgAutoloadClasses['ContributionTrackingProcessor'] = $dir . 'ContributionTracking.processor.php'; |
37 | | - |
| 37 | + |
38 | 38 | //this only works if contribution tracking is inside a mediawiki DB, which typically it isn't. |
39 | 39 | $wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates'; |
40 | 40 | |
— | — | @@ -75,6 +75,12 @@ |
76 | 76 | */ |
77 | 77 | $wgContributionTrackingPayPalBusiness = 'donations@wikimedia.org'; |
78 | 78 | |
| 79 | +/** |
| 80 | + * Recurring PayPal subscription Length. Default of 0 is unlimited until canceled |
| 81 | + */ |
| 82 | + |
| 83 | +$wgContributionTrackingRPPLength = '0'; |
| 84 | + |
79 | 85 | # Unit tests |
80 | 86 | $wgHooks['UnitTestsList'][] = 'efContributionTrackingUnitTests'; |
81 | 87 | |