Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/315555

Change subject: Update DonationInterface library
......................................................................

Update DonationInterface library

Change-Id: Idd3caff97e514aeb3ecc40cddc0d8fe423cf6422
---
M composer/autoload_classmap.php
M composer/installed.json
M wikimedia/donation-interface/DonationInterface.class.php
M wikimedia/donation-interface/README.txt
M wikimedia/donation-interface/adyen_gateway/adyen.adapter.php
M wikimedia/donation-interface/adyen_gateway/config/payment_submethods.yaml
M wikimedia/donation-interface/amazon_gateway/amazon.adapter.php
M wikimedia/donation-interface/astropay_gateway/astropay.adapter.php
M wikimedia/donation-interface/extension.json
M wikimedia/donation-interface/gateway_common/WmfFramework.drupal.php
M wikimedia/donation-interface/gateway_common/donation.api.php
M wikimedia/donation-interface/gateway_common/gateway.adapter.php
M wikimedia/donation-interface/gateway_common/i18n/interface/de.json
M wikimedia/donation-interface/gateway_common/i18n/interface/en.json
M wikimedia/donation-interface/gateway_common/i18n/interface/fr.json
M wikimedia/donation-interface/gateway_common/i18n/interface/it.json
M wikimedia/donation-interface/gateway_common/i18n/interface/mk.json
M wikimedia/donation-interface/gateway_common/i18n/interface/nb.json
M wikimedia/donation-interface/gateway_common/i18n/interface/ne.json
M wikimedia/donation-interface/gateway_common/i18n/interface/qqq.json
M wikimedia/donation-interface/gateway_common/i18n/interface/zh-hans.json
M wikimedia/donation-interface/gateway_forms/mustache/error_form.html.mustache
D 
wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php
M 
wikimedia/donation-interface/globalcollect_gateway/config/payment_submethods.yaml
M wikimedia/donation-interface/globalcollect_gateway/globalcollect.adapter.php
D wikimedia/donation-interface/globalcollect_gateway/scripts/orphans.php
M 
wikimedia/donation-interface/paypal_gateway/express_checkout/paypal_express.adapter.php
M 
wikimedia/donation-interface/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
M wikimedia/donation-interface/tests/phpunit/AllTests.php
M 
wikimedia/donation-interface/tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php
30 files changed, 143 insertions(+), 438 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm/vendor 
refs/changes/55/315555/1

diff --git a/composer/autoload_classmap.php b/composer/autoload_classmap.php
index 62d3f76..de5a387 100644
--- a/composer/autoload_classmap.php
+++ b/composer/autoload_classmap.php
@@ -71,7 +71,6 @@
     'GlobalCollectGetDirectory' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/scripts/get_directory.php',
     'GlobalCollectOrphanAdapter' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/orphan.adapter.php',
     'GlobalCollectOrphanRectifier' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier.php',
-    'GlobalCollectOrphanRectifier_pooled' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php',
     'GlobalCollectRefundMaintenance' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/scripts/refund.php',
     'IngenicoFinancialNumber' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/IngenicoFinancialNumber.php',
     'IngenicoLanguage' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/IngenicoLanguage.php',
@@ -84,7 +83,6 @@
     'MessageUtils' => $vendorDir . 
'/wikimedia/donation-interface/gateway_common/MessageUtils.php',
     'MustacheErrorForm' => $vendorDir . 
'/wikimedia/donation-interface/gateway_forms/MustacheErrorForm.php',
     'NationalCurrencies' => $vendorDir . 
'/wikimedia/donation-interface/gateway_common/NationalCurrencies.php',
-    'OrphanMaintenance' => $vendorDir . 
'/wikimedia/donation-interface/globalcollect_gateway/scripts/orphans.php',
     'PHPMailer' => $vendorDir . '/phpmailer/phpmailer/class.phpmailer.php',
     'POP3' => $vendorDir . '/phpmailer/phpmailer/class.pop3.php',
     'PaymentMethod' => $vendorDir . 
'/wikimedia/donation-interface/gateway_common/PaymentMethod.php',
diff --git a/composer/installed.json b/composer/installed.json
index 8b5cf07..f104490 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -1167,56 +1167,6 @@
         "homepage": "https://symfony.com";
     },
     {
-        "name": "wikimedia/donation-interface",
-        "version": "dev-master",
-        "version_normalized": "9999999-dev",
-        "source": {
-            "type": "git",
-            "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/DonationInterface.git";,
-            "reference": "ebb773d1d725cecf1d745e9d0ff345060120bc3c"
-        },
-        "require": {
-            "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
-            "coderkungfu/php-queue": "dev-master",
-            "fusesource/stomp-php": "^2.1",
-            "minfraud/http": "^1.70",
-            "monolog/monolog": "~1.18.2",
-            "neitanod/forceutf8": "^2.0",
-            "predis/predis": "^1.1",
-            "psr/log": "^1.0",
-            "symfony/yaml": "^2.8",
-            "wikimedia/smash-pig": "dev-master",
-            "zordius/lightncandy": "0.23"
-        },
-        "require-dev": {
-            "jakub-onderka/php-parallel-lint": "0.9.2"
-        },
-        "time": "2016-09-15 19:32:11",
-        "type": "library",
-        "installation-source": "source",
-        "autoload": {
-            "classmap": [
-                "adyen_gateway",
-                "amazon_gateway",
-                "astropay_gateway",
-                "extras",
-                "gateway_common",
-                "gateway_forms",
-                "globalcollect_gateway",
-                "paypal_gateway",
-                "DonationInterface.class.php"
-            ],
-            "files": [
-                "gateway_common/WmfFramework.php"
-            ]
-        },
-        "notification-url": "https://packagist.org/downloads/";,
-        "license": [
-            "GPL-2.0"
-        ],
-        "description": "Wikimedia Foundation payment processing library"
-    },
-    {
         "name": "wikimedia/smash-pig",
         "version": "dev-master",
         "version_normalized": "9999999-dev",
@@ -1276,5 +1226,55 @@
             "donations",
             "payments"
         ]
+    },
+    {
+        "name": "wikimedia/donation-interface",
+        "version": "dev-master",
+        "version_normalized": "9999999-dev",
+        "source": {
+            "type": "git",
+            "url": 
"https://gerrit.wikimedia.org/r/mediawiki/extensions/DonationInterface.git";,
+            "reference": "675a404c1114b598ca0e0cd93b04b9d3510ffc4d"
+        },
+        "require": {
+            "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
+            "coderkungfu/php-queue": "dev-master",
+            "fusesource/stomp-php": "^2.1",
+            "minfraud/http": "^1.70",
+            "monolog/monolog": "~1.18.2",
+            "neitanod/forceutf8": "^2.0",
+            "predis/predis": "^1.1",
+            "psr/log": "^1.0",
+            "symfony/yaml": "^2.8",
+            "wikimedia/smash-pig": "dev-master",
+            "zordius/lightncandy": "0.23"
+        },
+        "require-dev": {
+            "jakub-onderka/php-parallel-lint": "0.9.2"
+        },
+        "time": "2016-10-11 20:43:31",
+        "type": "library",
+        "installation-source": "source",
+        "autoload": {
+            "classmap": [
+                "adyen_gateway",
+                "amazon_gateway",
+                "astropay_gateway",
+                "extras",
+                "gateway_common",
+                "gateway_forms",
+                "globalcollect_gateway",
+                "paypal_gateway",
+                "DonationInterface.class.php"
+            ],
+            "files": [
+                "gateway_common/WmfFramework.php"
+            ]
+        },
+        "notification-url": "https://packagist.org/downloads/";,
+        "license": [
+            "GPL-2.0"
+        ],
+        "description": "Wikimedia Foundation payment processing library"
     }
 ]
