jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/368848 )

Change subject: Update DonationInterface lib
......................................................................


Update DonationInterface lib

Gets the unified queue message handling from SmashPig. Now we don't
have to pass those settings through in the $wg variables!

Also gets some stricter country validation. This patch adds a lame
default.

Along the way, I'm fixing a misplaced Civi initialization. We should
do that at the outset, not rely on it happening in the next_date validation.

Bug: T95647
Change-Id: I379e7e9a37487696e8f1a44cf085f9a7e81b154e
---
M composer.lock
M sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc
M sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
M sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc
M sites/all/modules/wmf_civicrm/DonationInterfaceFactory.php
5 files changed, 13 insertions(+), 12 deletions(-)

Approvals:
  XenoRyet: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/composer.lock b/composer.lock
index 1756b73..75c9d60 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1793,7 +1793,7 @@
             "source": {
                 "type": "git",
                 "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/DonationInterface.git";,
-                "reference": "b6eb7d3c689fd2a612f522d43cfd7d6b68218d02"
+                "reference": "de827ca5d01b688c01b328810f7e323841fe2abb"
             },
             "require": {
                 "addshore/psr-6-mediawiki-bagostuff-adapter": "0.1",
@@ -1834,7 +1834,7 @@
                 "GPL-2.0"
             ],
             "description": "Wikimedia Foundation payment processing library",
-            "time": "2017-07-12T20:59:10+00:00"
+            "time": "2017-08-14T07:04:04+00:00"
         },
         {
             "name": "wikimedia/omnimail-silverpop",
diff --git 
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc 
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc
index 337562e..4c72709 100644
--- 
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc
+++ 
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.drush.inc
@@ -52,6 +52,7 @@
  *
  */
 function drush_recurring_globalcollect() {
+  civicrm_initialize();
   wmf_common_create_smashpig_context( 'ingenico_recurring', 'ingenico' );
   wmf_common_set_smashpig_message_source( 'direct', 'Recurring GlobalCollect' 
);
   $date = drush_get_option('date');
diff --git 
a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module 
b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
index ada9ee3..b3aa5f8 100644
--- a/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
+++ b/sites/all/modules/recurring_globalcollect/recurring_globalcollect.module
@@ -472,7 +472,6 @@
  * @return bool
  */
 function is_found_globalcollect_invalid_next_sched_dates() {
-  civicrm_initialize();
   $query = "
   SELECT count(*) FROM (
     SELECT
diff --git a/sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc 
b/sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc
index f357a63..8b25d07 100644
--- a/sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc
+++ b/sites/all/modules/wmf_audit/ingenico/orphan_rectify.drush.inc
@@ -36,10 +36,6 @@
  * Note: You'll need to include a bunch of exciting MediaWiki globals in your
  * Drupal settings.local.php, including default values that would normally be
  * read from extension.json.
- *     $wgDonationInterfaceDefaultQueueServer
- *     $wgDonationInterfaceQueues
- *     $wgDonationInterfaceEnableQueue
- *     $wgDonationInterfaceQueueMirrors
  *     $wgDonationInterfaceOrphanCron
  *     $wgDonationInterfaceGatewayAdapters
  *     $wgDonationInterfaceForbiddenCountries
diff --git a/sites/all/modules/wmf_civicrm/DonationInterfaceFactory.php 
b/sites/all/modules/wmf_civicrm/DonationInterfaceFactory.php
index 251e87d..bb30f96 100644
--- a/sites/all/modules/wmf_civicrm/DonationInterfaceFactory.php
+++ b/sites/all/modules/wmf_civicrm/DonationInterfaceFactory.php
@@ -1,13 +1,18 @@
 <?php
 
 class DonationInterfaceFactory {
-       /**
-        * @param string $gatewayName
-        * @param array $data
-        * @return GatewayType
-        */
+    /**
+     * @param string $gatewayName
+     * @param array $data
+     * @return GatewayType
+     */
     static public function createAdapter( $gatewayName, $data ) {
         // Configure DonationInterface according to Drupal settings.
+        // FIXME lame country default. We really should know the country
+        // context when we're doing payment things.
+        if ( empty( $data['country'] ) ) {
+            $data['country'] = 'US';
+        }
         $adapterOptions = array(
             'batch_mode' => true,
             'external_data' => $data,

-- 
To view, visit https://gerrit.wikimedia.org/r/368848
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I379e7e9a37487696e8f1a44cf085f9a7e81b154e
Gerrit-PatchSet: 4
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

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

Reply via email to