https://www.mediawiki.org/wiki/Special:Code/MediaWiki/106367

Revision: 106367
Author:   jamesur
Date:     2011-12-15 20:56:43 +0000 (Thu, 15 Dec 2011)
Log Message:
-----------
adjust billing length of recurring paypal contributions to be configuarable and 
default to until canceled

Modified Paths:
--------------
    trunk/extensions/ContributionTracking/ContributionTracking.php
    trunk/extensions/ContributionTracking/ContributionTracking.processor.php

Modified: trunk/extensions/ContributionTracking/ContributionTracking.php
===================================================================
--- trunk/extensions/ContributionTracking/ContributionTracking.php      
2011-12-15 20:51:00 UTC (rev 106366)
+++ trunk/extensions/ContributionTracking/ContributionTracking.php      
2011-12-15 20:56:43 UTC (rev 106367)
@@ -33,7 +33,7 @@
 
 $wgAutoloadClasses['ApiContributionTracking'] = $dir . 
'ApiContributionTracking.php';
 $wgAutoloadClasses['ContributionTrackingProcessor'] = $dir . 
'ContributionTracking.processor.php';
-
+ 
 //this only works if contribution tracking is inside a mediawiki DB, which 
typically it isn't.
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'efContributionTrackingLoadUpdates';
 
@@ -75,6 +75,12 @@
  */
 $wgContributionTrackingPayPalBusiness = '[email protected]';
 
+/**
+ * Recurring PayPal subscription Length. Default of 0 is unlimited until 
canceled
+ */
+
+$wgContributionTrackingRPPLength = '0';
+
 # Unit tests
 $wgHooks['UnitTestsList'][] = 'efContributionTrackingUnitTests';
 

Modified: 
trunk/extensions/ContributionTracking/ContributionTracking.processor.php
===================================================================
--- trunk/extensions/ContributionTracking/ContributionTracking.processor.php    
2011-12-15 20:51:00 UTC (rev 106366)
+++ trunk/extensions/ContributionTracking/ContributionTracking.processor.php    
2011-12-15 20:56:43 UTC (rev 106367)
@@ -301,7 +301,7 @@
         * gateway to complete the transaction.
         */
        static function getRepostFields( $input ) {
-               global $wgContributionTrackingPayPalBusiness, 
$wgContributionTrackingReturnToURLDefault;
+               global $wgContributionTrackingPayPalBusiness, 
$wgContributionTrackingReturnToURLDefault, $wgContributionTrackingRPPLength;
                // Set the action and tracking ID fields
                $input = ContributionTrackingProcessor::stage_repost( $input );
 
@@ -378,7 +378,7 @@
 
                                $repost['fields']['t3'] = "M"; // The unit of 
measurement for for p3 (M = month)
                                $repost['fields']['p3'] = '1'; // Billing cycle 
duration
-                               $repost['fields']['srt'] = '12'; // # of 
billing cycles
+                               $repost['fields']['srt'] = 
$wgContributionTrackingRPPLength; // # of billing cycles
                                $repost['fields']['src'] = '1'; // Make this 
'recurring'
                                $repost['fields']['sra'] = '1'; // Turn on 
re-attempt on failure
                                $repost['fields']['cmd'] = 
'_xclick-subscriptions';


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to