diff --git a/wikimedia/donation-interface/DonationInterface.class.php 
b/wikimedia/donation-interface/DonationInterface.class.php
index e917c8e..6cdcf1d 100644
--- a/wikimedia/donation-interface/DonationInterface.class.php
+++ b/wikimedia/donation-interface/DonationInterface.class.php
@@ -46,6 +46,9 @@
 
                $testDir = __DIR__ . '/tests/phpunit/';
 
+               // Set up globaltown
+               require_once $testDir . '/TestConfiguration.php';
+
                $files[] = $testDir . 'AllTests.php';
 
                $wgAutoloadClasses['DonationInterfaceTestCase'] = $testDir . 
'DonationInterfaceTestCase.php';
diff --git a/wikimedia/donation-interface/README.txt 
b/wikimedia/donation-interface/README.txt
index e7b1d48..317bca0 100644
--- a/wikimedia/donation-interface/README.txt
+++ b/wikimedia/donation-interface/README.txt
@@ -332,16 +332,12 @@
        // Incoming donations that we think have been paid for.
        'completed' => array(),
 
-       // So-called limbo queue for GlobalCollect, where we store donor 
personal
-       // information while waiting for the donor to return from iframe or a
-       // redirect.  It's very important that this data is not stored anywhere
-       // permanent such as logs or the database, until we know this person
-       // finished making a donation.
-       // FIXME: Note that this must be an instance of KeyValueStore.
-       //
+       // Transactions still needing action before they are settled.
+       'pending' => array(),
+
        // Example of a PCI-compliant queue configuration:
        //
-       // 'globalcollect-cc-limbo' => array(
+       // 'pending' => array(
        //      'type' => 'PHPQueue\Backend\Predis',
        //  # Note that servers cannot be an array, due to some incompatibility
        //  # with aggregate connections.
@@ -353,14 +349,10 @@
        //
        // Example of aliasing a queue
        //
-       // 'globalcollect-cc-limbo' => array(
-       //     # Point at the main CC limbo queue.
-       //     'queue' => 'cc-limbo',
+       // 'pending' => array(
+       //     # Point at a queue named pending-new
+       //     'queue' => 'pending-new',
        // ),
-
-       // Transactions still needing action before they are settled.
-       // FIXME: who reads from this queue?
-       'pending' => array(),
 
        // Non-critical queues
 
diff --git a/wikimedia/donation-interface/adyen_gateway/adyen.adapter.php 
b/wikimedia/donation-interface/adyen_gateway/adyen.adapter.php
index 7c12752..ae047e3 100644
--- a/wikimedia/donation-interface/adyen_gateway/adyen.adapter.php
+++ b/wikimedia/donation-interface/adyen_gateway/adyen.adapter.php
@@ -190,7 +190,7 @@
                                        $this->logger->info( "launching 
external iframe request: " . print_r( $requestParams, true )
                                        );
                                        $this->logPaymentDetails();
-                                       $this->setLimboMessage();
+                                       $this->sendPendingMessage();
                                        break;
                        }
                }
@@ -269,7 +269,6 @@
                        }
                }
                else {
-                       $this->deleteLimboMessage( 'pending' );
                        $this->finalizeInternalStatus( FinalStatus::FAILED );
                        $this->logger->info( "Negative response from gateway. 
Full response: " . print_r( $response, TRUE ) );
                }
diff --git 
a/wikimedia/donation-interface/adyen_gateway/config/payment_submethods.yaml 
b/wikimedia/donation-interface/adyen_gateway/config/payment_submethods.yaml
index c540c24..ea80c1c 100644
--- a/wikimedia/donation-interface/adyen_gateway/config/payment_submethods.yaml
+++ b/wikimedia/donation-interface/adyen_gateway/config/payment_submethods.yaml
@@ -6,6 +6,7 @@
 visa:
     countries:
         FR: true
+        GB: true
         IL: true
         JP: true
         UA: true
@@ -21,6 +22,7 @@
 mc:
     countries:
         FR: true
+        GB: true
         IL: true
         JP: true
         UA: true
@@ -29,10 +31,11 @@
     logo: card-mc.png
 amex:
     countries:
-        US: true
+        FR: true
+        GB: true
         IL: true
         UA: true
-        FR: true
+        US: true
     group: cc
     logo: card-amex.png
 discover:
diff --git a/wikimedia/donation-interface/amazon_gateway/amazon.adapter.php 
b/wikimedia/donation-interface/amazon_gateway/amazon.adapter.php
index 3615702..13ccdc1 100644
--- a/wikimedia/donation-interface/amazon_gateway/amazon.adapter.php
+++ b/wikimedia/donation-interface/amazon_gateway/amazon.adapter.php
@@ -206,7 +206,7 @@
                // audit and IPN messages
                $details = $this->getStompTransaction();
                $this->logger->info( 'Got info for Amazon donation: ' . 
json_encode( $details ) );
-               $this->setLimboMessage();
+               $this->sendPendingMessage();
        }
 
        /**
@@ -251,7 +251,6 @@
 
                $this->finalizeInternalStatus( 
$this->capture_status_map[$captureState] );
                $this->postProcessDonation();
-               $this->deleteLimboMessage( 'pending' );
        }
 
        /**
diff --git a/wikimedia/donation-interface/astropay_gateway/astropay.adapter.php 
b/wikimedia/donation-interface/astropay_gateway/astropay.adapter.php
index 7b971bd..da6b8c8 100644
--- a/wikimedia/donation-interface/astropay_gateway/astropay.adapter.php
+++ b/wikimedia/donation-interface/astropay_gateway/astropay.adapter.php
@@ -289,7 +289,6 @@
                        $this->logger->info( "Payment status $status coming 
back to ResultSwitcher" );
                        $this->finalizeInternalStatus( $status );
                        $this->postProcessDonation();
-                       $this->deleteLimboMessage( 'pending' );
                        break;
                case 'NewInvoice':
                        $this->processNewInvoiceResponse( $response );
diff --git a/wikimedia/donation-interface/extension.json 
b/wikimedia/donation-interface/extension.json
index 9ee40cd..494c229 100644
--- a/wikimedia/donation-interface/extension.json
+++ b/wikimedia/donation-interface/extension.json
@@ -114,7 +114,6 @@
                "GlobalCollectAdapter": 
"globalcollect_gateway/globalcollect.adapter.php",
                "GlobalCollectOrphanAdapter": 
"globalcollect_gateway/orphan.adapter.php",
                "GlobalCollectOrphanRectifier": 
"globalcollect_gateway/GlobalCollectOrphanRectifier.php",
-               "GlobalCollectOrphanRectifier_pooled": 
"globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php",
                "IngenicoFinancialNumber": 
"globalcollect_gateway/IngenicoFinancialNumber.php",
                "IngenicoLanguage": 
"globalcollect_gateway/IngenicoLanguage.php",
                "IngenicoMethodCodec": 
"globalcollect_gateway/IngenicoMethodCodec.php",
diff --git 
a/wikimedia/donation-interface/gateway_common/WmfFramework.drupal.php 
b/wikimedia/donation-interface/gateway_common/WmfFramework.drupal.php
index 67ddadd..23581df 100644
--- a/wikimedia/donation-interface/gateway_common/WmfFramework.drupal.php
+++ b/wikimedia/donation-interface/gateway_common/WmfFramework.drupal.php
@@ -30,7 +30,7 @@
        }
 
        static function getHostname() {
-               return 'localhost';
+               return gethostname();
        }
 
        static function formatMessage( $message_identifier ) {
diff --git a/wikimedia/donation-interface/gateway_common/donation.api.php 
b/wikimedia/donation-interface/gateway_common/donation.api.php
index 216ce3f..4a77272 100644
--- a/wikimedia/donation-interface/gateway_common/donation.api.php
+++ b/wikimedia/donation-interface/gateway_common/donation.api.php
@@ -132,59 +132,6 @@
        }
 
        /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getParamDescription() {
-               return array(
-                       'gateway' => 'Which payment gateway to use - adyen, 
globalcollect, etc.',
-                       'amount' => 'The amount donated',
-                       'currency_code' => 'Currency code',
-                       'fname' => 'First name',
-                       'lname' => 'Last name',
-                       'street' => 'First line of street address',
-                       'street_supplemental' => 'Second line of street 
address',
-                       'city' => 'City',
-                       'state' => 'State abbreviation',
-                       'zip' => 'Postal code',
-                       'email' => 'Email address',
-                       'country' => 'Country code',
-                       'card_num' => 'Credit card number',
-                       'card_type' => 'Credit card type',
-                       'expiration' => 'Expiration date',
-                       'cvv' => 'CVV security code',
-                       'payment_method' => 'Payment method to use',
-                       'payment_submethod' => 'Payment submethod to use',
-                       'language' => 'Language code',
-                       'order_id' => 'Order ID (if a donation has already been 
started)',
-                       'wmf_token' => 'Mediawiki edit token',
-                       'utm_source' => 'Tracking variable',
-                       'utm_campaign' => 'Tracking variable',
-                       'utm_medium' => 'Tracking variable',
-                       'referrer' => 'Original referrer',
-                       'recurring' => 'Optional - indicates that the 
transaction is meant to be recurring.',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getDescription() {
-               return array(
-                       'This API allow you to submit a donation to the 
Wikimedia Foundation using a',
-                       'variety of payment processors.',
-               );
-       }
-
-       /**
-        * @deprecated since MediaWiki core 1.25
-        */
-       public function getExamples() {
-               return array(
-                       
'api.php?action=donate&gateway=globalcollect&amount=2.00&currency_code=USD',
-               );
-       }
-
-       /**
         * @see ApiBase::getExamplesMessages()
         */
        protected function getExamplesMessages() {
diff --git a/wikimedia/donation-interface/gateway_common/gateway.adapter.php 
b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
index 307b0a7..67f016a 100644
--- a/wikimedia/donation-interface/gateway_common/gateway.adapter.php
+++ b/wikimedia/donation-interface/gateway_common/gateway.adapter.php
@@ -1436,7 +1436,7 @@
                $this->logPaymentDetails();
                // Feed the message into the pending queue, so the CRM queue 
consumer
                // can read it to fill in donor details when it gets a partial 
message
-               $this->setLimboMessage();
+               $this->sendPendingMessage();
                // Avoid 'bad ffname' logspam on return and try again links.
                $this->session_pushFormName( $this->getData_Unstaged_Escaped( 
'ffname' ) );
        }
@@ -2254,19 +2254,10 @@
                DonationQueue::instance()->push( $this->getStompTransaction(), 
$queue );
        }
 
-       protected function setLimboMessage( $queue = 'pending' ) {
-               // FIXME: log the key and raw queue name.
-               $this->logger->info( "Setting transaction in limbo store 
[$queue]" );
-               DonationQueue::instance()->push( $this->getStompTransaction(), 
$queue );
-       }
-
-       protected function deleteLimboMessage( $queue = 'pending' ) {
-               $this->logger->info( "Clearing transaction from limbo store 
[$queue]" );
-               try {
-                       DonationQueue::instance()->delete( 
$this->getCorrelationID(), $queue );
-               } catch( BadMethodCallException $ex ) {
-                       $this->logger->warning( "Backend for queue [$queue] 
does not support deletion.  Hope your message had an expiration date!" );
-               }
+       protected function sendPendingMessage() {
+               $order_id = $this->getData_Unstaged_Escaped( 'order_id' );
+               $this->logger->info( "Sending donor details for $order_id to 
pending queue" );
+               DonationQueue::instance()->push( $this->getStompTransaction(), 
'pending' );
        }
 
        /**
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/de.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/de.json
index 47f8b41..8bc6081 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/de.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/de.json
@@ -211,6 +211,7 @@
        "donate_interface-donate-error-thank-you-for-your-support": "Vielen 
Dank für Ihre Unterstützung.",
        "donate_interface-error-no-form": "Wir konnten kein Spendenformular 
finden, das Ihren Parametern entspricht. Bitte kontaktieren Sie 
[mailto:don...@wikimedia.org unser Hilfeteam] für mehr Informationen.",
        "donate_interface-error-no-form-html": "Wir konnten kein 
Spendenformular mit Ihren Parametern finden. Bitte versuchen Sie eine unserer 
<a href=\"$1\">anderen Spendemöglichkeiten</a> oder kontaktieren Sie uns unter 
<a href=\"mailto:$2\";>$2</a>.",
+       "donate_interface-error-reference": "Fehlerreferenz: $1",
        "php-response-declined": "Ihre Transaktion konnte nicht akzeptiert 
werden.",
        "donate_interface-thankyou": "Vielen Dank für Ihre Spende!",
        "donate_interface-post-transaction": "Transaktionsdetails",
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/en.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/en.json
index 8c6e54f..f5e6a7a 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/en.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/en.json
@@ -224,6 +224,7 @@
        "donate_interface-donate-error-thank-you-for-your-support": "Thank you 
for your support!",
        "donate_interface-error-no-form": "We were unable to find a donation 
form matching your parameters. Please contact [mailto:don...@wikimedia.org our 
help team] for more information.",
        "donate_interface-error-no-form-html": "We were unable to find a 
donation form matching your parameters. Please try one of our <a 
href=\"$1\">other ways to give</a>, or contact us at <a 
href=\"mailto:$2\";>$2</a>.",
+       "donate_interface-error-reference": "Error reference: $1",
        "php-response-declined": "Your transaction could not be accepted.",
        "donate_interface-thankyou": "Thank you for your donation!",
        "donate_interface-post-transaction": "Transaction details",
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/fr.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/fr.json
index 4f8c441..910ce80 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/fr.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/fr.json
@@ -234,6 +234,7 @@
        "donate_interface-donate-error-thank-you-for-your-support": "Merci de 
votre soutien !",
        "donate_interface-error-no-form": "Nous n’avons pas pu trouver de 
formulaire de don correspondant à vos paramètres. Veuillez contacter  
[mailto:don...@wikimedia.org notre équipe d’assistance] pour plus 
d’informations.",
        "donate_interface-error-no-form-html": "Nous n’avons pas pu trouver un 
formulaire de don correspondant à vos paramètres. Veuillez essayer un de nos <a 
href=\"$1\">autres moyens de donner</a>, ou nous contacter à <a 
href=\"mailto:$2\";>$2</a>.",
+       "donate_interface-error-reference": "Numéro de référence d'erreur : $1",
        "php-response-declined": "Votre transaction n’a pu être acceptée.",
        "donate_interface-thankyou": "Merci pour votre don !",
        "donate_interface-post-transaction": "Détails de la transaction",
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/it.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/it.json
index 864d8a4..aea21c3 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/it.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/it.json
@@ -19,7 +19,8 @@
                        "Ricordisamoa",
                        "Gianfranco",
                        "Alexmar983",
-                       "Matteocng"
+                       "Matteocng",
+                       "Selven"
                ]
        },
        "donate_interface": "Sostieni Wikimedia",
@@ -185,6 +186,7 @@
        "donate_interface-error-msg-visa": "Si prega di inserire un numero di 
carta corretto per Visa.",
        "donate_interface-error-msg-discover": "Si prega di inserire un numero 
di carta corretto per Discover.",
        "donate_interface-error-msg-amount": "importo della donazione",
+       "donate_interface-error-msg-limit": "La tua donazione non può essere 
elaborata. Si prega di provare uno dei nostri <a 
href=\"//wikimediafoundation.org/wiki/Ways_to_Give/en\">altri metodi di 
donazione</a>, provare con una quantità inferiore o riprovare domani.",
        "donate_interface-error-msg-email": "indirizzo email",
        "donate_interface-error-msg-fname": "nome",
        "donate_interface-error-msg-lname": "cognome",
@@ -212,6 +214,7 @@
        "donate_interface-error-msg-fiscal_number": "codice fiscale",
        "donate_interface-error-msg-issuer_id": "banca",
        "donate_interface-donate-error-try-a-different-card": "Per favore [$1  
provare con una carta diversa] oppure con [$2 un'altra modalità di donazione] 
oppure contattateci all'indirizzo $3",
+       "donate_interface-donate-error-try-a-different-card-html": "Si prega di 
provare con un'altra carta o uno dei nostri <a href=\"$1\">altri metodi di 
donazione</a>, o contattaci su <a href=\"mailto:$2\";>$2</a>",
        "donate_interface-donate-error-try-again-html": "<a 
href=\"$1\">Riprova</a>, <a href=\"$2\">scegli un altro metodo</a>, o 
contattaci a <a href=\"mailto:$3\";>$3</a>",
        "donate_interface-donate-error-thank-you-for-your-support": "Grazie per 
il supporto!",
        "donate_interface-error-no-form": "Non è stata trovata una donazione 
che corrisponda ai tuoi parametri. Contatta il [mailto:don...@wikimedia.org 
nostro team di aiuto] per ulteriori informazioni.",
@@ -344,6 +347,7 @@
        "donate_interface-obt-generic-name": "Bonifico bancario online",
        "donate_interface-obt-biller_id": "Codice emittente",
        "donate_interface-obt-customer_payment_reference": "Riferimento #",
+       "donate_interface-obt-customer_payment_reference_note": "Ogni 
Riferimento # è valido solo una volta. Si prega di non utilizzare questo numero 
di riferimento per future donazioni.",
        "donate_interface-obt-information": "Informazioni sulla transazione 
online",
        "donate_interface-online_bank_transfer_message": "Telefono & Internet 
Banking - BPAY®",
        "donate_interface-rtbt-issuer_id": "Seleziona una banca",
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/mk.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/mk.json
index e5ace9b..1594d3f 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/mk.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/mk.json
@@ -207,6 +207,7 @@
        "donate_interface-donate-error-thank-you-for-your-support": "Ви 
благодариме за Вашата поддршка!",
        "donate_interface-error-no-form": "Не можам да проанјдам образец за 
доброволни прилози што одговара на зададените параметри. За повеќе информации, 
обратете се на нашето [mailto:don...@wikimedia.org биро за помош].",
        "donate_interface-error-no-form-html": "Не можевме да го најдеме 
образецот за што одговара на вашите параметри. Пробајте ги <a 
href=\"$1\">другите начини на дарување</a>, или пак обратете ни се на <a 
href=\"mailto:$2\";>$2</a>.",
+       "donate_interface-error-reference": "Повикување на грешката: $1",
        "php-response-declined": "Плаќањето не е прифатено.",
        "donate_interface-thankyou": "Ви благодариме за прилогот!",
        "donate_interface-post-transaction": "Податоци за плаќањето",
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/nb.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/nb.json
index c47c908..ae15c73 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/nb.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/nb.json
@@ -10,7 +10,8 @@
                        "Sjurhamre",
                        "Zilvador",
                        "Jrobell",
-                       "Kingu"
+                       "Kingu",
+                       "Jon Harald Søby"
                ]
        },
        "donate_interface": "Støtt Wikimedia",
@@ -27,8 +28,9 @@
        "donate_interface-email-agreement": "Jeg samtykker i å motta sporadiske 
e-postoppdateringer fra Wikimedia Foundation.",
        "donate_interface-comment-title": "Offentlig kommentar",
        "donate_interface-donation-description": "Donasjon til Wikimedia 
Foundation",
-       "donate_interface-amount-error": "Vennligst skriv inn et gyldig beløp",
-       "donate_interface-smallamount-error": "Du må bidra med minst $1",
+       "donate_interface-monthly-donation-description": "Månedlig gave til 
Wikimedia Foundation",
+       "donate_interface-amount-error": "Velg et beløp å gi",
+       "donate_interface-smallamount-error": "Velg et beløp (minimum $1)",
        "donate_interface-bigamount-error": "Vi kan dessverre ikke ta imot 
donasjoner på mer enn 10&nbsp;000&nbsp;USD ($1&nbsp;$2) via denne nettsiden. 
Kontakt gjerne våre ansatte for store gaver på $3.",
        "donate_interface-processing-error": "Det har oppstått en feil ved 
behandlingen av forespørselen din.\nIngen prosessorer er tilgjengelige.",
        "donate_interface-fallback-currency-notice": "Valutaen din støttes 
ikke. Betalingen vil utføres ved hjelp av $1 om du ønsker å fortsette.",
@@ -142,6 +144,8 @@
        "donate_interface-donor-county": "Fylke",
        "donate_interface-donor-island": "Øy",
        "donate_interface-donor-state": "Delstat",
+       "donate_interface-donor-state-au": "Delstat/territorium",
+       "donate_interface-donor-state-ca": "Provins",
        "donate_interface-donor-zip": "Postnummer",
        "donate_interface-donor-postal": "Postnummer",
        "donate_interface-donor-country": "Land/region",
@@ -173,6 +177,7 @@
        "donate_interface-error-msg-visa": "Vennligst oppgi et gyldig 
kortnummer for Visa.",
        "donate_interface-error-msg-discover": "Vennligst oppgi et gyldig 
kortnummer for Discover.",
        "donate_interface-error-msg-amount": "gavebeløp",
+       "donate_interface-error-msg-limit": "Gaven din kunne ikke prosesseres. 
Prøv en av våre <a 
href=\"//wikimediafoundation.org/wiki/Ways_to_Give/en\">andre måter å gi</a>, 
prøv et lavere beløp, eller prøv igjen i morgen.",
        "donate_interface-error-msg-email": "e-postadresse",
        "donate_interface-error-msg-fname": "fornavn",
        "donate_interface-error-msg-lname": "etternavn",
@@ -198,8 +203,13 @@
        "donate_interface-error-msg-genaricrequired": "Dette feltet er 
obligatorisk",
        "donate_interface-error-msg-country-calc": "Feil – vi kan ikke ta imot 
donasjonen din for øyeblikket.",
        "donate_interface-error-msg-fiscal_number": "fiscal number",
+       "donate_interface-error-msg-issuer_id": "bank",
        "donate_interface-donate-error-try-a-different-card": "Vennligst [$1 
prøv et annet kort] eller en av de [$2 andre måtene å gi], eller kontakt oss på 
$3",
+       "donate_interface-donate-error-try-a-different-card-html": "Prøv et 
annet kort eller en av våre <a href=\"$1\">andre måter å gi</a>, eller kontakt 
oss på <a href=\"mailto:$2\";>$2</a>",
+       "donate_interface-donate-error-try-again-html": "<a href=\"$1\">Prøv 
igjen</a>, prøv en av våre <a href=\"$2\">andre måter å gi</a>, eller kontakt 
oss på <a href=\"mailto:$3\";>$3</a>",
        "donate_interface-donate-error-thank-you-for-your-support": "Takk for 
din støtte!",
+       "donate_interface-error-no-form": "Vi kunne ikke finne et 
doneringsskjema som passet med parameterne dine. Kontakt 
[mailto:don...@wikimedia.org hjelpeteamet vårt] for mer informasjon.",
+       "donate_interface-error-no-form-html": "Vi kunne ikke finne et 
doneringsskjema som passet med parameterne dine. Prøv en av våre <a 
href=\"$1\">andre måter å gi</a>, eller kontakt oss på <a 
href=\"mailto:$2\";>$2</a>.",
        "php-response-declined": "Din transaksjon kunne ikke aksepteres.",
        "donate_interface-thankyou": "Takk for din donasjon!",
        "donate_interface-post-transaction": "Transaksjonsdetaljer",
@@ -212,6 +222,8 @@
        "donate_interface-otherways-alt": "Det finnes <a 
href=\"//wikimediafoundation.org/wiki/Ways_to_Give/en\">andre måter å gi 
på</a>, blant annet med sjekk.",
        "donate_interface-otherways-short": "Andre måter å gi",
        "donate_interface-token-mismatch": "Økten din har utløpt. Prøv å fylle 
ut og sende inn skjemaet på nytt.",
+       "donate_interface-cc-token-expired": "Nøkkelen din har utløpt, klikk OK 
for å gjenoppfriske.",
+       "donate_interface-try-again": "Vi kan for tiden ikke prosessere gaven 
din. Prøv igjen senere.",
        "donate_interface-cc-form-header-personal": "Faktureringsinformasjon",
        "donate_interface-cc-form-header-payment": "Betalingsinformasjon",
        "donate_interface-make-your-donation": "Gi din donasjon nå",
@@ -282,6 +294,8 @@
        "donate_interface-cvv-number": "CVV-nummer",
        "donate_interface-verification-number": "Bekreftelsesnummer",
        "donate_interface-what-is-this": "Hva er dette?",
+       "donate_interface-did-you-mean": "Mente du <a href=\"#\" 
class=\"correction\">$1</a>?",
+       "donate_interface-debit": "debit",
        "donate_interface-do-not-include-dashes": "Ikke ta med bindestreker",
        "donate_interface-please-donate-today": "Gi i dag",
        "donate_interface-donate-now": "Gi nå",
@@ -324,6 +338,7 @@
        "donate_interface-obt-generic-name": "Nettoverføring",
        "donate_interface-obt-biller_id": "Regningsutstederkode",
        "donate_interface-obt-customer_payment_reference": "Referansenummer",
+       "donate_interface-obt-customer_payment_reference_note": "Hvert 
referansenummer er kun gyldig én gang. Ikke bruk samme referansenummer for 
fremtidige gaver.",
        "donate_interface-obt-information": "Informasjon om bankoverføring",
        "donate_interface-online_bank_transfer_message": "Telefon- og 
internettbank – BPAY®",
        "donate_interface-rtbt-issuer_id": "Velg en bank",
@@ -374,5 +389,33 @@
        "donate_interface-securelogo-title": "Klikk for å verifisere – denne 
siden bruker VeriSign SSL for sikker e-handel og konfidensiell kommunikasjon.",
        "donate_interface-secureLogo-text": "Om SSL-sertifikater",
        "donate_interface-error-http-403": "Du har ikke tilgang til denne 
siden.",
-       "apihelp-donate-param-city": "By."
+       "donate_interface-statement": "Wikimedia $1",
+       "apihelp-donate-description": "Dette API-et lar deg gi en gave til 
Wikimedia Foundation med mange forskjellige betalingsprosessorer.",
+       "apihelp-donate-param-gateway": "Hvilken betalingsport som skal brukes 
– adyen, globalcollect, etc.",
+       "apihelp-donate-param-amount": "Summen som doneres.",
+       "apihelp-donate-param-currency_code": "Valutakode.",
+       "apihelp-donate-param-fname": "Fornavn.",
+       "apihelp-donate-param-lname": "Etternavn.",
+       "apihelp-donate-param-street": "Første linje i gateadresse.",
+       "apihelp-donate-param-street_supplemental": "Andre linje i 
gateadresse.",
+       "apihelp-donate-param-city": "By.",
+       "apihelp-donate-param-state": "Delstatsforkortelse.",
+       "apihelp-donate-param-zip": "Postnummer.",
+       "apihelp-donate-param-email": "Epostadresse.",
+       "apihelp-donate-param-country": "Landskode.",
+       "apihelp-donate-param-card_num": "Kredittkortnummer.",
+       "apihelp-donate-param-card_type": "Kredittkorttype.",
+       "apihelp-donate-param-expiration": "Utløpsdato.",
+       "apihelp-donate-param-cvv": "CVV-sikkerhetskode.",
+       "apihelp-donate-param-payment_method": "Betalingsmetode å bruke.",
+       "apihelp-donate-param-payment_submethod": "Underbetalingsmetode å 
bruke.",
+       "apihelp-donate-param-language": "Språkkode.",
+       "apihelp-donate-param-order_id": "Ordre-ID (om en donasjon allerede har 
blitt startet).",
+       "apihelp-donate-param-wmf_token": "Redigeringsnøkkel.",
+       "apihelp-donate-param-utm_source": "Sporingsvariabel.",
+       "apihelp-donate-param-utm_campaign": "Sporingsvariabel.",
+       "apihelp-donate-param-utm_medium": "Sporingsvariabel.",
+       "apihelp-donate-param-referrer": "Opprinnelig referent.",
+       "apihelp-donate-param-recurring": "Indikerer at overføringen er ment å 
være gjentakende.",
+       "apihelp-donate-example-1": "Doner"
 }
diff --git a/wikimedia/donation-interface/gateway_common/i18n/interface/ne.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/ne.json
index 66ea31c..e898bae 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/ne.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/ne.json
@@ -11,7 +11,7 @@
        },
        "donate_interface": "विकिमीडियालाई सहयोग गर्नुहोस्",
        "donate_interface-desc": "दान अवतरण पृष्ठ जसले प्रवेशद्वार(gateway) 
एक्स्टेन्सनलाई एकिकृत गर्दछ।",
-       "donate_interface-langonly-desc": "चन्दा अन्तर्मोहोडा प्रणाली सन्देशहरु 
मात्र दर्शाउँछ",
+       "donate_interface-langonly-desc": "चन्दा अन्तर्मोहोडा प्रणाली सन्देशहरू 
मात्र दर्शाउँछ",
        "donate_interface-intro": "चुन्नुहोस् एउटा भुगतान पद्धति, राशि, अनि 
मुद्रा।",
        "donate_interface-amount": "राशि:",
        "donate_interface-other-amount": "अन्य राशि",
diff --git 
a/wikimedia/donation-interface/gateway_common/i18n/interface/qqq.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/qqq.json
index 59a1f22..307b2de 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/qqq.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/qqq.json
@@ -249,6 +249,7 @@
        "donate_interface-donate-error-thank-you-for-your-support": "Thank you 
for your support!",
        "donate_interface-error-no-form": "Error message given if no form or 
payment method is available in this language/country/currency.",
        "donate_interface-error-no-form-html": "HTML-formatted error message 
given if no form or payment method is available in this 
language/country/currency.\n* $1 - link to other payment methods\n* $2 - an 
email address, where the donor can report problems. Example: 
problemsdonat...@wikimedia.org",
+       "donate_interface-error-reference": "Message giving donors a reference 
number to make it easier for us to look up errors in our logs. Parameters:\n* 
$1 - the reference number",
        "php-response-declined": "Error message if the translaction was 
declined.",
        "donate_interface-thankyou": "A thank you for donating.",
        "donate_interface-post-transaction": "Header for transaction details 
after the transaction is fulfilled (receipt).",
diff --git 
a/wikimedia/donation-interface/gateway_common/i18n/interface/zh-hans.json 
b/wikimedia/donation-interface/gateway_common/i18n/interface/zh-hans.json
index 0a72869..3352f77 100644
--- a/wikimedia/donation-interface/gateway_common/i18n/interface/zh-hans.json
+++ b/wikimedia/donation-interface/gateway_common/i18n/interface/zh-hans.json
@@ -412,7 +412,7 @@
        "donate_interface-onetime-short": "单次",
        "donate_interface-securelogo-title": "点击验证 - 本网站选择VeriSign 
SSL用于安全电子商务和机密通信。",
        "donate_interface-secureLogo-text": "关于SSL证书",
-       "donate_interface-error-http-403": "你没有权限访问该页面。",
+       "donate_interface-error-http-403": "您没有权限访问该页面。",
        "donate_interface-statement": "维基媒体 $1",
        "apihelp-donate-description": "此API允许您向维基媒体基金会递交一次捐款,使用多种付款处理器。",
        "apihelp-donate-param-gateway": "要使用的支付网关——adyen、globalcollect等。",
diff --git 
a/wikimedia/donation-interface/gateway_forms/mustache/error_form.html.mustache 
b/wikimedia/donation-interface/gateway_forms/mustache/error_form.html.mustache
index 5cca389..7e7817f 100644
--- 
a/wikimedia/donation-interface/gateway_forms/mustache/error_form.html.mustache
+++ 
b/wikimedia/donation-interface/gateway_forms/mustache/error_form.html.mustache
@@ -19,4 +19,7 @@
         <p>
             {{ l10n "donate_interface-donate-error-thank-you-for-your-support" 
}}
         </p>
+        <p>
+            {{ l10n "donate_interface-error-reference" 
contribution_tracking_id }}
+        </p>
 </div>
diff --git 
a/wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php
 
b/wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php
deleted file mode 100644
index 87f7430..0000000
--- 
a/wikimedia/donation-interface/globalcollect_gateway/GlobalCollectOrphanRectifier_pooled.php
+++ /dev/null
@@ -1,230 +0,0 @@
-<?php
-
-use Predis\Connection\ConnectionException;
-
-/**
- * Legacy STOMP orphan rectifier
- * @deprecated
- *
- * TODO: Generalize to all gateways, using hooks to implement polymorphism.
- */
-class GlobalCollectOrphanRectifier_pooled {
-
-       protected $killfiles = array();
-       protected $order_ids = array();
-       protected $target_execute_time;
-       protected $max_per_execute; //only really used if you're going by-file.
-       protected $adapter;
-
-       public function __construct() {
-               // Have to turn this off here, until we know it's using the 
user's ip, and
-               // not 127.0.0.1 during the batch process.  Otherwise, we'll 
immediately
-               // lock ourselves out when processing multiple charges.
-               global $wgDonationInterfaceEnableIPVelocityFilter;
-               $wgDonationInterfaceEnableIPVelocityFilter = false;
-
-               if ( !$this->getOrphanGlobal( 'enable' ) ){
-                       $this->info( 'Orphan cron disabled. Have a nice day!' );
-                       return;
-               }
-
-               $this->target_execute_time = $this->getOrphanGlobal( 
'target_execute_time' );
-               $this->max_per_execute = $this->getOrphanGlobal( 
'max_per_execute' );
-
-               // FIXME: Is this just to trigger batch mode?
-               $data = array(
-                       'wheeee' => 'yes'
-               );
-               $this->adapter = new 
GlobalCollectOrphanAdapter(array('external_data' => $data));
-               $this->logger = DonationLoggerFactory::getLogger( 
$this->adapter );
-       }
-
-       protected function keepGoing(){
-               $elapsed = $this->getProcessElapsed();
-               if ( $elapsed < $this->target_execute_time ) {
-                       return true;
-               } else {
-                       return false;
-               }
-       }
-
-       /**
-        * This will both return the elapsed process time, and echo something 
for
-        * the cronspammer.
-        * @return int elapsed time since start in seconds
-        */
-       protected function getProcessElapsed(){
-               $elapsed = time() - $this->start_time;
-               $this->info( "Elapsed Time: {$elapsed}" );
-               return $elapsed;
-       }
-
-       protected function deleteMessage( $correlation_id, $queue ) {
-           DonationQueue::instance()->delete( $correlation_id, $queue );
-       }
-
-       public function processOrphans() {
-               // TODO: Make this configurable.
-               // 20 minutes: this is exactly equal to something on 
Globalcollect's side.
-               $time_buffer = 60*20;
-
-               $queue_pool = new CyclicalArray( $this->getOrphanGlobal( 
'gc_cc_limbo_queue_pool' ) );
-               if ( $queue_pool->isEmpty() ) {
-                       // FIXME: cheesy inline default
-                       $queue_pool = new CyclicalArray( 
GlobalCollectAdapter::GC_CC_LIMBO_QUEUE );
-               }
-
-               $this->info( "Slaying orphans..." );
-               $this->start_time = time();
-
-               //I want to be clear on the problem I hope to prevent with 
this.  Say,
-               //for instance, we pull a legit orphan, and for whatever 
reason, can't
-               //completely rectify it.  Then, we go back and pull more... and 
that
-               //same one is in the list again. We should stop after one try 
per
-               //message per execute.  We should also be smart enough to not 
process
-               //things we believe we just deleted.
-               $this->handled_ids = array();
-
-               while ( $this->keepGoing() && !$queue_pool->isEmpty() ) {
-                       $current_queue = $queue_pool->current();
-                       try {
-                               $message = DonationQueue::instance()->peek( 
$current_queue );
-
-                               if ( !$message ) {
-                                       $this->info( "Emptied queue 
[{$current_queue}], removing from pool." );
-                                       $queue_pool->dropCurrent();
-                                       continue;
-                               }
-
-                               $correlation_id = 'globalcollect-' . 
$message['gateway_txn_id'];
-                               if ( array_key_exists( $correlation_id, 
$this->handled_ids ) ) {
-                                       // We already did this one, keep going. 
 It's fine to draw
-                                       // again from the same queue.
-                                       DonationQueue::instance()->delete( 
$correlation_id, $current_queue );
-                                       continue;
-                               }
-
-                               // Check the timestamp to see if it's old 
enough, and stop when
-                               // we're below the threshold.  Messages are 
guaranteed to pop in
-                               // chronological order.
-                               $elapsed = $this->start_time - $message['date'];
-                               if ( $elapsed < $time_buffer ) {
-                                       $this->info( "Exhausted new messages in 
[{$current_queue}], removing from pool..." );
-                                       $queue_pool->dropCurrent();
-
-                                       continue;
-                               }
-
-                               // We got ourselves an orphan!
-                               if ( $this->rectifyOrphan( $message ) ) {
-                                       $this->handled_ids[$correlation_id] = 
'rectified';
-                               } else {
-                                       $this->handled_ids[$correlation_id] = 
'error';
-                               }
-
-                               // Throw out the message either way.
-                               $this->deleteMessage( $correlation_id, 
$current_queue );
-
-                               // Round-robin the pool before we complete the 
loop.
-                               $queue_pool->rotate();
-                       } catch ( ConnectionException $ex ) {
-                               // Drop this server, for the duration of this 
batch.
-                               $this->error( "Queue server for 
[$current_queue] is down! Ignoring for this run..." );
-                               $queue_pool->dropCurrent();
-                       }
-               }
-
-               //TODO: Make stats squirt out all over the place.
-               $rec = 0;
-               $err = 0;
-               foreach( $this->handled_ids as $id=>$whathappened ){
-                       switch ( $whathappened ){
-                               case 'rectified':
-                                       $rec += 1;
-                                       break;
-                               case 'error':
-                                       $err += 1;
-                                       break;
-                       }
-               }
-               $final = "\nDone! Final results: \n";
-               $final .= " $rec rectified orphans \n";
-               $final .= " $err errored out \n";
-               if ( isset( $this->adapter->orphanstats ) ){
-                       foreach ( $this->adapter->orphanstats as $status => 
$count ) {
-                               $final .= "\n   Status $status = $count";
-                       }
-               }
-               $final .= "\n Approximately " . $this->getProcessElapsed() . " 
seconds to execute.\n";
-               $this->info( $final );
-       }
-
-       /**
-        * Uses the Orphan Adapter to rectify (complete the charge for) a 
single orphan. Returns a boolean letting the caller know if
-        * the orphan has been fully rectified or not.
-        * @param array $data Some set of orphan data.
-        * @param boolean $query_contribution_tracking A flag specifying if we 
should query the contribution_tracking table or not.
-        * @return boolean True if the orphan has been rectified, false if not.
-        */
-       protected function rectifyOrphan( $data, $query_contribution_tracking = 
true ){
-               $data['order_id'] = $data['gateway_txn_id'];
-
-               $this->info( "Rectifying orphan: {$data['order_id']}" );
-               $rectified = false;
-
-               $normalized = DonationQueue::queueMessageToNormalized( $data );
-               $this->adapter->loadDataAndReInit( $normalized, 
$query_contribution_tracking );
-               $results = $this->adapter->do_transaction( 'Confirm_CreditCard' 
);
-               $message = $results->getMessage();
-               if ( $results->getCommunicationStatus() ){
-                       $this->info( $data['contribution_tracking_id'] . ": 
FINAL: " . $this->adapter->getValidationAction() );
-                       $rectified = true;
-               } else {
-                       $this->info( $data['contribution_tracking_id'] . ": 
ERROR: " . $message );
-                       if ( strpos( $message, "GET_ORDERSTATUS reports that 
the payment is already complete." ) === 0  ){
-                               $rectified = true;
-                       }
-
-                       //handles the transactions we've cancelled ourselves... 
though if they got this far, that's a problem too.
-                       $errors = $results->getErrors();
-                       if ( !empty( $errors ) && array_key_exists( '1000001', 
$errors ) ){
-                               $rectified = true;
-                       }
-
-                       //apparently this is well-formed GlobalCollect for 
"iono". Get rid of it.
-                       if ( strpos( $message, "No processors are available." ) 
=== 0 ){
-                               $rectified = true;
-                       }
-               }
-
-               $this->info( $message );
-
-               return $rectified;
-       }
-
-       /**
-        * Gets the global setting for the key passed in.
-        * @param string $key
-        *
-        * FIXME: Reuse GatewayAdapter::getGlobal.
-        * @return mixed
-        */
-       protected static function getOrphanGlobal( $key ){
-               global $wgDonationInterfaceOrphanCron;
-               if ( array_key_exists( $key, $wgDonationInterfaceOrphanCron ) ){
-                       return $wgDonationInterfaceOrphanCron[$key];
-               } else {
-                       return NULL;
-               }
-       }
-
-       protected function info( $msg ) {
-               $this->logger->info( $msg );
-               print( "{$msg}\n" );
-       }
-
-       protected function error( $msg ) {
-               $this->logger->error( $msg );
-               error_log( $msg );
-       }
-}
diff --git 
a/wikimedia/donation-interface/globalcollect_gateway/config/payment_submethods.yaml
 
b/wikimedia/donation-interface/globalcollect_gateway/config/payment_submethods.yaml
index c33fc7d..22d0d52 100644
--- 
a/wikimedia/donation-interface/globalcollect_gateway/config/payment_submethods.yaml
+++ 
b/wikimedia/donation-interface/globalcollect_gateway/config/payment_submethods.yaml
@@ -92,7 +92,8 @@
         HU: true
         IE: true
         IL: true
-        IN: true
+# Temporarily disabled 10/7/2016, see T147673
+#        IN: true
         IT: true
         JO: true
         JP: true
diff --git 
a/wikimedia/donation-interface/globalcollect_gateway/globalcollect.adapter.php 
b/wikimedia/donation-interface/globalcollect_gateway/globalcollect.adapter.php
index 6d389c5..1550afa 100644
--- 
a/wikimedia/donation-interface/globalcollect_gateway/globalcollect.adapter.php
+++ 
b/wikimedia/donation-interface/globalcollect_gateway/globalcollect.adapter.php
@@ -25,8 +25,6 @@
        const GATEWAY_NAME = 'Global Collect';
        const IDENTIFIER = 'globalcollect';
        const GLOBAL_PREFIX = 'wgGlobalCollectGateway';
-       // @deprecated
-       const GC_CC_LIMBO_QUEUE = 'globalcollect-cc-limbo';
 
        public function getCommunicationType() {
                return 'xml';
@@ -625,13 +623,7 @@
         */
        private function transactionConfirm_CreditCard(){
                $is_orphan = $this->isBatchProcessor();
-               if ( !$is_orphan ) {
-                       // This was a normal front-end donation.
-
-                       // @deprecated We should be able to skip any deletion.
-                       $this->logger->info( 'Donor returned, deleting limbo 
message' );
-                       $this->deleteLimboMessage( self::GC_CC_LIMBO_QUEUE );
-               } else {
+               if ( $is_orphan ) {
                        // We're in orphan processing mode, so a "pending 
waiting for donor
                        // input" status means that we'll never complete.  Set 
this range
                        // to map to "failed".
@@ -652,7 +644,7 @@
                        $status_result = $this->do_transaction( 
'GET_ORDERSTATUS' );
                        $validationAction = $this->getValidationAction();
                        $cvv_result = $this->getData_Unstaged_Escaped( 
'cvv_result' );
-                       $gotCVV = !empty( $cvv_result );
+                       $gotCVV = strlen( $cvv_result ) > 0;
                        // TODO: This logging is redundant with the response 
from GET_ORDERSTATUS.
                        $logmsg = 'CVV Result: ' . 
$this->getData_Unstaged_Escaped( 'cvv_result' );
                        $logmsg .= ', AVS Result: ' . 
$this->getData_Unstaged_Escaped( 'avs_result' );
@@ -881,10 +873,6 @@
                                                //get the old status from the 
first txn, and add in the part where we set the payment.
                                                
$this->transaction_response->setTxnMessage( "Original Response Status 
(pre-SET_PAYMENT): " . $original_status_code );
                                        }
-
-                                       // We won't need the limbo message 
again, either way, so cancel it.
-                                       // @deprecated
-                                       $this->deleteLimboMessage();
                                }
             }
         }
@@ -1659,7 +1647,7 @@
                        if ( $action != FinalStatus::FAILED ){
                                // TODO: if method_loses_control rather than 
hardcode cc.
                                if ( $this->getData_Unstaged_Escaped( 
'payment_method' ) === 'cc' ) {
-                                       $this->setLimboMessage( 
self::GC_CC_LIMBO_QUEUE );
+                                       $this->sendPendingMessage();
                                }
                        }
                }
diff --git 
a/wikimedia/donation-interface/globalcollect_gateway/scripts/orphans.php 
b/wikimedia/donation-interface/globalcollect_gateway/scripts/orphans.php
deleted file mode 100644
index 1d0ce87..0000000
--- a/wikimedia/donation-interface/globalcollect_gateway/scripts/orphans.php
+++ /dev/null
@@ -1,21 +0,0 @@
-<?php
-//actually, as a maintenance script, this totally is a valid entry point. 
-// FIXME: Prevent web access even if the security is misconfigured so this is 
runnable.
-
-$IP = getenv( 'MW_INSTALL_PATH' );
-if ( $IP === false ) {
-       $IP = __DIR__ . '/../../../..';
-}
-
-//If you get errors on this next line, set (and export) your MW_INSTALL_PATH 
var. 
-require_once( "$IP/maintenance/Maintenance.php" );
-
-class OrphanMaintenance extends Maintenance {
-       public function execute() {
-               $rectifier = new GlobalCollectOrphanRectifier_pooled();
-               $rectifier->processOrphans();
-       }
-}
-
-$maintClass = 'OrphanMaintenance';
-require_once RUN_MAINTENANCE_IF_MAIN;
diff --git 
a/wikimedia/donation-interface/paypal_gateway/express_checkout/paypal_express.adapter.php
 
b/wikimedia/donation-interface/paypal_gateway/express_checkout/paypal_express.adapter.php
index 306ebb7..6cc85d7 100644
--- 
a/wikimedia/donation-interface/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ 
b/wikimedia/donation-interface/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -406,8 +406,6 @@
                                // response and sort it into complete or 
pending.
                                $this->finalizeInternalStatus( 
FinalStatus::COMPLETE );
                                $this->postProcessDonation();
-                               // FIXME: deprecated
-                               $this->deleteLimboMessage( 'pending' );
                                break;
                        case 'SetExpressCheckout':
                        case 'SetExpressCheckout_recurring':
@@ -476,8 +474,6 @@
                                // TODO: Can we do this from do_transaction 
instead, or at least protect with !recurring...
                                $this->finalizeInternalStatus( $status );
                                $this->postProcessDonation();
-                               // FIXME: deprecated
-                               $this->deleteLimboMessage( 'pending' );
                                break;
                        }
 
diff --git 
a/wikimedia/donation-interface/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
 
b/wikimedia/donation-interface/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
index 70c1ce9..482bb9d 100644
--- 
a/wikimedia/donation-interface/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
+++ 
b/wikimedia/donation-interface/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
@@ -456,10 +456,6 @@
                $gateway->setDummyGatewayResponseCode( $code );
                $gateway->do_transaction( 'Confirm_CreditCard' );
                $this->assertEquals( 1, count( $gateway->curled ), "Gateway 
kept trying even with response code $code!  MasterCard could fine us a thousand 
bucks for that!" );
-
-               // Test limbo queue contents.
-               $this->assertEquals( array( true ), $gateway->limbo_messages,
-                       "Gateway did not delete limbo message for code $code!" 
);
        }
 
        /**
diff --git a/wikimedia/donation-interface/tests/phpunit/AllTests.php 
b/wikimedia/donation-interface/tests/phpunit/AllTests.php
index bc1b3b0..80a429b 100644
--- a/wikimedia/donation-interface/tests/phpunit/AllTests.php
+++ b/wikimedia/donation-interface/tests/phpunit/AllTests.php
@@ -25,9 +25,6 @@
        function __construct() {
                parent::__construct( 'DonationInterface test suite' );
 
-               // Set up globaltown
-               require_once __DIR__ . '/TestConfiguration.php';
-
                $suffixes = array(
                        'Test.php',
                );
diff --git 
a/wikimedia/donation-interface/tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php
 
b/wikimedia/donation-interface/tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php
index e940ae9..a1c196e 100644
--- 
a/wikimedia/donation-interface/tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php
+++ 
b/wikimedia/donation-interface/tests/phpunit/includes/test_gateway/TestingGlobalCollectAdapter.php
@@ -9,7 +9,7 @@
 
        public $curled = array ( );
 
-       public $limbo_messages = array();
+       public $pending_messages = array();
 
        public $dummyGatewayResponseCode;
 
@@ -48,15 +48,8 @@
        }
 
        // TODO: Store and test the actual messages.
-       public function setLimboMessage( $queue = 'pending' ) {
-               $this->limbo_messages[] = false;
-       }
-
-       /**
-        * Stub out the limboStomp fn and record the calls
-        */
-       public function deleteLimboMessage( $queue = 'pending' ) {
-               $this->limbo_messages[] = true;
+       public function sendPendingMessage() {
+               $this->pending_messages[] = false;
        }
 
        /**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Idd3caff97e514aeb3ecc40cddc0d8fe423cf6422
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm/vendor
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to