[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update PHPMailer

2017-02-15 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337960 )

Change subject: Update PHPMailer
..

Update PHPMailer

Change-Id: I57f02bc76164dcd78d4b937bcddfd828ef2b4634
---
M composer/installed.json
M phpmailer/phpmailer/VERSION
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.phpmaileroauthgoogle.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
A phpmailer/phpmailer/examples/contactform.phps
M phpmailer/phpmailer/examples/contentsutf8.html
M phpmailer/phpmailer/examples/scripts/XRegExp.js
M phpmailer/phpmailer/examples/send_file_upload.phps
M phpmailer/phpmailer/examples/send_multiple_file_upload.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M phpmailer/phpmailer/get_oauth_token.php
13 files changed, 174 insertions(+), 88 deletions(-)


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

diff --git a/composer/installed.json b/composer/installed.json
index 13bee3b..4dd1b02 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -566,68 +566,6 @@
 ]
 },
 {
-"name": "phpmailer/phpmailer",
-"version": "v5.2.21",
-"version_normalized": "5.2.21.0",
-"source": {
-"type": "git",
-"url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
-"shasum": ""
-},
-"require": {
-"php": ">=5.0.0"
-},
-"require-dev": {
-"phpdocumentor/phpdocumentor": "*",
-"phpunit/phpunit": "4.7.*"
-},
-"suggest": {
-"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
-},
-"time": "2016-12-28 15:35:48",
-"type": "library",
-"installation-source": "dist",
-"autoload": {
-"classmap": [
-"class.phpmailer.php",
-"class.phpmaileroauth.php",
-"class.phpmaileroauthgoogle.php",
-"class.smtp.php",
-"class.pop3.php",
-"extras/EasyPeasyICS.php",
-"extras/ntlm_sasl_client.php"
-]
-},
-"notification-url": "https://packagist.org/downloads/";,
-"license": [
-"LGPL-2.1"
-],
-"authors": [
-{
-"name": "Jim Jagielski",
-"email": "jim...@gmail.com"
-},
-{
-"name": "Marcus Bointon",
-"email": "phpmai...@synchromedia.co.uk"
-},
-{
-"name": "Andy Prevost",
-"email": "codeworxt...@users.sourceforge.net"
-},
-{
-"name": "Brent R. Matzelle"
-}
-],
-"description": "PHPMailer is a full-featured email creation and 
transfer class for PHP"
-},
-{
 "name": "minfraud/http",
 "version": "v1.71",
 "version_normalized": "1.71.0.0",
@@ -1238,5 +1176,67 @@
 "donations",
 "payments"
 ]
+},
+{
+"name": "phpmailer/phpmailer",
+"version": "v5.2.22",
+"version_normalized": "5.2.22.0",
+"source": {
+"type": "git",
+"url": "https://github.com/PHPMailer/PHPMailer.git";,
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/b18cb98131bd83103ccb26a888fdfe3177b8a663";,
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663",
+"shasum": ""
+},
+"require": {
+"php": ">=5.0.0"
+},
+"require-dev": {
+"phpdocumentor/phpdocumentor": "*",
+"phpunit/phpunit": "4.7.*"
+},
+"suggest": {
+"league/oauth2-google": "Needed for Google XOAUTH2 authentication"
+},
+"time": "2017-01-09 09:33:47",
+"type": "library",
+"installation-source": "dist",
+"autoload": {
+"classmap": [
+"class.phpmailer.php",
+"class.phpmaileroauth.php",
+"class.phpmaileroauthgoogle.php",
+"class.smtp.php",
+"class.pop3.php",
+"extras/EasyPeasyICS.php",
+"extras/ntlm_sasl_client.php"
+]
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"LGPL-2.1"

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update PHPMailer to 5.2.22

2017-02-15 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337929 )

Change subject: Update PHPMailer to 5.2.22
..

Update PHPMailer to 5.2.22

Bug: T158214
Change-Id: I3f4f0bee86e69cb47d4c0fba0f542a7133afeb53
---
M composer.json
M composer.lock
2 files changed, 8 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/29/337929/1

diff --git a/composer.json b/composer.json
index d6a3181..afb6d1d 100644
--- a/composer.json
+++ b/composer.json
@@ -21,7 +21,7 @@
 "cogpowered/finediff": "0.*",
 "wikimedia/donation-interface": "dev-master",
 "wikimedia/smash-pig": "dev-master",
-"phpmailer/phpmailer": "5.2.21",
+"phpmailer/phpmailer": "5.2.*",
 "phpseclib/phpseclib": "0.3.7",
 "predis/predis": "1.*",
 "twig/twig": "1.*"
diff --git a/composer.lock b/composer.lock
index 0f07766..ea29207 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "c2a08d033ae69a5ecbae72fdbe929a2a",
-"content-hash": "824641a9a433422fd2773d67876f5d7b",
+"hash": "3d6f8c32ad33ad35ce6ea1c9c53e9a9d",
+"content-hash": "d55d94a44358dcbf751118edd5798fe3",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -398,16 +398,16 @@
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.21",
+"version": "v5.2.22",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/b18cb98131bd83103ccb26a888fdfe3177b8a663";,
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663",
 "shasum": ""
 },
 "require": {
@@ -454,7 +454,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-12-28 15:35:48"
+"time": "2017-01-09 09:33:47"
 },
 {
 "name": "phpseclib/phpseclib",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f4f0bee86e69cb47d4c0fba0f542a7133afeb53
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Cache bank lookups via PSR-6

2017-02-15 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/337419 )

Change subject: Cache bank lookups via PSR-6
..


Cache bank lookups via PSR-6

Includes a simple cache implementation. Adds a new config key 'cache'
at the root of the default view, which should resolve to an object
that implements Psr\Cache\CacheItemPoolInterface.

With this, any project that depends on SmashPig can make its cache
available to SmashPig classes, as long as there is a PSR6 compatible
interface.

Bug: T128692
Change-Id: I457fb093c3777406efbfd4821acac47520af60d2
---
A Core/Cache/HashCache.php
A Core/Cache/HashCacheItem.php
M PaymentProviders/Ingenico/BankPaymentProvider.php
M PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
M SmashPig.yaml
M composer.json
M composer.lock
7 files changed, 388 insertions(+), 16 deletions(-)

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



diff --git a/Core/Cache/HashCache.php b/Core/Cache/HashCache.php
new file mode 100644
index 000..19edf98
--- /dev/null
+++ b/Core/Cache/HashCache.php
@@ -0,0 +1,166 @@
+items[$key] ) ) {
+   return new HashCacheItem( $key, $this->items[$key], 
true );
+   }
+   return new HashCacheItem( $key, null, false );
+   }
+
+   /**
+* Returns a traversable set of cache items.
+*
+* @param string[] $keys
+*   An indexed array of keys of items to retrieve.
+*
+* @throws InvalidArgumentException
+*   If any of the keys in $keys are not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return array|\Traversable
+*   A traversable collection of Cache Items keyed by the cache keys of
+*   each item. A Cache item will be returned for each key, even if that
+*   key is not found. However, if no keys are specified then an empty
+*   traversable MUST be returned instead.
+*/
+   public function getItems( array $keys = array() ) {
+   return array_map( array( $this, 'getItem' ), $keys );
+   }
+
+   /**
+* Confirms if the cache contains specified cache item.
+*
+* Note: This method MAY avoid retrieving the cached value for 
performance reasons.
+* This could result in a race condition with 
CacheItemInterface::get(). To avoid
+* such situation use CacheItemInterface::isHit() instead.
+*
+* @param string $key
+*   The key for which to check existence.
+*
+* @throws InvalidArgumentException
+*   If the $key string is not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if item exists in the cache, false otherwise.
+*/
+   public function hasItem( $key ) {
+   return isset( $this->items[$key] );
+   }
+
+   /**
+* Deletes all items in the pool.
+*
+* @return bool
+*   True if the pool was successfully cleared. False if there was an 
error.
+*/
+   public function clear() {
+   $this->items = array();
+   return true;
+   }
+
+   /**
+* Removes the item from the pool.
+*
+* @param string $key
+*   The key to delete.
+*
+* @throws InvalidArgumentException
+*   If the $key string is not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if the item was successfully removed. False if there was an 
error.
+*/
+   public function deleteItem( $key ) {
+   unset( $this->items[$key] );
+   return true;
+   }
+
+   /**
+* Removes multiple items from the pool.
+*
+* @param string[] $keys
+*   An array of keys that should be removed from the pool.
+* @throws InvalidArgumentException
+*   If any of the keys in $keys are not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if the items were successfully removed. False if there was an 
error.
+*/
+   public function deleteItems( array $keys ) {
+   array_walk( $keys, array( $this, 'deleteItem' ) );
+   return true;
+   }
+
+   /**
+* Persists a cache item immediately.
+*
+* @param CacheItemInterface $item
+*   The cache item to save.
+*
+* @return bool
+*   True if the item was successfully persisted. False if there was an 
error.
+*/
+   public function save( CacheItemInterface $item ) {
+   $this->items[$item->getKey()] = $item->get();
+   return true;
+

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Look up iDEAL banks without Ingenico SDK

2017-02-15 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/334733 )

Change subject: Look up iDEAL banks without Ingenico SDK
..


Look up iDEAL banks without Ingenico SDK

Working with sandbox credentials!
TODO: check more things in test, handle errors.

Bug: T128692
Change-Id: Ib22f3f18a184038e3c4c663083aed1c0069e5052
---
A PaymentProviders/Ingenico/BankPaymentProvider.php
A PaymentProviders/Ingenico/Tests/Data/productDirectory.response
A PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
3 files changed, 99 insertions(+), 0 deletions(-)

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



diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
new file mode 100644
index 000..9c0891a
--- /dev/null
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -0,0 +1,39 @@
+ $country,
+   'currencyCode' => $currency
+   );
+   $path = "products/$productId/directory";
+   $response = $this->makeApiCall( $path, 'GET', $query );
+
+   // TODO: base class should probably decode
+   $decoded = json_decode( $response['body'] );
+
+   $banks = array();
+
+   foreach( $decoded->entries as $entry ) {
+   $banks[$entry->issuerId] = $entry->issuerName;
+   }
+   return $banks;
+   }
+}
diff --git a/PaymentProviders/Ingenico/Tests/Data/productDirectory.response 
b/PaymentProviders/Ingenico/Tests/Data/productDirectory.response
new file mode 100644
index 000..ecfb28e
--- /dev/null
+++ b/PaymentProviders/Ingenico/Tests/Data/productDirectory.response
@@ -0,0 +1,15 @@
+HTTP/1.1 200 OK
+Date: Mon, 30 Jan 2017 17:58:02 GMT
+Server: Apache/2.4.16 (Unix) OpenSSL/1.0.1t
+X-Powered-By: Servlet/3.0 JSP/2.2
+Transfer-Encoding: chunked
+Content-Type: application/json
+
+{
+   "entries" : [ {
+  "countryNames" : [ "Nederland" ],
+  "issuerId" : "INGBNL2A",
+  "issuerList" : "short",
+  "issuerName" : "Issuer Simulation V3 - ING"
+   } ]
+}
diff --git 
a/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php 
b/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
new file mode 100644
index 000..1db0a84
--- /dev/null
+++ b/PaymentProviders/Ingenico/Tests/phpunit/BankPaymentProviderTest.php
@@ -0,0 +1,45 @@
+setConfig( 'ingenico' );
+   $this->curlWrapper = $this->getMock( 
'\SmashPig\Core\Http\CurlWrapper' );
+   $config->overrideObjectInstance( 'curl/wrapper', 
$this->curlWrapper );
+   parent::setUp();
+   }
+
+   public function testGetBankList() {
+   $this->setUpResponse( 'productDirectory', 200 );
+   $provider = new BankPaymentProvider();
+   $results = $provider->getBankList( 'NL', 'EUR' );
+   $this->assertEquals(
+   array(
+   'INGBNL2A' => 'Issuer Simulation V3 - ING'
+   ),
+   $results
+   );
+   }
+
+   protected function setUpResponse( $filename, $statusCode ) {
+   $contents = file_get_contents( __DIR__ . 
"/../Data/$filename.response" );
+   $parsed = CurlWrapper::parseResponse(
+   $contents, array( 'http_code' => $statusCode )
+   );
+   $this->curlWrapper->method( 'execute' )->willReturn( $parsed );
+   }
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib22f3f18a184038e3c4c663083aed1c0069e5052
Gerrit-PatchSet: 10
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 
Gerrit-Reviewer: Awight 
Gerrit-Reviewer: Cdentinger 
Gerrit-Reviewer: Ejegg 
Gerrit-Reviewer: jenkins-bot <>

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Base class for Ingenico payments without SDK

2017-02-15 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/333154 )

Change subject: Base class for Ingenico payments without SDK
..


Base class for Ingenico payments without SDK

Common functions for making Connect REST API calls, mostly
signing requests.

TODO: auth needs to handle those X-GCS custom headers

Bug: T128692
Change-Id: I4996945c83e31a60f695912fd5458895ba00ad4c
---
A PaymentProviders/Ingenico/Authenticator.php
A PaymentProviders/Ingenico/IngenicoPaymentProvider.php
A PaymentProviders/Ingenico/Tests/phpunit/AuthenticatorTest.php
M SmashPig.yaml
M phpunit.xml
5 files changed, 189 insertions(+), 0 deletions(-)

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



diff --git a/PaymentProviders/Ingenico/Authenticator.php 
b/PaymentProviders/Ingenico/Authenticator.php
new file mode 100644
index 000..bbb
--- /dev/null
+++ b/PaymentProviders/Ingenico/Authenticator.php
@@ -0,0 +1,58 @@
+https://developer.globalcollect.com/documentation/api/server/#api-authentication
+ */
+class Authenticator {
+
+   public function signRequest( OutboundRequest $request ) {
+   $config = Context::get()->getConfiguration();
+
+   $toSign = $this->getStringToSign( $request );
+   $secretApiKey = $config->val( 'credentials/api-secret' );
+
+   $signature = base64_encode(
+   hash_hmac(
+   'sha256',
+   $toSign,
+   $secretApiKey,
+   true
+   )
+   );
+
+   $apiKeyId = $config->val( 'credentials/api-key-id' );
+
+   $authHeader = "GCS v1HMAC:$apiKeyId:$signature";
+   $request->setHeader( 'Authorization', $authHeader );
+   }
+
+   protected function getStringToSign( OutboundRequest $request ) {
+   $headers = $request->getHeaders();
+
+   if ( empty( $headers['Content-Type'] ) ) {
+   $contentType = '';
+   } else {
+   $contentType = $headers['Content-Type'];
+   }
+
+   $urlParts = parse_url( $request->getUrl() );
+   $pathToSign = $urlParts['path'];
+   if ( !empty( $urlParts['query'] ) ) {
+   $pathToSign .= '?' . urldecode( $urlParts['query'] );
+   }
+
+   $toSign = $request->getMethod() . "\n"
+   . $contentType . "\n"
+   . $headers['Date'] . "\n"
+   //TODO X-GCS headers
+   . $pathToSign . "\n";
+
+   return $toSign;
+   }
+}
diff --git a/PaymentProviders/Ingenico/IngenicoPaymentProvider.php 
b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
new file mode 100644
index 000..3ad939a
--- /dev/null
+++ b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
@@ -0,0 +1,62 @@
+config = Context::get()->getConfiguration();
+   }
+
+   protected function makeApiCall( $path, $method = 'POST', $data = null ) 
{
+   if ( is_array( $data ) ) {
+   // FIXME: this is weird, maybe OutboundRequest should 
handle this part
+   if ( $method === 'GET' ) {
+   $path .= '?' . http_build_query( $data );
+   $data = null;
+   } else {
+   $data = json_encode( $data );
+   }
+   }
+   $base = $this->config->val( 'base-url' );
+   if ( substr( $base, -1 ) !== '/' ) {
+   $base .= '/';
+   }
+   $merchantId = $this->config->val( 'credentials/merchant-id' );
+   $url = $base . self::API_VERSION . "/$merchantId/$path";
+   $request = new OutboundRequest( $url, $method );
+   $request->setBody( $data );
+   if ( $method !== 'GET' ) {
+   $request->setHeader( 'Content-Type', 'application/json' 
);
+   }
+   // Set date header manually so we can use it in signature 
generation
+   $date = new DateTime( 'now', new DateTimeZone( 'UTC' ) );
+   $request->setHeader( 'Date', $date->format( 'D, d M Y H:i:s T' 
) );
+
+   // set more headers...
+
+   $authenticator = $this->config->object( 'authenticator' );
+   $authenticator->signRequest( $request );
+
+   $response = $request->execute();
+   // TODO error handling
+   return $response;
+   }
+}
diff --git a/PaymentProviders/Ingenico/Tests/phpunit/AuthenticatorTest.php 
b/PaymentProviders/Ingenico/Tests/phpunit/AuthenticatorTest.php
new file mode 100644
index 000..b9d9fd9
--- /dev/null
+++ b/Pa

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix command in CurrencyRates template header

2017-02-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337701 )

Change subject: Fix command in CurrencyRates template header
..

Fix command in CurrencyRates template header

Change-Id: Ia965954f58a1c9454f2d48ff410956ed90ea398d
---
M sites/all/modules/exchange_rates/templates/ref_source.php.twig
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/01/337701/1

diff --git a/sites/all/modules/exchange_rates/templates/ref_source.php.twig 
b/sites/all/modules/exchange_rates/templates/ref_source.php.twig
index 707bd60..4cf8336 100644
--- a/sites/all/modules/exchange_rates/templates/ref_source.php.twig
+++ b/sites/all/modules/exchange_rates/templates/ref_source.php.twig
@@ -2,7 +2,7 @@
 /**
  * Automatically generated from {{ generated_by }}
  * -- do not edit! --
- * Instead, run drush make_exchange_rates and look in the 'generated' folder.
+ * Instead, run drush make-exchange-refs and look in the 'generated' folder.
  */
 
 class CurrencyRates {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia965954f58a1c9454f2d48ff410956ed90ea398d
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Update exchange rates

2017-02-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337694 )

Change subject: Update exchange rates
..

Update exchange rates

It's been more than a year.

Change-Id: Ia7e3c315d604be412931de3f5fedd613607da23f
---
M gateway_common/CurrencyRates.php
1 file changed, 193 insertions(+), 189 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/94/337694/1

diff --git a/gateway_common/CurrencyRates.php b/gateway_common/CurrencyRates.php
index 3752566..7f20ea7 100644
--- a/gateway_common/CurrencyRates.php
+++ b/gateway_common/CurrencyRates.php
@@ -1,213 +1,217 @@
  5.95,
-   'ADP' => 150.87,
+   'ADF' => 6.11,
+   'ADP' => 155,
'AED' => 3.67,
-   'AFA' => 60.47,
-   'AFN' => 60.47,
-   'ALL' => 124.74,
-   'AMD' => 473.47,
-   'ANG' => 1.82,
-   'AOA' => 122.35,
-   'AON' => 122.35,
-   'ARS' => 9.1,
-   'ATS' => 12.48,
-   'AUD' => 1.35,
+   'AFA' => 67,
+   'AFN' => 67,
+   'ALL' => 126,
+   'AMD' => 486,
+   'ANG' => 1.78,
+   'AOA' => 165,
+   'AON' => 165,
+   'ARS' => 16,
+   'ATS' => 13,
+   'AUD' => 1.32,
'AWG' => 1.79,
-   'AZM' => 3926.19,
-   'AZN' => 1.05,
-   'BAM' => 1.77,
+   'AZM' => 9583,
+   'AZN' => 1.92,
+   'BAM' => 1.82,
'BBD' => 2,
-   'BDT' => 76.04,
-   'BEF' => 36.58,
-   'BGL' => 1.77,
-   'BGN' => 1.77,
-   'BHD' => 0.37,
-   'BIF' => 1599.65,
-   'BMD' => 1,
-   'BND' => 1.33,
-   'BOB' => 6.71,
-   'BRL' => 3.2,
-   'BSD' => 0.99,
-   'BTN' => 63.52,
-   'BWP' => 9.89,
-   'BYR' => 15378.7,
+   'BDT' => 78,
+   'BEF' => 38,
+   'BGL' => 1.81,
+   'BGN' => 1.81,
+   'BHD' => 0.37423,
+   'BIF' => 1663,
+   'BMD' => 0.999603,
+   'BND' => 1.41,
+   'BOB' => 6.73,
+   'BRL' => 3.13,
+   'BSD' => 0.995552,
+   'BTN' => 68,
+   'BWP' => 10,
+   'BYR' => 20020,
'BZD' => 1.96,
-   'CAD' => 1.27,
-   'CDF' => 912.52,
-   'CHF' => 0.95,
-   'CLP' => 651.51,
-   'CNY' => 6.09,
-   'COP' => 2648.2,
-   'CRC' => 523.08,
+   'CAD' => 1.31,
+   'CDF' => 1250,
+   'CHF' => 0.992983,
+   'CLP' => 647,
+   'CNY' => 6.88,
+   'COP' => 2922,
+   'CRC' => 537,
'CUC' => 1,
-   'CUP' => 23.15,
-   'CVE' => 99.81,
-   'CYP' => 0.53,
-   'CZK' => 24.59,
-   'DEM' => 1.77,
-   'DJF' => 177.72,
-   'DKK' => 6.77,
-   'DOP' => 44.46,
-   'DZD' => 99.04,
-   'ECS' => 25588.54,
-   'EEK' => 14.19,
-   'EGP' => 7.81,
-   'ESP' => 150.87,
-   'ETB' => 20.5,
-   'EUR' => 0.91,
-   'FIM' => 5.39,
-   'FJD' => 2.11,
-   'FKP' => 0.65,
-   'FRF' => 5.95,
-   'GBP' => 0.65,
-   'GEL' => 2.25,
-   'GHC' => 37964.2,
-   'GHS' => 3.8,
-   'GIP' => 0.65,
-   'GMD' => 38.45,
-   'GNF' => 7251.79,
-   'GRD' => 308.97,
-   'GTQ' => 7.43,
-   'GYD' => 197.27,
-   'HKD' => 7.75,
-   'HNL' => 21.27,
-   'HRK' => 6.87,

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix a couple comments

2017-02-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337687 )

Change subject: Fix a couple comments
..

Fix a couple comments

Change-Id: I946c828f02ab58cb94dba59653a290a8016e460e
---
M gateway_common/DataValidator.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/87/337687/1

diff --git a/gateway_common/DataValidator.php b/gateway_common/DataValidator.php
index 567a357..9427dd3 100644
--- a/gateway_common/DataValidator.php
+++ b/gateway_common/DataValidator.php
@@ -576,7 +576,7 @@
/**
 * Performs a Luhn algorithm check on a string.
 *
-* @param $str
+* @param string $str
 *
 * @return bool True if the number was valid according to the algorithm
 */
@@ -602,7 +602,7 @@
 
/**
 * Calculates and returns the card type for a given credit card number.
-* @param numeric $card_num A credit card number.
+* @param int $card_num A credit card number.
 * @return string|bool 'amex', 'mc', 'visa', 'discover', or false.
 */
public static function getCardType( $card_num ) {
@@ -776,7 +776,7 @@
 * component in there so I'm calling it close enough.
 * @param string $value the value that should be zero-padded out to 
$total_length
 * @param int $total_length The fixed number of characters that $value 
should be padded out to
-* @return The zero-padded value, or false if it was too long to work 
with.
+* @return string The zero-padded value, or false if it was too long to 
work with.
 */
static function getZeroPaddedValue( $value, $total_length ) {
//first, trim all leading zeroes off the value.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I946c828f02ab58cb94dba59653a290a8016e460e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add missing method visibility

2017-02-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337658 )

Change subject: Add missing method visibility
..

Add missing method visibility

Change-Id: Ia77eaad02199daae4c5289da4772cb25e0cf897d
---
M Core/Logging/Logger.php
M Core/QueueConsumers/BaseQueueConsumer.php
M Core/QueueConsumers/JobQueueConsumer.php
M Core/Runnable.php
M PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php
M PaymentProviders/AstroPay/ExpatriatedMessages/ExpirationMessage.php
M PaymentProviders/AstroPay/Tests/phpunit/NormalizeTest.php
M PaymentProviders/GlobalCollect/ExpatriatedMessages/GlobalCollectMessage.php
M PaymentProviders/PayPal/Message.php
M PaymentProviders/PayPal/PayPalPaymentsAPI.php
M PaymentProviders/PayPal/PaymentMessage.php
M PaymentProviders/PayPal/RecurringMessage.php
M PaymentProviders/PayPal/RefundMessage.php
M PaymentProviders/PayPal/SubscriptionMessage.php
M Tests/BaseSmashPigUnitTestCase.php
15 files changed, 23 insertions(+), 23 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/58/337658/1

diff --git a/Core/Logging/Logger.php b/Core/Logging/Logger.php
index 0c73dbd..8dad49e 100644
--- a/Core/Logging/Logger.php
+++ b/Core/Logging/Logger.php
@@ -22,7 +22,7 @@
 * @param Configuration $configConfiguration object to use
 * @param string$prefixBase prefix for logger
 */
-   static function init( $name, $threshold, Configuration $config, $prefix 
) {
+   public static function init( $name, $threshold, Configuration $config, 
$prefix ) {
if ( self::$context ) {
// FIXME: is this necessary?
throw new SmashPigException( "Attempting to 
reinitialize the logger is not allowed!" );
diff --git a/Core/QueueConsumers/BaseQueueConsumer.php 
b/Core/QueueConsumers/BaseQueueConsumer.php
index 05b72b9..175dc2c 100644
--- a/Core/QueueConsumers/BaseQueueConsumer.php
+++ b/Core/QueueConsumers/BaseQueueConsumer.php
@@ -46,7 +46,7 @@
 *
 * @param array $message
 */
-   abstract function processMessage( $message );
+   abstract public function processMessage( $message );
 
/**
 * Gets a fresh QueueConsumer
diff --git a/Core/QueueConsumers/JobQueueConsumer.php 
b/Core/QueueConsumers/JobQueueConsumer.php
index bbc48e0..916e427 100644
--- a/Core/QueueConsumers/JobQueueConsumer.php
+++ b/Core/QueueConsumers/JobQueueConsumer.php
@@ -16,7 +16,7 @@
 * @param array $jobMessage
 * @throws \SmashPig\Core\DataStores\DataSerializationException
 */
-   function processMessage( $jobMessage ) {
+   public function processMessage( $jobMessage ) {
if ( !isset( $jobMessage['php-message-class'] ) ) {
throw new RuntimeException(
'Job message missing required key 
\'php-message-class\''
diff --git a/Core/Runnable.php b/Core/Runnable.php
index 8264509..8782929 100644
--- a/Core/Runnable.php
+++ b/Core/Runnable.php
@@ -11,6 +11,6 @@
/**
 * Do whatever it is that you do.
 */
-   function execute();
+   public function execute();
 }
 
diff --git a/PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php 
b/PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php
index 9524d54..b07ff2a 100644
--- a/PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php
+++ b/PaymentProviders/Amazon/Tests/phpunit/NormalizeTest.php
@@ -6,7 +6,7 @@
 use SmashPig\Tests\BaseSmashPigUnitTestCase;
 
 class NormalizeTest extends BaseSmashPigUnitTestCase {
-   function setUp() {
+   public function setUp() {
parent::setUp();
$this->captureCompleted = $this->loadJson( __DIR__ . 
"/../Data/IPN/CaptureCompleted.json" );
$this->captureDeclined = $this->loadJson( __DIR__ . 
"/../Data/IPN/CaptureDeclined.json" );
@@ -14,11 +14,11 @@
$this->refundDeclined = $this->loadJson( __DIR__ . 
"/../Data/IPN/RefundDeclined.json" );
}
 
-   function normalizedToArray( $message ) {
+   protected function normalizedToArray( $message ) {
return json_decode( $message->toJson(), true );
}
 
-   function testNormalizeCaptureCompleted() {
+   public function testNormalizeCaptureCompleted() {
$expected = array(
'completion_message_id' => 'amazon-98765432-1',
'contribution_tracking_id' => '98765432',
@@ -45,7 +45,7 @@
$this->assertEquals( $expected, $normalized );
}
 
-   function testNormalizeRefundCompleted() {
+   public function testNormalizeRefundCompleted() {
$id = 'P01-000-000-C' . mt_rand( 1, 9 );
$expected = array(
'correlationId' => 'amazon-P01-000-000-R0',
diff --gi

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Message normalization tests

2017-02-14 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337595 )

Change subject: Message normalization tests
..

Message normalization tests

Test each type of message using data providers. This will help ensure
we don't break anything when we move recurring normalization into the
SmashPig job.

Bug: T107372
Change-Id: Ie02bd9d7cb9660ff8f6eb981ae79e333aca9f735
---
A PaymentProviders/PayPal/Tests/Data/express_checkout_transformed.json
A PaymentProviders/PayPal/Tests/Data/refund_transformed.json
A PaymentProviders/PayPal/Tests/Data/subscr_payment_transformed.json
A PaymentProviders/PayPal/Tests/Data/subscr_signup_transformed.json
A PaymentProviders/PayPal/Tests/Data/web_accept_transformed.json
M PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
6 files changed, 222 insertions(+), 97 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/95/337595/1

diff --git 
a/PaymentProviders/PayPal/Tests/Data/express_checkout_transformed.json 
b/PaymentProviders/PayPal/Tests/Data/express_checkout_transformed.json
new file mode 100644
index 000..77b8eef
--- /dev/null
+++ b/PaymentProviders/PayPal/Tests/Data/express_checkout_transformed.json
@@ -0,0 +1,17 @@
+{
+   "date": 1481144318,
+   "txn_type": "express_checkout",
+   "gateway_txn_id": "3N2616476S0123456",
+   "currency": "JPY",
+   "contribution_tracking_id": "123456",
+   "email": "nob...@wikimedia.org",
+   "first_name": "Fowl",
+   "last_name": "Pond",
+   "gross": "150",
+   "fee": "43",
+   "order_id": "123456",
+   "gateway": "paypal_ec",
+   "source_name": "SmashPig",
+   "source_type": "listener",
+   "source_version": "unknown"
+}
diff --git a/PaymentProviders/PayPal/Tests/Data/refund_transformed.json 
b/PaymentProviders/PayPal/Tests/Data/refund_transformed.json
new file mode 100644
index 000..ef9ca52
--- /dev/null
+++ b/PaymentProviders/PayPal/Tests/Data/refund_transformed.json
@@ -0,0 +1,25 @@
+{
+  "date": 1475088922,
+  "gateway_parent_id": "22b5YY4499222",
+  "gateway_txn_id": "99E56789RR1234222",
+  "currency": "USD",
+  "type": "refund",
+  "contribution_tracking_id": "93731212",
+  "email": "cl...@barrowgang.org",
+  "first_name": "Clyde",
+  "last_name": "Barrow",
+  "street_address": "1234 Outlaw Ave",
+  "city": "Telico",
+  "state_province": "TX",
+  "country": "US",
+  "postal_code": "75119",
+  "gross": "-1.00",
+  "fee": "-0.27",
+  "order_id": "93731212",
+  "gateway_refund_id": "99E56789RR1234222",
+  "gross_currency": "USD",
+  "gateway": "paypal",
+  "source_name": "SmashPig",
+  "source_type": "listener",
+  "source_version": "unknown"
+}
diff --git a/PaymentProviders/PayPal/Tests/Data/subscr_payment_transformed.json 
b/PaymentProviders/PayPal/Tests/Data/subscr_payment_transformed.json
new file mode 100644
index 000..da0be18
--- /dev/null
+++ b/PaymentProviders/PayPal/Tests/Data/subscr_payment_transformed.json
@@ -0,0 +1,45 @@
+{
+"mc_gross": "1.03",
+"protection_eligibility": "Eligible",
+"address_status": "confirmed",
+"payer_id": "X",
+"address_street": "123 Only Kidding",
+"payment_date": "16:03:13 Sep 21, 2016 PDT",
+"payment_status": "Completed",
+"charset": "UTF-8",
+"address_zip": "9",
+"first_name": "Joe",
+"mc_fee": "0.27",
+"address_country_code": "US",
+"address_name": "Joe Camel",
+"notify_version": "3.8",
+"subscr_id": "S-X",
+"custom": "7373",
+"payer_status": "verified",
+"business": "nob...@wikimedia.org",
+"address_country": "United States",
+"address_city": "Maynardsville",
+"verify_sign": "",
+"payer_email": "i...@google.net",
+"txn_id": "7",
+"payment_type": "instant",
+"payer_business_name": "Joe Camel",
+"last_name": "Camel",
+"address_state": "CA",
+"receiver_email": "nob...@wikimedia.org",
+"payment_fee": "0.27",
+"receiver_id": "7",
+"txn_type": "subscr_payment",
+"item_name": "Donation to the Wikimedia Foundation",
+"mc_currency": "USD",
+"item_number": "DONATE",
+"residence_country": "US",
+"transaction_subject": "7373",
+"payment_gross": "1.03",
+"ipn_track_id": "7",
+"date": "",
+"gateway": "paypal",
+"source_name": "SmashPig",
+"source_type": "listener",
+"source_version": "unknown"
+}
diff --git a/PaymentProviders/PayPal/Tests/Data/subscr_signup_transformed.json 
b/PaymentProviders/PayPal/Tests/Data/subscr_signup_transformed.json
new file mode 100644
index 000..c18c5e1
--- /dev/null
+++ b/PaymentProviders/PayPal/Tests/Data/subscr_signup_transformed.json
@@ -0,0 +1,40 @@
+{
+"amount3": "1.03",
+"address_status": "confirmed",
+"subscr_date": "16:03:11 Sep 21, 2016 PD

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: View 'globalcollect' is just an alias for 'ingenico'

2017-02-13 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337428 )

Change subject: View 'globalcollect' is just an alias for 'ingenico'
..

View 'globalcollect' is just an alias for 'ingenico'

Leave 'globalcollect' there for backwards compatibility

Change-Id: Iadae59a6738b6fd794b2f18d0e503539b955644a
---
M SmashPig.yaml
1 file changed, 5 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/28/337428/1

diff --git a/SmashPig.yaml b/SmashPig.yaml
index 872b69b..9ae9541 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -417,7 +417,7 @@
 # FIXME: if case_type=chargeback, then txn_type might be blank
 # and the message should go to the refund queue.
 
-globalcollect:
+ingenico: &INGENICO
 actions:
 - SmashPig\Core\Actions\IncomingMessage
 
@@ -425,7 +425,6 @@
 listener:
 class: 
SmashPig\PaymentProviders\GlobalCollect\GlobalCollectListener
 
-ingenico:
 base-url: 'https://api-sandbox.globalcollect.com/'
 
 credentials:
@@ -440,3 +439,7 @@
 bank-cache:
 key: SMASHPIG_INGENICO_IDEAL_BANK_LIST
 duration: 300
+
+# deprecated, delete when projects using SmashPig rename adaptors
+globalcollect:
+<<: &INGENICO

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iadae59a6738b6fd794b2f18d0e503539b955644a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP look up iDEAL banks, provide PSR6 to SmashPig

2017-02-13 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337420 )

Change subject: WIP look up iDEAL banks, provide PSR6 to SmashPig
..

WIP look up iDEAL banks, provide PSR6 to SmashPig

Needs SmashPig change I457fb093c3777406efbfd482

Bug: T128692
Change-Id: I9013355c7cc57d632f3ba7c7a55cb75ce2aca843
---
M DonationInterface.class.php
M composer.json
M composer.lock
M gateway_common/GatewayPage.php
M gateway_common/donation.api.php
M globalcollect_gateway/config/payment_submethods.yaml
M globalcollect_gateway/globalcollect.adapter.php
7 files changed, 154 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/20/337420/1

diff --git a/DonationInterface.class.php b/DonationInterface.class.php
index 6cdcf1d..5b43f44 100644
--- a/DonationInterface.class.php
+++ b/DonationInterface.class.php
@@ -1,5 +1,9 @@
 overrideObjectInstance( 'cache', $psr6Cache );
+   return $spConfig;
+   }
 }
diff --git a/composer.json b/composer.json
index 717ffa5..10fdd20 100644
--- a/composer.json
+++ b/composer.json
@@ -31,7 +31,8 @@
"zordius/lightncandy": "0.23",
"amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
"symfony/yaml": "^2.8",
-   "wikimedia/smash-pig": "dev-master"
+   "wikimedia/smash-pig": "dev-master",
+   "addshore/psr-6-mediawiki-badostuff-adapter": "dev-master"
},
"require-dev": {
"jakub-onderka/php-parallel-lint": "0.9.2"
diff --git a/composer.lock b/composer.lock
index 013a6a4..ad53dd1 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,9 +4,54 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "ee3f90702fff3bcc172baabd6f541eb5",
-"content-hash": "c80503673255d9fe80c09a081876776e",
+"hash": "e1bb8f020496591a40723b7189d7b97a",
+"content-hash": "a3d8f3b7b35ccb01637baf8e3966c58c",
 "packages": [
+{
+"name": "addshore/psr-6-mediawiki-badostuff-adapter",
+"version": "dev-master",
+"source": {
+"type": "git",
+"url": 
"https://github.com/addshore/psr-6-mediawiki-bagostuff-adapter.git";,
+"reference": "a4024f3a7cf2b2a3ffcf89edc682a15ea01bad08"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/addshore/psr-6-mediawiki-bagostuff-adapter/zipball/a4024f3a7cf2b2a3ffcf89edc682a15ea01bad08";,
+"reference": "a4024f3a7cf2b2a3ffcf89edc682a15ea01bad08",
+"shasum": ""
+},
+"require": {
+"psr/cache": "^1.0.0"
+},
+"require-dev": {
+"cache/integration-tests": "~0.9.1",
+"jakub-onderka/php-parallel-lint": "^0.9.2",
+"mediawiki/mediawiki-codesniffer": "^0.7.2",
+"phpunit/phpunit": "~4.8.0|~5.3.0"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"Addshore\\Psr\\Cache\\MediaWiki\\BagOStuff\\": "src/"
+}
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"GPL-2.0+"
+],
+"authors": [
+{
+"name": "Addshore"
+}
+],
+"description": "A MediaWiki BagOStuff PSR-6 adapter library",
+"keywords": [
+"cache",
+"mediawiki"
+],
+"time": "2017-02-11 12:44:23"
+},
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
 "version": "dev-master",
@@ -454,6 +499,52 @@
 "redis"
 ],
 "time": "2016-06-16 16:22:20"
+},
+{
+"name": "psr/cache",
+"version": "1.0.1",
+"source": {
+"type": "git",
+"url": "https://github.com/php-fig/cache.git";,
+"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8";,
+"reference": "d11b50ad223250cf17b86e38383413f5a6764bf8",
+"shasum": ""
+},
+"require": {
+"php": ">=5.3.0"
+},
+"type": "library",
+"extra": {
+"branch-alias": {
+"dev-master": "1.0.x-dev"
+}
+},
+"autoload": {
+

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Cache bank lookups via PSR-6

2017-02-13 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/337419 )

Change subject: Cache bank lookups via PSR-6
..

Cache bank lookups via PSR-6

Includes a simple cache implementation.

TODO: tests

Bug: T128692
Change-Id: I457fb093c3777406efbfd4821acac47520af60d2
---
A Core/Cache/HashCache.php
A Core/Cache/HashCacheItem.php
M PaymentProviders/Ingenico/BankPaymentProvider.php
M SmashPig.yaml
M composer.json
M composer.lock
6 files changed, 363 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/19/337419/1

diff --git a/Core/Cache/HashCache.php b/Core/Cache/HashCache.php
new file mode 100644
index 000..e819ce0
--- /dev/null
+++ b/Core/Cache/HashCache.php
@@ -0,0 +1,160 @@
+things['key'] ) ) {
+   return new HashCacheItem( $key, $this->things['key'], 
true );
+   }
+   return new HashCacheItem( $key, null, false );
+   }
+
+   /**
+* Returns a traversable set of cache items.
+*
+* @param string[] $keys
+*   An indexed array of keys of items to retrieve.
+*
+* @throws InvalidArgumentException
+*   If any of the keys in $keys are not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return array|\Traversable
+*   A traversable collection of Cache Items keyed by the cache keys of
+*   each item. A Cache item will be returned for each key, even if that
+*   key is not found. However, if no keys are specified then an empty
+*   traversable MUST be returned instead.
+*/
+   public function getItems( array $keys = array() ) {
+   return array_map( array( $this, 'getItem' ), $keys );
+   }
+
+   /**
+* Confirms if the cache contains specified cache item.
+*
+* Note: This method MAY avoid retrieving the cached value for 
performance reasons.
+* This could result in a race condition with 
CacheItemInterface::get(). To avoid
+* such situation use CacheItemInterface::isHit() instead.
+*
+* @param string $key
+*   The key for which to check existence.
+*
+* @throws InvalidArgumentException
+*   If the $key string is not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if item exists in the cache, false otherwise.
+*/
+   public function hasItem( $key ) {
+   return isset( $this->things['key'] );
+   }
+
+   /**
+* Deletes all items in the pool.
+*
+* @return bool
+*   True if the pool was successfully cleared. False if there was an 
error.
+*/
+   public function clear() {
+   $this->things = array();
+   return true;
+   }
+
+   /**
+* Removes the item from the pool.
+*
+* @param string $key
+*   The key to delete.
+*
+* @throws InvalidArgumentException
+*   If the $key string is not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if the item was successfully removed. False if there was an 
error.
+*/
+   public function deleteItem( $key ) {
+   unset( $this->things['key'] );
+   return true;
+   }
+
+   /**
+* Removes multiple items from the pool.
+*
+* @param string[] $keys
+*   An array of keys that should be removed from the pool.
+* @throws InvalidArgumentException
+*   If any of the keys in $keys are not a legal value a 
\Psr\Cache\InvalidArgumentException
+*   MUST be thrown.
+*
+* @return bool
+*   True if the items were successfully removed. False if there was an 
error.
+*/
+   public function deleteItems( array $keys ) {
+   array_walk( $keys, array( $this, 'deleteItem' ) );
+   return true;
+   }
+
+   /**
+* Persists a cache item immediately.
+*
+* @param CacheItemInterface $item
+*   The cache item to save.
+*
+* @return bool
+*   True if the item was successfully persisted. False if there was an 
error.
+*/
+   public function save( CacheItemInterface $item ) {
+   $this->things[$item->getKey()] = $item->get();
+   return true;
+   }
+
+   /**
+* Sets a cache item to be persisted later.
+*
+* @param CacheItemInterface $item
+*   The cache item to save.
+*
+* @return bool
+*   False if the item could not be queued or if a commit was attempted 
and failed. True otherwise.
+*/
+   

[MediaWiki-commits] [Gerrit] integration/config[master]: Use upstream civicrm-buildkit

2017-02-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336960 )

Change subject: Use upstream civicrm-buildkit
..

Use upstream civicrm-buildkit

Our fork is way behind, and we've got our special config upstreamed.

Change-Id: I46236769aaee887913010baec518558c0165599b
---
M jjb/wm-fundraising.yaml
1 file changed, 5 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/60/336960/1

diff --git a/jjb/wm-fundraising.yaml b/jjb/wm-fundraising.yaml
index 6bd5f27..8159128 100644
--- a/jjb/wm-fundraising.yaml
+++ b/jjb/wm-fundraising.yaml
@@ -9,11 +9,15 @@
 builders:
   - zuul-cloner:
   projects: >
-wikimedia/fundraising/civicrm-buildkit
 wikimedia/fundraising/crm
 wikimedia/fundraising/crm/civicrm
 wikimedia/fundraising/crm/drupal
   - shell: |
+  if [[ -d $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit ]]; 
then
+cd $WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit && git 
pull
+  else 
+git clone https://github.com/civicrm/civicrm-buildkit.git 
$WORKSPACE/src/wikimedia/fundraising/civicrm-buildkit
+  fi
   $WORKSPACE/src/wikimedia/fundraising/crm/bin/ci-create-dbs.sh
   $WORKSPACE/src/wikimedia/fundraising/crm/bin/ci-populate-dbs.sh
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I46236769aaee887913010baec518558c0165599b
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...tools[master]: Fix transaction isolation level

2017-02-08 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336739 )

Change subject: Fix transaction isolation level
..

Fix transaction isolation level

https://dev.mysql.com/doc/refman/5.7/en/innodb-locks-set.html says
that in an innoDB table, isolation level READ COMMITTED should mean
no locks for INSERT INTO... SELECT statements.

Bug: T157600
Change-Id: Ib52f8ba2851d664fe8d045eff113d70454196f9c
---
M silverpop_export/update.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/39/336739/1

diff --git a/silverpop_export/update.py b/silverpop_export/update.py
index d2bebd7..2d2302e 100644
--- a/silverpop_export/update.py
+++ b/silverpop_export/update.py
@@ -16,7 +16,7 @@
 
 config = process.globals.get_config()
 
-prefix = "SET SESSION TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;-- 
Silverpop Export Script, %s" % file
+prefix = "SET SESSION TRANSACTION ISOLATION LEVEL READ COMMITTED;-- 
Silverpop Export Script, %s" % file
 script_path = os.path.dirname(__file__)
 qbuf = [prefix]
 queries = []

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib52f8ba2851d664fe8d045eff113d70454196f9c
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP look up iDEAL banks, cache in Memcache

2017-02-06 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/336333 )

Change subject: WIP look up iDEAL banks, cache in Memcache
..

WIP look up iDEAL banks, cache in Memcache

Needs SmashPig change, also should mock Memcache access.

But the real problem is how this ties an internal method to the
mediawiki cache classes. Definitely needs to happen differently.

Bug: T128692
Change-Id: I2e0383ed0863fa1e9c0f3a5f967a0e1dc814a3e3
---
M globalcollect_gateway/config/payment_submethods.yaml
M globalcollect_gateway/globalcollect.adapter.php
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/33/336333/1

diff --git a/globalcollect_gateway/config/payment_submethods.yaml 
b/globalcollect_gateway/config/payment_submethods.yaml
index cc99b9c..200add4 100644
--- a/globalcollect_gateway/config/payment_submethods.yaml
+++ b/globalcollect_gateway/config/payment_submethods.yaml
@@ -324,6 +324,7 @@
 - ISSUERID
 logo: iDEAL-klein.gif
 show_single_logo: true
+lookup_cache_duration: 300
 issuerids:
 ABNANL2A: ABN Amro
 ASNBNL21: ASN Bank
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index 2970e7e..29e9e94 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -16,6 +16,7 @@
  *
  */
 use Psr\Log\LogLevel;
+use SmashPig\PaymentProviders\Ingenico\BankPaymentProvider;
 
 /**
  * GlobalCollectAdapter
@@ -25,6 +26,7 @@
const GATEWAY_NAME = 'Global Collect';
const IDENTIFIER = 'globalcollect';
const GLOBAL_PREFIX = 'wgGlobalCollectGateway';
+   const BANK_LIST_CACHE_KEY = 'ingenico_rtbt_ideal_bank_list';
 
public function getCommunicationType() {
return 'xml';
@@ -1729,4 +1731,39 @@
return false;
}
}
+
+   /**
+* Override parent class to look up iDEAL banks
+* @param string|null $payment_submethod
+* @return array|mixed information about the selected submethod
+*/
+   public function getPaymentSubmethodMeta( $payment_submethod = null ) {
+   if ( is_null( $payment_submethod ) ) {
+   $payment_submethod = $this->getPaymentSubmethod();
+   }
+   $meta = parent::getPaymentSubmethodMeta( $payment_submethod );
+   if ( $payment_submethod === 'rtbt_ideal' ) {
+   try {
+   $cache = ObjectCache::getLocalClusterInstance();
+   $banks = $cache->get( self::BANK_LIST_CACHE_KEY 
);
+   if ( !$banks ) {
+   $provider = new BankPaymentProvider();
+   $banks = $provider->getBankList(
+   
$this->getData_Unstaged_Escaped( 'country' ),
+   
$this->getData_Unstaged_Escaped( 'currency' )
+   );
+   $duration = $this->getGlobal( 
'BankCacheDuration' );
+   $cache->set( self::BANK_LIST_CACHE_KEY, 
$banks, $duration );
+   $meta['issuers'] = $banks;
+   }
+   }
+   catch( Exception $e ) {
+   $this->logger->warning(
+   'Something failed trying to look up the 
bonks, using hard-coded list' .
+   $e->getMessage()
+   );
+   }
+   }
+   return $meta;
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2e0383ed0863fa1e9c0f3a5f967a0e1dc814a3e3
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Use mediawiki cache for IP Velocity

2017-02-03 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335868 )

Change subject: Use mediawiki cache for IP Velocity
..

Use mediawiki cache for IP Velocity

Change-Id: I8a831b7ef95614609e60561b8a4db8eb6f85769d
TODO: more tests
---
M README.txt
M extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
A tests/phpunit/IPVelocityTest.php
3 files changed, 114 insertions(+), 53 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/68/335868/1

diff --git a/README.txt b/README.txt
index 3308f57..2ee6d4a 100644
--- a/README.txt
+++ b/README.txt
@@ -468,8 +468,6 @@
 $wgDonationInterfaceCustomFiltersInitialFunctions = array()
 
 //IP velocity filter globals
-$wgDonationInterfaceMemcacheHost = 'localhost'
-$wgDonationInterfaceMemcachePort = '11211'
 $wgDonationInterfaceIPVelocityFailScore = 100
 $wgDonationInterfaceIPVelocityTimeout = 60 * 5 //5 minutes in seconds
 $wgDonationInterfaceIPVelocityThreshhold = 3   //3 transactions per timeout
diff --git a/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php 
b/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
index 58b24ca..9b05f21 100644
--- a/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
+++ b/extras/custom_filters/filters/ip_velocity/ip_velocity.body.php
@@ -17,8 +17,8 @@
protected $cfo;
 
/**
-* Memcached instance we use to store and retrieve scores
-* @var Memcached
+* Cache instance we use to store and retrieve scores
+* @var BagOStuff
 */
protected $cache_obj;
 
@@ -29,6 +29,7 @@
 
parent::__construct( $gateway_adapter );
$this->cfo = $custom_filter_object;
+   $this->cache_obj = ObjectCache::getLocalClusterInstance();
}
 
protected function filter() {
@@ -46,64 +47,38 @@
$this->cfo->addRiskScore( 
$this->gateway_adapter->getGlobal( 'IPVelocityFailScore' ), 'IPBlacklist' );
return true;
}
-   
-   //if the user ip was in neither list, check the velocity. 
-   if ( $this->connectToMemcache() ){
 
-   $stored = $this->getMemcachedValue();
+   $stored = $this->getCachedValue();
 
-   if (!$stored){ //we don't have anything in memcache for 
this dude yet.
-   $this->gateway_adapter->debugarray[] = "Found 
no memcached data for $user_ip";
-   $this->cfo->addRiskScore( 0, 'IPVelocityFilter' 
); //want to see the explicit zero
-   return true;
+   if (!$stored){ //we don't have anything in memcache for this 
dude yet.
+   $this->gateway_adapter->debugarray[] = "Found no 
memcached data for $user_ip";
+   $this->cfo->addRiskScore( 0, 'IPVelocityFilter' ); 
//want to see the explicit zero
+   return true;
+   } else {
+   $count = count( $stored );
+   $this->gateway_adapter->debugarray[] = "Found a 
memcached bit of data for $user_ip: " . print_r($stored, true);
+   $this->gateway_logger->info( "IPVelocityFilter: 
$user_ip has $count hits" );
+   if ( $count >= $this->gateway_adapter->getGlobal( 
'IPVelocityThreshhold' ) ){
+   $this->cfo->addRiskScore( 
$this->gateway_adapter->getGlobal( 'IPVelocityFailScore' ), 'IPVelocityFilter' 
);
+   //cool off, sucker. Muahahaha.
+   $this->addNowToCachedValue( $stored, true );
} else {
-   $count = count( $stored );
-   $this->gateway_adapter->debugarray[] = "Found a 
memcached bit of data for $user_ip: " . print_r($stored, true);
-   $this->gateway_logger->info( "IPVelocityFilter: 
$user_ip has $count hits" );
-   if ( $count >= 
$this->gateway_adapter->getGlobal( 'IPVelocityThreshhold' ) ){
-   $this->cfo->addRiskScore( 
$this->gateway_adapter->getGlobal( 'IPVelocityFailScore' ), 'IPVelocityFilter' 
);
-   //cool off, sucker. Muahahaha. 
-   $this->addNowToMemcachedValue( $stored, 
true );
-   } else {
-   $this->cfo->addRiskScore( 0, 
'IPVelocityFilter' ); //want to see the explicit zero here, too.
-   }
-   }   
+   $this->cfo->addRiskScore( 0, 'IPVelocityFilter' 
); //want to see the explicit zero here, too.
+   }
}
-

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP normalize recurring messages at the listener

2017-02-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335742 )

Change subject: WIP normalize recurring messages at the listener
..

WIP normalize recurring messages at the listener

This will require a slight tweak to the consumer in CRM, to detect
already-normalized recurring payments.

Each message type will handle its own normalization, as with some
other classes.

Also gets the silly KeyedOpaque thing out of Paypal since we can
write directly to the Redis queues now.

Bug: T107372
Change-Id: Ic982667bab0e216677557139c43592a921d948d4
---
M PaymentProviders/PayPal/Job.php
M PaymentProviders/PayPal/Message.php
A PaymentProviders/PayPal/PaymentMessage.php
A PaymentProviders/PayPal/RecurringMessage.php
A PaymentProviders/PayPal/RefundMessage.php
A PaymentProviders/PayPal/SubscriptionMessage.php
M SmashPig.yaml
7 files changed, 124 insertions(+), 72 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/42/335742/1

diff --git a/PaymentProviders/PayPal/Job.php b/PaymentProviders/PayPal/Job.php
index 2871afb..b76727f 100644
--- a/PaymentProviders/PayPal/Job.php
+++ b/PaymentProviders/PayPal/Job.php
@@ -51,77 +51,34 @@
throw new Exception( 'Invalid PayPal message: ' . 
json_encode( $request ) );
}
 
-   $msg_type = null;
+   $msgClass = null;
+   $queue = '';
foreach ( $this->config->val( 'messages' ) as $type => $conf ) {
if ( in_array( $txn_type, $conf['txn_types'] ) ) {
-   $msg_type = $type;
+   $msgClass = $conf['class'];
+   $queue = $conf['queue'];
}
}
 
-   if ( ! $msg_type ) {
+   if ( !$msgClass ) {
throw new Exception( 'Invalid PayPal message type: ' . 
$txn_type );
}
 
// Transform into new message.
 
-   // FIXME this could just be an array, but we need compat with
-   // keyedopaque* until activemq goes away
-   $new_msg = new Message;
-   // FIXME hacks because the recurring consumer doesn't want
-   // a normalized message
-   if ( $msg_type === 'recurring' ) {
-   foreach ( $request as $key => $val ) {
-   $new_msg->$key = $val;
-   }
-   } else {
-   $map = $this->config->val( 'var_map' );
-   foreach ( $map as $rx => $tx ) {
-   if ( array_key_exists( $rx, $request ) ) {
-   $new_msg->$tx = $request[$rx];
-   }
-   }
-
-   // FIXME: var map can't put one thing in two places
-   if ( isset( $new_msg->contribution_tracking_id ) ) {
-   $new_msg->order_id = 
$new_msg->contribution_tracking_id;
-   }
-
-   // FIXME represent special case as var_map config 
override?
-   if ( $msg_type === 'refund' ) {
-   $new_msg->gateway_refund_id = 
$request['txn_id'];
-   $new_msg->gross_currency = 
$request['mc_currency'];
-   if ( isset( $new_msg->type ) &&
-   $new_msg->type === 
'chargeback_settlement' ) {
-   $new_msg->type = 'chargeback';
-   } else {
-   $new_msg->type = $msg_type;
-   }
-   }
-
-   // If someone's PayPal account is set to their name we 
don't want
-   // it to go in the address box. They should put in a 
business name
-   // or something.
-   if ( isset( $new_msg->supplemental_address_1 )
-   && $new_msg->supplemental_address_1 ===
-   "{$new_msg->first_name} {$new_msg->last_name}" 
) {
-   unset( $new_msg->supplemental_address_1 );
-   }
-
-   // FIXME once recurring uses normalized msg it needs 
this too
-   $new_msg->date = strtotime( $new_msg->date );
-   }
+   $creator = array( $msgClass, 'fromIpnMessage' );
+   $normalized = call_user_func( $creator, $request );
 
if ( $txn_type == 'express_checkout' ) {
-   $new_msg->gateway = 'paypal_ec';
+   $normalized['gateway'] = 'paypal_ec';
} else {
- 

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add source fields to arrays, not just objects

2017-02-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335741 )

Change subject: Add source fields to arrays, not just objects
..

Add source fields to arrays, not just objects

Change-Id: Ie55006deb446df96fa50e5e487b2e9559155d3c0
---
M CrmLink/Messages/SourceFields.php
1 file changed, 16 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/41/335741/1

diff --git a/CrmLink/Messages/SourceFields.php 
b/CrmLink/Messages/SourceFields.php
index d8ba7c0..b360cbf 100644
--- a/CrmLink/Messages/SourceFields.php
+++ b/CrmLink/Messages/SourceFields.php
@@ -4,12 +4,21 @@
 use SmashPig\Core\Context;
 
 class SourceFields {
-   public static function addToMessage( $message ) {
-   $message->source_name  = 'SmashPig';
-   $message->source_type = 'listener';
-   $message->source_host = gethostname();
-   $message->source_run_id = getmypid();
-   $message->source_version = Context::get()->getSourceRevision();
-   $message->source_enqueued_time = time();
+   public static function addToMessage( &$message ) {
+   if ( is_array( $message ) ) {
+   $message['source_name'] = 'SmashPig';
+   $message['source_type'] = 'listener';
+   $message['source_host'] = gethostname();
+   $message['source_run_id'] = getmypid();
+   $message['source_version'] = 
Context::get()->getSourceRevision();
+   $message['source_enqueued_time'] = time();
+   } else {
+   $message->source_name = 'SmashPig';
+   $message->source_type = 'listener';
+   $message->source_host = gethostname();
+   $message->source_run_id = getmypid();
+   $message->source_version = 
Context::get()->getSourceRevision();
+   $message->source_enqueued_time = time();
+   }
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie55006deb446df96fa50e5e487b2e9559155d3c0
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...tools[deploy]: Merge branch 'master' into deploy

2017-02-02 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335688 )

Change subject: Merge branch 'master' into deploy
..

Merge branch 'master' into deploy

fe3cf55 Change gateway for Express Checkout

Change-Id: Ia92bcdc667d50ba6d9f46a271f264a5836b34780
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/88/335688/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia92bcdc667d50ba6d9f46a271f264a5836b34780
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: deploy
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-02-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335486 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: If02ebbadf7bb4cc049560c3fb80b2b59ef0c7656
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/86/335486/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 1363912..8f77a9a 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 1363912fccffaaba387a654fd1640cfbcb7435e4
+Subproject commit 8f77a9a000e14f8cb2ee02cc260641d8566e5a37

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If02ebbadf7bb4cc049560c3fb80b2b59ef0c7656
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-02-01 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335485 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

068a245 Remove unused api_request stuff
9e3c3e6 Localisation updates from https://translatewiki.net.
c78 Fix paypal EC transformer list
758118f Fix dead 'Continue' button on paypal EC form
781a40e Fix paypal result routing

Change-Id: Id04b7714a587caf10ec9b45c153dfb4cae6bd422
---
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
1 file changed, 0 insertions(+), 585 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/85/335485/1

diff --git a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php 
b/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
deleted file mode 100644
index a91a33d..000
--- a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
+++ /dev/null
@@ -1,585 +0,0 @@
-<<< HEAD   (136391 Merge branch 'master' into deployment)
-===
-setMwGlobals( array(
-   'wgGlobalCollectGatewayEnabled' => true,
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'cc-vmad' => array(
-   'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => 
array( 'visa', 'mc', 'amex', 'discover' )),
-   'countries' => array(
-   '+' => array( 'US', ),
-   ),
-   ),
-   ),
-   ) );
-   }
-
-   /**
-* @param $name string The name of the test case
-* @param $data array Any parameters read from a dataProvider
-* @param $dataName string|int The name or index of the data set
-*/
-   function __construct( $name = null, array $data = array(), $dataName = 
'' ) {
-   parent::__construct( $name, $data, $dataName );
-   $this->testAdapterClass = 'TestingGlobalCollectAdapter';
-   }
-
-   /**
-* testnormalizeOrderID
-* Non-exhaustive integration tests to verify that order_id
-* normalization works as expected with different settings and
-* conditions in theGlobalCollect adapter
-* @covers GatewayAdapter::normalizeOrderID
-*/
-   public function testNormalizeOrderID() {
-   $request = $this->getDonorTestData();
-   $externalData = $this->getDonorTestData();
-   $session = array( 'Donor' => $this->getDonorTestData() );
-
-   //no order_id from anywhere, explicit no generate
-   $gateway = $this->getFreshGatewayObject( $externalData, array ( 
'order_id_meta' => array ( 'generate' => FALSE ) ) );
-   $this->assertFalse( $gateway->getOrderIDMeta( 'generate' ), 
'The order_id meta generate setting override is not working properly. Deferred 
order_id generation may be broken.' );
-   $this->assertNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), 'Failed asserting that an absent order id is left as null, when 
not generating our own' );
-
-   //no order_id from anywhere, explicit generate
-   $gateway = $this->getFreshGatewayObject( $externalData, array ( 
'order_id_meta' => array ( 'generate' => TRUE ) ) );
-   $this->assertTrue( $gateway->getOrderIDMeta( 'generate' ), 'The 
order_id meta generate setting override is not working properly. Self order_id 
generation may be broken.' );
-   $this->assertInternalType( 'numeric', 
$gateway->getData_Unstaged_Escaped( 'order_id' ), 'Generated order_id is not 
numeric, which it should be for GlobalCollect' );
-
-   // conflicting order_id in request and session, default GC 
generation
-   $request['order_id'] = '5';
-   $session['Donor']['order_id'] = '4';
-   $this->setUpRequest( $request, $session );
-   $gateway = new TestingGlobalCollectAdapter();
-   $this->assertEquals( '5', 
$gateway->getData_Unstaged_Escaped( 'order_id' ), 'GlobalCollect gateway is 
preferring session data over the request. Session should be secondary.' );
-
-   // conflicting order_id in request and session, garbage data in 
request, default GC generation
-   $request['order_id'] = 'nonsense!';
-   $this->setUpRequest( $request, $session );
-   $gateway = new TestingGlobalCollectAdapter();
-   $this->assertEquals( '4', 
$gateway->getData_Unstaged_Escaped( 'order_id' ), 'GlobalCollect gateway is not 
ignoring nonsensical order_id candidates' );
-
-   // order_id in session, default GC generation
-   unset( $request['orde

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix paypal result routing

2017-01-31 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335371 )

Change subject: Fix paypal result routing
..

Fix paypal result routing

Need to unstage the language if we stage it. Also, we were missing
an alias for the result page, which makes some wikis cry.

Bug: T152626
Change-Id: Ic20ee718fb045886e188c98c8c8cb04806413aa6
---
M gateway_common/DonorLocale.php
M paypal_gateway/paypal_gateway.alias.php
2 files changed, 9 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/71/335371/1

diff --git a/gateway_common/DonorLocale.php b/gateway_common/DonorLocale.php
index d5ff029..6ad0d3b 100644
--- a/gateway_common/DonorLocale.php
+++ b/gateway_common/DonorLocale.php
@@ -4,7 +4,7 @@
  * Set staged language to a locale ID with country information
  */
 class DonorLocale
-   implements StagingHelper
+   implements StagingHelper, UnstagingHelper
 {
public function stage( GatewayType $adapter, $normalized, &$staged_data 
) {
if ( isset( $normalized['language'] ) && isset( 
$normalized['country'] ) ) {
@@ -12,4 +12,11 @@
$staged_data['language'] = 
"{$parts[0]}_{$normalized['country']}";
}
}
+
+   public function unstage( GatewayType $adapter, $stagedData, 
&$unstagedData ) {
+   if ( isset( $stagedData['language'] ) ) {
+   $parts = explode( '_', $stagedData['language'] );
+   $unstagedData['language'] = $parts[0];
+   }
+   }
 }
diff --git a/paypal_gateway/paypal_gateway.alias.php 
b/paypal_gateway/paypal_gateway.alias.php
index 7ab1573..600a299 100644
--- a/paypal_gateway/paypal_gateway.alias.php
+++ b/paypal_gateway/paypal_gateway.alias.php
@@ -7,6 +7,7 @@
 /** English */
 $specialPageAliases['en'] = array(
'PaypalExpressGateway' => array( 'PaypalExpressGateway' ),
+   'PaypalExpressGatewayResult' => array( 'PaypalExpressGatewayResult' ),
'PaypalLegacyGateway' => array(
'PaypalLegacyGateway',
'PaypalGateway', // deprecated

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic20ee718fb045886e188c98c8c8cb04806413aa6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] integration/config[master]: Change SmashPig tests from PHP 5.3 to 5.5

2017-01-31 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335271 )

Change subject: Change SmashPig tests from PHP 5.3 to 5.5
..

Change SmashPig tests from PHP 5.3 to 5.5

Change-Id: Id07fb9de9d89b30a8dd6ccda8f745b7acd1188d8
---
M zuul/layout.yaml
1 file changed, 6 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/integration/config 
refs/changes/71/335271/1

diff --git a/zuul/layout.yaml b/zuul/layout.yaml
index b0196a8..4148411 100644
--- a/zuul/layout.yaml
+++ b/zuul/layout.yaml
@@ -740,7 +740,11 @@
 branch: (?!REL1_23|fundraising/REL.*)
 
   - name: ^.*php55.*$
-branch: (?!REL1_2[3-6]|fundraising/REL1_2[3-6]$)
+skip-if:
+  - project: '^mediawiki/.*$'
+branch: (REL1_2[3-6]|fundraising/REL1_2[3-6]$)
+  - project: ^wikimedia/fundraising/SmashPig$
+branch: ^deployment$
 
   - name: ^.*php70.*$
 branch: (?!REL1_2[3-6]|fundraising/REL1_2[3-6]$)
@@ -749,8 +753,6 @@
 skip-if:
   - project: '^mediawiki/.*$'
 branch: (?!REL1_2[3-6]|fundraising/REL1_2[3-6]$)
-  - project: ^wikimedia/fundraising/SmashPig$
-branch: ^deployment$
 
   # Don't run tests on deployment branches where the tests have been removed.
   # Covered by test_smashpig_deployment_branch_filters
@@ -2657,7 +2659,7 @@
 
   - name: wikimedia/fundraising/SmashPig
 template:
-  - name: composer-test
+  - name: composer-test55
 
   - name: wikimedia/iegreview
 template:

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id07fb9de9d89b30a8dd6ccda8f745b7acd1188d8
Gerrit-PatchSet: 1
Gerrit-Project: integration/config
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Base class for Ingenico payments using SDK and CurlWrapper

2017-01-31 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335269 )

Change subject: Base class for Ingenico payments using SDK and CurlWrapper
..

Base class for Ingenico payments using SDK and CurlWrapper

This version aims to use CurlWrapper to satisfy the SDK's connection
interface and let us make our own provisions for the low-level cURL
settings.

Change-Id: I4e9f7f268d38fc617afce2bf22dc667dcd1ead76
---
A PaymentProviders/Ingenico/CurlWrapperConnection.php
A PaymentProviders/Ingenico/CurlWrapperResponse.php
A PaymentProviders/Ingenico/IngenicoPaymentProvider.php
M SmashPig.yaml
M composer.json
M composer.lock
6 files changed, 217 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/69/335269/1

diff --git a/PaymentProviders/Ingenico/CurlWrapperConnection.php 
b/PaymentProviders/Ingenico/CurlWrapperConnection.php
new file mode 100644
index 000..4dcb812
--- /dev/null
+++ b/PaymentProviders/Ingenico/CurlWrapperConnection.php
@@ -0,0 +1,75 @@
+ $value ) {
+   $request->setHeader( $name, $value );
+   }
+   $request->setBody( $body );
+   $result = $request->execute();
+
+   }
+}
diff --git a/PaymentProviders/Ingenico/CurlWrapperResponse.php 
b/PaymentProviders/Ingenico/CurlWrapperResponse.php
new file mode 100644
index 000..4b142ef
--- /dev/null
+++ b/PaymentProviders/Ingenico/CurlWrapperResponse.php
@@ -0,0 +1,46 @@
+response = $response;
+   }
+
+   /**
+* @return string
+*/
+   public function getHttpStatusCode() {
+   return $this->response['status'];
+   }
+
+   /**
+* @return array
+*/
+   public function getHeaders() {
+   return $this->response['headers'];
+   }
+
+   /**
+* @param string $name
+* @return mixed
+*/
+   public function getHeaderValue( $name ) {
+   return $this->response['headers'][$name]; // TODO err handling
+   }
+
+   /**
+* @return string
+*/
+   public function getBody() {
+   return $this->response['body'];
+   }
+}
diff --git a/PaymentProviders/Ingenico/IngenicoPaymentProvider.php 
b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
new file mode 100644
index 000..c089c2b
--- /dev/null
+++ b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
@@ -0,0 +1,33 @@
+config = Context::get()->getConfiguration();
+   $connection = $this->config->object( 'connection' );
+   $communicatorConfiguration = $this->config->object( 
'communicator-config' );
+   $communicator = new Communicator( $connection, 
$communicatorConfiguration );
+   $this->client = new Client( $communicator );
+   }
+}
diff --git a/SmashPig.yaml b/SmashPig.yaml
index c61abbe..0f2995d 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -418,3 +418,16 @@
 endpoints:
 listener:
 class: 
SmashPig\PaymentProviders\GlobalCollect\GlobalCollectListener
+
+ingenico:
+# 
https://developer.globalcollect.com/documentation/sdk/server/php/#initialization
+communicator-configuration:
+class: Ingenico\Connect\Sdk\CommunicatorConfiguration
+constructor-parameters:
+- 'apiKey'
+- 'apiSecret'
+- 'baseUri'
+- 'integrator'
+connection:
+class: SmashPig\PaymentProviders\Ingenico\CurlWrapperConnection
+constructor-parameters: []
diff --git a/composer.json b/composer.json
index ead77ea..cfaaa6b 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,8 @@
 "symfony/event-dispatcher": "^2.1",
 "symfony/http-foundation": "^2.1",
 "symfony/yaml": "^2.8",
-"amzn/login-and-pay-with-amazon-sdk-php": "dev-master"
+"amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
+"Ingenico-ePayments/connect-sdk-php": "^5.1"
 },
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9",
diff --git a/composer.lock b/composer.lock
index c438192..93bb3cb 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "b9fb8f640ad664864e5c9ea93dbc8b1a",
-"content-hash": "6f0c1657143a0d54fdac09cb749ba44b",
+"hash": "c3f38e54779883f73a3c2a6b850ce50a",
+"content-hash": "f450e8dd0ec298cc0aeb00b7add291fd",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -152,6 +152,52 @@
 "time": "2017-01-04 21:01:15"
 },
 {
+"name": "ingenico-epayments/connect-sdk-php",
+"version": "5.1.0",
+"source": {
+"type": "git",
+

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix dead 'Continue' button on paypal EC form

2017-01-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335166 )

Change subject: Fix dead 'Continue' button on paypal EC form
..

Fix dead 'Continue' button on paypal EC form

We were just missing the line to load the generic form code.

Bug: T156692
Change-Id: Ibf0521a4b9209cbd988d2ca80c668df0c83b423d
---
M paypal_gateway/express_checkout/paypal_express_gateway.body.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/66/335166/1

diff --git a/paypal_gateway/express_checkout/paypal_express_gateway.body.php 
b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
index 55648f4..2d7e4ce 100644
--- a/paypal_gateway/express_checkout/paypal_express_gateway.body.php
+++ b/paypal_gateway/express_checkout/paypal_express_gateway.body.php
@@ -8,6 +8,7 @@
 */
protected function handleRequest() {
$this->getOutput()->allowClickjacking();
+   $this->getOutput()->addModules( 'ext.donationInterface.forms' );
 
$this->handleDonationRequest();
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibf0521a4b9209cbd988d2ca80c668df0c83b423d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fix paypal EC transformer list

2017-01-30 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/335162 )

Change subject: Fix paypal EC transformer list
..

Fix paypal EC transformer list

Need to validate amount, don't need to double-stage date.

Bug: T134445
Change-Id: I34c8b01dc02f59ac6d5236e034d35c08409bae54
---
M paypal_gateway/express_checkout/config/transformers.yaml
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/62/335162/1

diff --git a/paypal_gateway/express_checkout/config/transformers.yaml 
b/paypal_gateway/express_checkout/config/transformers.yaml
index e55037c..ab18d8e 100644
--- a/paypal_gateway/express_checkout/config/transformers.yaml
+++ b/paypal_gateway/express_checkout/config/transformers.yaml
@@ -1,4 +1,4 @@
+- Amount
 - IsoDate
 - DonorLocale
 - PaypalExpressReturnUrl
-- IsoDate

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I34c8b01dc02f59ac6d5236e034d35c08409bae54
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP Look up iDEAL banks without Ingenico SDK

2017-01-27 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334733 )

Change subject: WIP Look up iDEAL banks without Ingenico SDK
..

WIP Look up iDEAL banks without Ingenico SDK

Bug: T128692
Change-Id: Ib22f3f18a184038e3c4c663083aed1c0069e5052
---
A PaymentProviders/Ingenico/BankPaymentProvider.php
1 file changed, 39 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/33/334733/1

diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
new file mode 100644
index 000..c42f13f
--- /dev/null
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -0,0 +1,39 @@
+ $country,
+   'currencyCode' => $currency
+   );
+   $path = "products/$productId/directory";
+   $response = $this->makeApiCall( $path, 'GET', $query );
+
+   // TODO: base class should probably decode
+   $decoded = json_decode( $response['body'], true );
+
+   $banks = array();
+
+   foreach( $decoded->entries as $entry ) {
+   $banks[$entry->issuerId] = $entry->issuerName;
+   }
+   return $banks;
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib22f3f18a184038e3c4c663083aed1c0069e5052
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP add PaymentParameters and BasePaymentProvider (noSDK bra...

2017-01-27 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334709 )

Change subject: WIP add PaymentParameters and BasePaymentProvider (noSDK branch)
..

WIP add PaymentParameters and BasePaymentProvider (noSDK branch)

PaymentParameters is a much dumber version of DonationData. The
idea would be to make doPayment a lot more stateless than it is
now by passing in all of the info gleaned from the UI layer.

Change-Id: I707c9601398358cdfa4923000bc63dfa946abe4a
---
A PaymentProviders/PaymentParameters.php
A PaymentProviders/PaymentProvider.php
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/09/334709/1

diff --git a/PaymentProviders/PaymentParameters.php 
b/PaymentProviders/PaymentParameters.php
new file mode 100644
index 000..ed1a086
--- /dev/null
+++ b/PaymentProviders/PaymentParameters.php
@@ -0,0 +1,24 @@
+https://gerrit.wikimedia.org/r/334709
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I707c9601398358cdfa4923000bc63dfa946abe4a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP PayPal verification uses OutboundRequest

2017-01-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334475 )

Change subject: WIP PayPal verification uses OutboundRequest
..

WIP PayPal verification uses OutboundRequest

Change-Id: I6cc8c5ba38c8802805984516eee71f842d70714a
TODO: figure our exactly how we want to mock the thing.
---
M PaymentProviders/PayPal/PayPalPaymentsAPI.php
1 file changed, 14 insertions(+), 31 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/75/334475/1

diff --git a/PaymentProviders/PayPal/PayPalPaymentsAPI.php 
b/PaymentProviders/PayPal/PayPalPaymentsAPI.php
index f46939c..cea1b9a 100644
--- a/PaymentProviders/PayPal/PayPalPaymentsAPI.php
+++ b/PaymentProviders/PayPal/PayPalPaymentsAPI.php
@@ -1,17 +1,12 @@
 https://www.paypal-knowledge.com/infocenter/index?page=content&id=FAQ1336&actp=LIST
// PayPal randomly fails to validate messages, so try a few 
times.
$max_attempts = 7;
+   $post_fields['cmd'] = '_notify-validate';
 
for ( $i = 0; $i < $max_attempts; $i++ ) {
$url = Configuration::getDefaultConfig()->val( 
'postback-url' );
-   $ch = curl_init();
-   curl_setopt( $ch, CURLOPT_URL, $url );
-   curl_setopt( $ch, CURLOPT_HEADER, 0 );
-   curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );
-   curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
-   curl_setopt( $ch, CURLOPT_POST, 1 );
-   // TODO we can put VERIFIED in config and generalize 
this
+   $request = new OutboundRequest( $url, 'POST' );
 
-   // Always capture the cURL output
-   $curlDebugLog = fopen( 'php://temp', 'r+' );
-   curl_setopt( $ch, CURLOPT_VERBOSE, true );
-   curl_setopt( $ch, CURLOPT_STDERR, $curlDebugLog );
+   try {
+   $response = $request->execute( $post_fields );
 
-   $response = $this->curl( $ch, $post_fields );
-
-   // Read the logging output
-   rewind( $curlDebugLog );
-   $logged = fread( $curlDebugLog, 8192 );
-   fclose( $curlDebugLog );
-   Logger::debug( "cURL verbose logging: $logged" );
-
-   if ( $response === 'VERIFIED' ) {
-   return true;
-   } elseif ( $response === 'INVALID' ) {
-   return false;
+   if ( $response['body'] === 'VERIFIED' ) {
+   return true;
+   } elseif ( $response['body'] === 'INVALID' ) {
+   return false;
+   }
+   // Must be an HTML page, keep trying.
+   } catch( HttpRuntimeException $ex ) {
+   Logger::debug( "Validation POST trouble on 
attempt $i" );
}
-   // Must be an HTML page, keep trying.
}
 
throw new RuntimeException( 'Failed to validate message after ' 
.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6cc8c5ba38c8802805984516eee71f842d70714a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Add cURL wrapper

2017-01-26 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334453 )

Change subject: Add cURL wrapper
..

Add cURL wrapper

Moves the curl_transaction logic down into SmashPig, in preparation
for making API calls without using processor SDKs

Change-Id: I6710c327c39866367b169922df4a25df3e4127c4
---
A Core/Http/OutboundRequest.php
1 file changed, 177 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/53/334453/1

diff --git a/Core/Http/OutboundRequest.php b/Core/Http/OutboundRequest.php
new file mode 100644
index 000..f76f32c
--- /dev/null
+++ b/Core/Http/OutboundRequest.php
@@ -0,0 +1,177 @@
+config = Context::get()->getConfiguration();
+   $this->url = $url;
+   $this->method = $method;
+   }
+
+   public function setHeader( $name, $value ) {
+   $this->headers[$name] = $value;
+   }
+
+   public function getHeaders() {
+   return $this->headers;
+   }
+
+   public function execute( $data = null ) {
+   $loopCount = $this->config->val( 'api_repeat' );
+
+   Logger::info( "Initiating cURL" );
+   $ch = curl_init();
+   // Always capture the cURL output
+   $curlDebugLog = fopen( 'php://temp', 'r+' );
+
+   $curlOptions = $this->getCurlOptions( $data );
+   curl_setopt_array( $ch, $curlOptions );
+   // TODO: log timing
+
+   $tries = 0;
+   do {
+   Logger::info(
+   "Preparing to send {$this->method} request to 
{$this->url}"
+   );
+
+   // Execute the cURL operation
+   $response = curl_exec( $ch );
+
+   // Always read the verbose output
+   rewind( $curlDebugLog );
+   $logged = fread( $curlDebugLog, 4096 );
+
+   if ( $response !== false ) {
+   // The cURL operation was at least successful, 
what happened in it?
+   Logger::debug( "cURL verbose logging: $logged" 
);
+
+   $headers = curl_getinfo( $ch );
+   $httpCode = $headers['http_code'];
+
+   switch ( $httpCode ) {
+   case 200:   // Everything is AWESOME
+   $continue = false;
+
+   Logger::debug( "Successful 
transaction to $this->url" );
+   break;
+
+   case 400:   // Oh noes! Bad request.. 
BAD CODE, BAD BAD CODE!
+   $continue = false;
+   Logger::error( "{$this->url} 
returned (400) BAD REQUEST: $response" );
+   break;
+
+   case 403:   // Hmm, forbidden? Maybe if 
we ask it nicely again...
+   $continue = true;
+   Logger::alert( "{$this->url} 
returned (403) FORBIDDEN: $response" );
+   break;
+
+   default:// No clue what happened... 
break out and log it
+   $continue = false;
+   Logger::error( "{$this->url} 
failed remotely and returned ($httpCode): $response" );
+   break;
+   }
+   } else {
+   // Well the cURL transaction failed for some 
reason or another. Try again!
+   $continue = true;
+
+   $errno = curl_errno( $ch );
+   $err = curl_error( $ch );
+
+   Logger::alert(
+   "cURL transaction to {$this->url} 
failed: ($errno) $err.  " .
+   "cURL verbose logging: $logged"
+   );
+   }
+   $tries++;
+   if ( $tries >= $loopCount ) {
+   $continue = false;
+   }
+   if ( $continue ) {
+   // If we're going to try again, reset the debug 
log.
+   // TODO: log timing for this particular curl 
attempt
+   rewind( $curlDebugLog );
+   }
+   } while ( $continue ); // End while cUR

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334219 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

a5a7c70 Update libraries (no more Stomp!)

Also update vendor and stop nulling out packages-dev in composer.lock

Change-Id: Ifb1fc23bf4c8d717e4b992a076c39890ff84e7d4
---
M composer.lock
M vendor
2 files changed, 1 insertion(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/19/334219/1

diff --git a/composer.lock b/composer.lock
index 31128a6..0f07766 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1204,9 +1204,6 @@
 "time": "2015-11-05 07:14:57"
 }
 ],
-<<< HEAD   (cd058a Merge branch 'master' into deployment)
-"packages-dev": null,
-===
 "packages-dev": [
 {
 "name": "doctrine/instantiator",
@@ -2265,7 +2262,6 @@
 "time": "2016-11-23 20:04:58"
 }
 ],
->>> BRANCH (a5a7c7 Update libraries (no more Stomp!))
 "aliases": [],
 "minimum-stability": "stable",
 "stability-flags": {
diff --git a/vendor b/vendor
index 4260d17..e3c1e1c 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 4260d175c1691436047aa1e1d8fb19c50b823f03
+Subproject commit e3c1e1c5474b032280763d753c31479e942124bf

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifb1fc23bf4c8d717e4b992a076c39890ff84e7d4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Remove Stomp, update other libraries

2017-01-25 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/333829 )

Change subject: Remove Stomp, update other libraries
..


Remove Stomp, update other libraries

(also snip the traits out of Psr\log to placate php53lint)

Change-Id: I22cca38819c8f608e113ca378a9e56d99638c0e7
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
A coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
A coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/LICENSE
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
M minfraud/http/Changes
M minfraud/http/README.md
M minfraud/http/composer.json
M minfraud/http/examples/minfraud.php
M minfraud/http/src/HTTPBase.php
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
M psr/log/Psr/Log/LoggerInterface.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/Event.php
M symfony/event-dispatcher/EventDispatcher.php
M symfony/event-dispatcher/GenericEvent.php
M symfony/event-dispatcher/LICENSE
M symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php
M symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php
M 
symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php
M symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php
M symfony/http-foundation/AcceptHeader.php
M symfony/http-foundation/AcceptHeaderItem.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/Cookie.php
M symfony/http-foundation/File/File.php
M symfony/http-foundation/File/MimeType/ExtensionGuesser.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/File/MimeType/MimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/LICENSE
M symfony/http-foundation/RedirectResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php
M symfony/http-foundation/StreamedResponse.php
M symfony/http-foundation/Tests/CookieTest.php
M symfony/http-foundation/Tests/File/FileTest.php
M symfony/http-foundation/Tests/JsonResponseTest.php
M symfony/http-foundation/Tests/RequestTest.php
M symfony/http-foundation/Tests/ResponseHeaderBagTest.php
M symfony/http-foundation/Tests/ResponseTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
M symfony/polyfill-mbstring/Mbstring.php
M symfony/polyfill-mbstring/bootstrap.php
M symfo

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Merge branch 'master' into deployment

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334212 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

349b521 Always reconnect before sending queue messages
041a47f Round off all the geo_codes to 4 digits
4132268 Early return when there are no contacts to dedupe
fca1b88 Revert "Round off all the geo_codes to 4 digits"
1d1c10b Better fix for lat/long woes

Change-Id: I16c90fc58e3b4b542889a38a7fa0109b80e25b97
---
D sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
1 file changed, 0 insertions(+), 587 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/12/334212/1

diff --git a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php 
b/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
deleted file mode 100644
index 7566635..000
--- a/sites/all/modules/wmf_civicrm/tests/phpunit/ImportMessageTest.php
+++ /dev/null
@@ -1,587 +0,0 @@
-<<< HEAD   (af8d73 Merge branch 'master' of 
https://gerrit.wikimedia.org/r/wiki)
-===
- WMF_CAMPAIGNS_OPTION_GROUP_NAME,
-'label' => ImportMessageTest_campaign,
-'value' => ImportMessageTest_campaign,
-) );
-}
-
-public function tearDown() {
-if ( $this->contribution_id ) {
-civicrm_api_classapi()->Contribution->Delete( array(
-'id' => $this->contribution_id,
-'version' => '3',
-) );
-}
-parent::tearDown();
-}
-
-/**
- * @dataProvider messageProvider
- */
-public function testMessageInsert( $msg, $expected ) {
-$contribution = wmf_civicrm_contribution_message_import( $msg );
-$this->contribution_id = $contribution['id'];
-
-// Ignore contact_id if we have no expectation.
-if ( empty( $expected['contribution']['contact_id'] ) ) {
-$this->fieldsToIgnore[] = 'contact_id';
-}
-
-$this->assertComparable( $expected['contribution'], $contribution );
-
-if ( !empty( $expected['contribution_custom_values'] ) ) {
-$actual_contribution_custom_values = wmf_civicrm_get_custom_values(
-$contribution['id'],
-array_keys( $expected['contribution_custom_values'] )
-);
-$this->assertEquals( $expected['contribution_custom_values'], 
$actual_contribution_custom_values );
-}
-
-if ( !empty( $expected['contact'] ) ) {
-$api = civicrm_api_classapi();
-$api->Contact->Get( array(
-'id' => $contribution['contact_id'],
-'version' => 3,
-) );
-$contact = (array) $api->values[0];
-$renamedFields = array('prefix' => 1, 'suffix' => 1);
-$this->assertEquals( array_diff_key($expected['contact'], 
$renamedFields), array_intersect_key( $expected['contact'], $contact ) );
-foreach (array_keys($renamedFields) as $renamedField) {
-$this->assertEquals(civicrm_api3('OptionValue', 'getvalue', 
array(
-'value' => $contact[$renamedField . '_id'],
-'option_group_id' => 'individual_' . $renamedField,
-'return' => 'name',
-)), $expected['contact'][$renamedField]);
-}
-}
-
-   if ( !empty( $expected['address'] ) ) {
-   $addresses = civicrm_api3( 'Address', 'get', array(
-   'contact_id' => $contribution['contact_id'],
-   'return' => 
'city,postal_code,street_address,geo_code_1,geo_code_2,timezone',
-   ) );
-   $address = $addresses['values'][$addresses['id']];
-   $this->assertComparable( $expected['address'], $address 
);
-   }
-
-if ( !empty( $expected['contact_custom_values'] ) ) {
-$actual_contact_custom_values = wmf_civicrm_get_custom_values(
-$contribution['contact_id'],
-array_keys( $expected['contact_custom_values'] )
-);
-$this->assertEquals( $expected['contact_custom_values'], 
$actual_contact_custom_values );
-}
-}
-
-public function messageProvider() {
-// Make static so it isn't destroyed until class cleanup.
-self::$fixtures = CiviFixtures::create();
-
-$contribution_type_cash = wmf_civicrm_get_civi_id( 
'contribution_type_id', 'Cash' );
-$payment_instrument_cc = wmf_civicrm_get_civi_id( 
'payment_instrument_id', 'Credit Card' );
-$payment_instrument_check = wmf_civicrm_get_civi_id( 
'payment_instrument_id', 'Check' );
-
-$gateway_txn_id = mt_rand();
-$check_number = (string) mt_rand();
-
-$new_prefix = 'M' . mt_rand();
-
-return array(

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Better fix for lat/long woes

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334204 )

Change subject: Better fix for lat/long woes
..

Better fix for lat/long woes

Rebuild the zip code lookup table with decimal columns, re-run update.

Bug: T155677
Change-Id: I2b6f70d63e46e2fedbae8601c3eb2e044ac03033
---
M sites/all/modules/wmf_civicrm/update_7310.php
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
2 files changed, 25 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/04/334204/1

diff --git a/sites/all/modules/wmf_civicrm/update_7310.php 
b/sites/all/modules/wmf_civicrm/update_7310.php
index 2df4676..5398257 100644
--- a/sites/all/modules/wmf_civicrm/update_7310.php
+++ b/sites/all/modules/wmf_civicrm/update_7310.php
@@ -3,13 +3,14 @@
 function _wmf_civicrm_update_7310_add_zip_geo() {
   $queries = array();
 
+  $queries[] = 'DROP TABLE IF EXISTS `wmf_zip_geo`';
   $queries[] = '
 CREATE TABLE `wmf_zip_geo` (
`zip` char(5) primary key,
`city` varchar(64),
`state` char(2),
-   `latitude` float,
-   `longitude` float,
+   `latitude` decimal(13,9),
+   `longitude` decimal(13,9),
`timezone` varchar(8),
`dst` tinyint
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci';
diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index f15b5ea..21b164c 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2396,13 +2396,18 @@
   c.timezone = g.timezone
   ");
 
-  CRM_Core_DAO::executeQuery("
-UPDATE civicrm_address a
-INNER JOIN civicrm_address_geocode c ON c.id = a.id
-SET a.geo_code_1 = c.latitude,
-  a.geo_code_2 = c.longitude,
-  a.timezone = c.timezone
-  ");
+  $batch = 10;
+  for($startId = 0; $startId < 210 * $batch; $startId += $batch) {
+$endId = $startId + $batch;
+CRM_Core_DAO::executeQuery("
+  UPDATE civicrm_address a
+  INNER JOIN civicrm_address_geocode c ON c.id = a.id
+  SET a.geo_code_1 = c.latitude,
+a.geo_code_2 = c.longitude,
+a.timezone = c.timezone
+  WHERE a.id BETWEEN $startId AND $endId
+");
+  }
 }
 
 /**
@@ -2467,3 +2472,13 @@
 AND entity_table = 'civicrm_contact'
   ");
 }
+
+/**
+ * Re-run fixed geocoding updates
+ *
+ * Bug: T155677
+ */
+function wmf_civicrm_update_7450() {
+  wmf_civicrm_update_7310();
+  wmf_civicrm_update_7320();
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2b6f70d63e46e2fedbae8601c3eb2e044ac03033
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Revert "Round off all the geo_codes to 4 digits"

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334200 )

Change subject: Revert "Round off all the geo_codes to 4 digits"
..

Revert "Round off all the geo_codes to 4 digits"

This is not the fix we're looking for - the problem is with the
float columns. Need to drop and re-create that table.

This reverts commit 041a47feaf4c535131842ff35c07c50458268fc7.

Change-Id: I9d1572f6ab64628d0b8f1d8e1f85dcbecc209b9f
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 0 insertions(+), 18 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/00/334200/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 441421f..f15b5ea 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2467,21 +2467,3 @@
 AND entity_table = 'civicrm_contact'
   ");
 }
-
-/**
- * Round latitude and longitude to 4 digits, to match the values currently
- * being assigned and avoid dedupe conflicts
- */
-function wmf_civicrm_update_7450() {
-  // Update 1,000,000 at a time to avoid locking things up for too long
-  civicrm_initialize();
-  $million = 100;
-  for($startId = 0; $startId <= 21 * $million; $startId += $million) {
-$endId = $startId + $million;
-CRM_Core_DAO::executeQuery("
-  UPDATE civicrm_address
-  SET geo_code_1 = ROUND(geo_code_1, 4), geo_code_2 = ROUND(geo_code_2, 4)
-  WHERE id BETWEEN $startId AND $endId
-");
-  }
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9d1572f6ab64628d0b8f1d8e1f85dcbecc209b9f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Geocode updates: 6 sig figs, smaller batches

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334187 )

Change subject: Geocode updates: 6 sig figs, smaller batches
..

Geocode updates: 6 sig figs, smaller batches

Avoid replag, account for source data only having 3 decimal points
for latitudes west of 100 degrees W

Bug: T155677
Change-Id: I607f2bb2b14cc895357d1c7f8295ddc8edb5
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 15 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/87/334187/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index 441421f..0bafb31 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2469,19 +2469,27 @@
 }
 
 /**
- * Round latitude and longitude to 4 digits, to match the values currently
- * being assigned and avoid dedupe conflicts
+ * Round latitude and longitude to 6 significant figures, to match the values
+ * currently being assigned and avoid dedupe conflicts
  */
 function wmf_civicrm_update_7450() {
-  // Update 1,000,000 at a time to avoid locking things up for too long
+  // Update 100,000 at a time to avoid locking things up for too long
   civicrm_initialize();
-  $million = 100;
-  for($startId = 0; $startId <= 21 * $million; $startId += $million) {
-$endId = $startId + $million;
+  $batch = 10;
+  for($startId = 0; $startId <= 210 * $batch; $startId += $batch) {
+$endId = $startId + $batch;
+// Existing geocoding comes from US zip code data, so all above
+// 10 N latitude and west of 10 W longitude
 CRM_Core_DAO::executeQuery("
   UPDATE civicrm_address
-  SET geo_code_1 = ROUND(geo_code_1, 4), geo_code_2 = ROUND(geo_code_2, 4)
+  SET geo_code_1 = ROUND(geo_code_1, 4),
+geo_code_2 =
+ CASE WHEN geo_code_2 BETWEEN -99.9 AND 99.9
+ THEN ROUND(geo_code_2, 4)
+ ELSE ROUND(geo_code_2, 3)
+ END
   WHERE id BETWEEN $startId AND $endId
+  AND geo_code_1 IS NOT NULL
 ");
   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I607f2bb2b14cc895357d1c7f8295ddc8edb5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Round off all the geo_codes to 4 digits

2017-01-25 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/334158 )

Change subject: Round off all the geo_codes to 4 digits
..

Round off all the geo_codes to 4 digits

New geo tags are going in with 4 digits of precision, while the
original tagging had something like 6. This is causing conflicts in
dedupe. Round them all off to 4 digits, which is still accurate to
within 100 meters. Since we got the geo codes from a zip code db in
the first place, the extra precision was illusory. We don't need
creepy precision to plan donor events.

Bug: T155677
Change-Id: I5b2211919adc0c010c7867766f97a6a3075f2390
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.install
1 file changed, 18 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/58/334158/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.install 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
index f15b5ea..441421f 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.install
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.install
@@ -2467,3 +2467,21 @@
 AND entity_table = 'civicrm_contact'
   ");
 }
+
+/**
+ * Round latitude and longitude to 4 digits, to match the values currently
+ * being assigned and avoid dedupe conflicts
+ */
+function wmf_civicrm_update_7450() {
+  // Update 1,000,000 at a time to avoid locking things up for too long
+  civicrm_initialize();
+  $million = 100;
+  for($startId = 0; $startId <= 21 * $million; $startId += $million) {
+$endId = $startId + $million;
+CRM_Core_DAO::executeQuery("
+  UPDATE civicrm_address
+  SET geo_code_1 = ROUND(geo_code_1, 4), geo_code_2 = ROUND(geo_code_2, 4)
+  WHERE id BETWEEN $startId AND $endId
+");
+  }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b2211919adc0c010c7867766f97a6a3075f2390
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Remove Stomp, update other libraries

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333829 )

Change subject: Remove Stomp, update other libraries
..

Remove Stomp, update other libraries

Change-Id: I22cca38819c8f608e113ca378a9e56d99638c0e7
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
A coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
A coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/LICENSE
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
M minfraud/http/Changes
M minfraud/http/README.md
M minfraud/http/composer.json
M minfraud/http/examples/minfraud.php
M minfraud/http/src/HTTPBase.php
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
A psr/log/Psr/Log/LoggerAwareTrait.php
M psr/log/Psr/Log/LoggerInterface.php
A psr/log/Psr/Log/LoggerTrait.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/Event.php
M symfony/event-dispatcher/EventDispatcher.php
M symfony/event-dispatcher/GenericEvent.php
M symfony/event-dispatcher/LICENSE
M symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php
M symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php
M 
symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php
M symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php
M symfony/http-foundation/AcceptHeader.php
M symfony/http-foundation/AcceptHeaderItem.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/Cookie.php
M symfony/http-foundation/File/File.php
M symfony/http-foundation/File/MimeType/ExtensionGuesser.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/File/MimeType/MimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/LICENSE
M symfony/http-foundation/RedirectResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php
M symfony/http-foundation/StreamedResponse.php
M symfony/http-foundation/Tests/CookieTest.php
M symfony/http-foundation/Tests/File/FileTest.php
M symfony/http-foundation/Tests/JsonResponseTest.php
M symfony/http-foundation/Tests/RequestTest.php
M symfony/http-foundation/Tests/ResponseHeaderBagTest.php
M symfony/http-foundation/Tests/ResponseTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/PdoSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/WriteCheckSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Proxy/SessionHandlerProxyTest.php
M symfony/polyfill-mbstring/Mbstring.php
M symfony/polyfill-mbstring/bootstrap.php
M 

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Update libraries (no more Stomp!)

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333827 )

Change subject: Update libraries (no more Stomp!)
..

Update libraries (no more Stomp!)

Change-Id: Ie4469b95afa8ba721783737ffaff856131593004
---
M composer.lock
1 file changed, 111 insertions(+), 154 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/27/333827/1

diff --git a/composer.lock b/composer.lock
index f2f8e19..0f07766 100644
--- a/composer.lock
+++ b/composer.lock
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
+"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-08-05 19:16:32"
+"time": "2017-01-04 21:01:15"
 },
 {
 "name": "cogpowered/finediff",
@@ -203,56 +203,6 @@
 "time": "2014-05-19 10:25:02"
 },
 {
-"name": "fusesource/stomp-php",
-"version": "2.1.1",
-"source": {
-"type": "git",
-"url": "https://github.com/dejanb/stomp-php.git";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dejanb/stomp-php/zipball/4ac51c0abee05078e198faf13f48c056a72f8f8c";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.0"
-},
-"type": "library",
-"autoload": {
-"psr-0": {
-"FuseSource": "src/"
-}
-},
-"notification-url": "https://packagist.org/downloads/";,
-"license": [
-"Apache-2.0"
-],
-"authors": [
-{
-"name": "Dejan Bosnanac",
-"email": "de...@nighttale.net",
-"homepage": "http://www.nighttale.net";
-},
-{
-"name": "Sören Rohweder",
-"email": "s.rohwe...@blage.net",
-"homepage": "http://www.monofone.de";
-}
-],
-"description": "stomp support for PHP",
-"homepage": "http://github.com/dejanb/stomp-php";,
-"keywords": [
-"activeMQ",
-"jms",
-"messaging",
-"stomp"
-],
-"abandoned": "stomp-php/stomp-php",
-"time": "2013-02-23 17:34:44"
-},
-{
 "name": "ircmaxell/password-compat",
 "version": "v1.0.4",
 "source": {
@@ -296,23 +246,22 @@
 },
 {
 "name": "minfraud/http",
-"version": "v1.70",
+"version": "v1.71",
 "source": {
 "type": "git",
 "url": "https://github.com/maxmind/ccfd-api-php.git";,
-"reference": "941e9345f9c237a253be8b908ecef951698a1a99"
+"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/941e9345f9c237a253be8b908ecef951698a1a99";,
-"reference": "941e9345f9c237a253be8b908ecef951698a1a99",
+"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/5f6c2a5454e755f1c56be17a1fc0c97576ff010e";,
+"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e",
 "shasum": ""
 },
 "type": "library",
 "autoload": {
-"files": [
-"src/HTTPBase.php",
-"src/CreditCardFraudDetection.php"
+"classmap": [
+"src"
 ]
 },
 "notification-url": "https://packagist.org/downloads/";,
@@ -333,7 +282,7 @@
 "maxmind",
 "minfraud"
 ],
-"time": "2015-07-21 14:49:48"
+"time": "2016-10-13 14:35:01"
 },
 {
 "name": "monolog/monolog",
@@ -659,22 +608,30 @@
 },
 {
 "name": "psr/log",
-"version": "1.0.0",
+"version": "1.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/ph

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333823 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

e93f367 Parse Express Checkout charge

Change-Id: Icb3bb3f4486b509ace163a6b933abbb5bec3f893
---
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
1 file changed, 0 insertions(+), 197 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/23/333823/1

diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index 42eeb73..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,197 +0,0 @@
-<<< HEAD   (03880c Fix insecure uncaught exception logging)
-===
- 'verified',
-   'express_checkout.json' => 'verified',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   );
-
-   static $messages = array();
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = PayPalTestConfiguration::get();
-
-   // php-queue\PDO complains about pop() from non-existent table
-   $this->config->object( 'data-store/jobs-paypal' )
-   ->createTable( 'jobs-paypal' );
-
-   Context::initWithLogger( $this->config );
-   foreach ( self::$message_data as $file => $type ) {
-   self::$messages[] = array(
-   'type' => $type,
-   'payload' => json_decode(
-   file_get_contents( __DIR__ . 
'/../Data/' . $file ),
-   true
-   )
-   );
-   }
-   }
-
-   public function tearDown() {
-   self::$fail_verification = false;
-   self::$paypal_is_broken = false;
-   parent::tearDown();
-   }
-
-   private function capture( $msg ) {
-   $request = new Request( $msg );
-   $response = new Response;
-   $listener = new Listener;
-   return $listener->execute( $request, $response );
-   }
-
-   public function testCapture() {
-   foreach ( self::$messages as $msg ) {
-
-   $this->capture( $msg['payload'] );
-
-   $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-   $jobMessage = $jobQueue->pop();
-
-   $this->assertEquals( $jobMessage['php-message-class'],
-   'SmashPig\PaymentProviders\PayPal\Job' );
-
-   $this->assertEquals( $jobMessage['payload'], 
$msg['payload'] );
-   }
-   }
-
-   public function testBlankMessage() {
-   $this->capture( array() );
-   $jobQueue = $this->config->object( 'data-store/jobs-paypal' );
-   $this->assertNull( $jobQueue->pop() );
-   }
-
-   public function testConsume() {
-   foreach ( self::$messages as $msg ) {
-   $this->capture( $msg['payload'] );
-
-   $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-   $jobMessage = $jobQueue->pop();
-
-   $job = KeyedOpaqueStorableObject::fromJsonProxy(
-   $jobMessage['php-message-class'],
-   json_encode( $jobMessage )
-   );
-
-   $job->execute();
-
-   $queue = $this->config->object( 'data-store/' . 
$msg['type'] );
-   $queue->createTable( $msg['type'] );
-   $message = $queue->pop();
-
-   if ( $job->is_reject() ) {
-   $this->assertEmpty( $message );
-   } else {
-   $this->assertNotEmpty( $message );
-   if ( isset( 
$message['contribution_tracking_id'] ) ) {
-   $this->assertEquals( 
$message['contribution_tracking_id'], $message['order_id'] );
-   }
-
-   if ( isset( $message['supplemental_address_1'] 
) ) {
-   $this->assertNotEquals(
-   
$message['supplemental_address_1'],
- 

[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333820 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: I9aaf8d4fc1bd015150d74abb3c1896e064573e76
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/20/333820/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index e7abdbe..1363912 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit e7abdbefcdca14158e3b4e79beeb5b7e00ab109b
+Subproject commit 1363912fccffaaba387a654fd1640cfbcb7435e4

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9aaf8d4fc1bd015150d74abb3c1896e064573e76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333819 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

And update vendor

ee26441 Localisation updates from https://translatewiki.net.
1e1f15e Check contribution_id before rectifying orphans
974b3ab ProcessResponse no longer needs to be public
0dee6d3 Remove unused form functions
01f1158 Delete unused CyclicalArray
6b42f45 Remove unused base adapter code
184e6a7 Fold getRetryData into mustache error form
e43388c Localisation updates from https://translatewiki.net.
e1cd297 Update default queue backend
4e63748 Remove Stomp requirement, update Composer libraries

Change-Id: Id1af1a2695075dba47e719f9910eeffdf0338350
---
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
M vendor
2 files changed, 1 insertion(+), 209 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/19/333819/1

diff --git 
a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php 
b/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
deleted file mode 100644
index f1ef314..000
--- a/tests/phpunit/Adapter/GlobalCollect/GlobalCollectOrphanAdapterTest.php
+++ /dev/null
@@ -1,208 +0,0 @@
-<<< HEAD   (e7abdb Merge branch 'master' into deployment)
-===
-setMwGlobals( array(
-   'wgGlobalCollectGatewayEnabled' => true,
-   'wgDonationInterfaceAllowedHtmlForms' => array(
-   'cc-vmad' => array(
-   'gateway' => 'globalcollect',
-   'payment_methods' => array('cc' => 
array( 'visa', 'mc', 'amex', 'discover' )),
-   'countries' => array(
-   '+' => array( 'US', ),
-   ),
-   ),
-   ),
-   ) );
-   }
-
-   /**
-* @param $name string The name of the test case
-* @param $data array Any parameters read from a dataProvider
-* @param $dataName string|int The name or index of the data set
-*/
-   function __construct( $name = null, array $data = array(), $dataName = 
'' ) {
-   parent::__construct( $name, $data, $dataName );
-   $this->testAdapterClass = 'TestingGlobalCollectOrphanAdapter';
-   $this->dummy_utm_data = array (
-   'utm_source' => 'dummy_source',
-   'utm_campaign' => 'dummy_campaign',
-   'utm_medium' => 'dummy_medium',
-   'date' => time(),
-   );
-   }
-
-   public function testConstructor() {
-
-   $options = $this->getDonorTestData();
-   $class = $this->testAdapterClass;
-
-   $gateway = $this->getFreshGatewayObject();
-
-   $this->assertInstanceOf( $class, $gateway );
-
-   $this->verifyNoLogErrors();
-   }
-
-
-   public function testBatchOrderID_generate() {
-
-   //no data on construct, generate Order IDs
-   $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => TRUE ) ) );
-   $this->assertTrue( $gateway->getOrderIDMeta( 'generate' ), 'The 
order_id meta generate setting override is not working properly. Order_id 
generation may be broken.' );
-   $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), 'Failed asserting that an absent order id is not left as null, 
when generating our own' );
-
-   $data = array_merge( $this->getDonorTestData(), 
$this->dummy_utm_data );
-   $data['order_id'] = '5';
-
-   //now, add data and check that we didn't kill the oid. Still 
generating.
-   $gateway->loadDataAndReInit( $data );
-   $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '5', 'loadDataAndReInit failed to stick OrderID' );
-
-   $data['order_id'] = '44';
-   $gateway->loadDataAndReInit( $data );
-   $this->assertEquals( $gateway->getData_Unstaged_Escaped( 
'order_id' ), '44', 'loadDataAndReInit failed to stick OrderID' );
-
-   $this->verifyNoLogErrors();
-   }
-
-   public function testBatchOrderID_no_generate() {
-
-   //no data on construct, do not generate Order IDs
-   $gateway = $this->getFreshGatewayObject( null, array ( 
'order_id_meta' => array ( 'generate' => FALSE ) ) );
-   $this->assertFalse( $gateway->getOrderIDMeta( 'generate' ), 
'The order_id meta generate setting override is not working properly. Deferred 
order_id generation may be broken.' );
-

[MediaWiki-commits] [Gerrit] mediawiki...vendor[master]: Remove Stomp, update other libs

2017-01-23 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/333818 )

Change subject: Remove Stomp, update other libs
..


Remove Stomp, update other libs

Change-Id: Ia7fa9eef072e095a33d0d46ed2cd6c19e66dac53
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
A coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
A coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
M minfraud/http/Changes
M minfraud/http/README.md
M minfraud/http/composer.json
M minfraud/http/examples/minfraud.php
M minfraud/http/src/HTTPBase.php
M phpmailer/phpmailer/VERSION
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
A phpmailer/phpmailer/examples/contactform.phps
M phpmailer/phpmailer/examples/contentsutf8.html
M phpmailer/phpmailer/examples/scripts/XRegExp.js
M phpmailer/phpmailer/examples/send_file_upload.phps
M phpmailer/phpmailer/examples/send_multiple_file_upload.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
M psr/log/Psr/Log/LoggerInterface.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/Event.php
M symfony/event-dispatcher/EventDispatcher.php
M symfony/event-dispatcher/GenericEvent.php
M symfony/event-dispatcher/LICENSE
M symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php
M symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php
M 
symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php
M symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php
M symfony/http-foundation/AcceptHeader.php
M symfony/http-foundation/AcceptHeaderItem.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/Cookie.php
M symfony/http-foundation/File/File.php
M symfony/http-foundation/File/MimeType/ExtensionGuesser.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/File/MimeType/MimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/LICENSE
M symfony/http-foundation/RedirectResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php
M symfony/http-foundation/StreamedResponse.php
M symfony/http-foundation/Tests/CookieTest.php
M symfony/http-foundation/Tests/File/FileTest.php
M symfony/http-foundation/Tests/JsonResponseTest.php
M symfony/http-foundation/Tests/RequestTest.php
M symfony/http-foundation/Tests/ResponseHeaderBagTest.php
M symfony/http-foundation/Tests/ResponseTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessio

[MediaWiki-commits] [Gerrit] mediawiki...vendor[master]: Remove Stomp, update other libs

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333818 )

Change subject: Remove Stomp, update other libs
..

Remove Stomp, update other libs

Change-Id: Ia7fa9eef072e095a33d0d46ed2cd6c19e66dac53
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
A coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
A coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
M minfraud/http/Changes
M minfraud/http/README.md
M minfraud/http/composer.json
M minfraud/http/examples/minfraud.php
M minfraud/http/src/HTTPBase.php
M phpmailer/phpmailer/VERSION
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
A phpmailer/phpmailer/examples/contactform.phps
M phpmailer/phpmailer/examples/contentsutf8.html
M phpmailer/phpmailer/examples/scripts/XRegExp.js
M phpmailer/phpmailer/examples/send_file_upload.phps
M phpmailer/phpmailer/examples/send_multiple_file_upload.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
M psr/log/Psr/Log/LoggerInterface.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/Event.php
M symfony/event-dispatcher/EventDispatcher.php
M symfony/event-dispatcher/GenericEvent.php
M symfony/event-dispatcher/LICENSE
M symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php
M symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php
M 
symfony/event-dispatcher/Tests/DependencyInjection/RegisterListenersPassTest.php
M symfony/event-dispatcher/Tests/ImmutableEventDispatcherTest.php
M symfony/http-foundation/AcceptHeader.php
M symfony/http-foundation/AcceptHeaderItem.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/Cookie.php
M symfony/http-foundation/File/File.php
M symfony/http-foundation/File/MimeType/ExtensionGuesser.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/File/MimeType/MimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/LICENSE
M symfony/http-foundation/RedirectResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php
M symfony/http-foundation/StreamedResponse.php
M symfony/http-foundation/Tests/CookieTest.php
M symfony/http-foundation/Tests/File/FileTest.php
M symfony/http-foundation/Tests/JsonResponseTest.php
M symfony/http-foundation/Tests/RequestTest.php
M symfony/http-foundation/Tests/ResponseHeaderBagTest.php
M symfony/http-foundation/Tests/ResponseTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcacheSessionHandlerTest.php
M 
symfony/http-foundation/Tests/Session/Storage/Handler/MemcachedSessionHandler

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Override configuration with specific instances

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333801 )

Change subject: Override configuration with specific instances
..

Override configuration with specific instances

Homebrew dependency injection is nearly complete. Last thing we'd
need would be a way to specify a runnable to return instances for
nodes.

This is mostly just useful for test cases, where you want to create
a mock on the fly and configure some return values. Should let us
get rid of the silly mock types in the Amazon SDK fork.

Change-Id: I6445c01429a337482d52399c5dafb2fd32c50717
---
M Core/Configuration.php
M Tests/ConfigurationTest.php
2 files changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/01/333801/1

diff --git a/Core/Configuration.php b/Core/Configuration.php
index 7c9ec83..095daec 100644
--- a/Core/Configuration.php
+++ b/Core/Configuration.php
@@ -180,6 +180,18 @@
}
 
/**
+* For testing: provide a specific instance of an object to fulfil 
requests
+* for a specific node. Helpful when using test library mocks that you 
can't
+* declaratively configure with constructor parameters.
+*
+* @param $node string
+* @param $object object
+*/
+   public function overrideObjectInstance( $node, $object ) {
+   $this->objects[$node] = $object;
+   }
+
+   /**
 * Obtain a value from the configuration. If the key does not exist 
this will throw an
 * exception.
 *
diff --git a/Tests/ConfigurationTest.php b/Tests/ConfigurationTest.php
index 1044a2e..dc857d0 100644
--- a/Tests/ConfigurationTest.php
+++ b/Tests/ConfigurationTest.php
@@ -1,6 +1,9 @@
 assertEquals( $expected, $config->val( 
'endpoints/listener' ),
'Deep merge went as hoped' );
}
+
+   public function testOverrideObjectInstance() {
+   $config = $this->setConfig();
+
+   $this->assertInstanceOf(
+   SyslogLogStream::class,
+   $config->object( 'logging/log-streams/syslog' ),
+   'Default config was not as expected.'
+   );
+
+   $overrideInstance = new ConsoleLogStream();
+   $config->overrideObjectInstance(
+   'logging/log-streams/syslog',
+   $overrideInstance
+   );
+   $this->assertEquals(
+   spl_object_hash( $overrideInstance ),
+   spl_object_hash( $config->object( 
'logging/log-streams/syslog' ) ),
+   'Sorcery fizzled out. Do you have enough mana?'
+   );
+   }
+
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6445c01429a337482d52399c5dafb2fd32c50717
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...php-queue[master]: Reconnect to Redis on idle timeout

2017-01-23 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333793 )

Change subject: Reconnect to Redis on idle timeout
..

Reconnect to Redis on idle timeout

The Redis server has a feature to close connections after a
configurable idle time. If you have a long-lived object using a
Redis queue backend, set the idle_timeout option to the same number
of seconds as the server, and the queue backend will automatically
reconnect if the timeout has elapsed since your last request.

Bug: T155150
Change-Id: Ia629b1b52a202f61e16cad12d6129fba4f174b96
---
M src/PHPQueue/Backend/Predis.php
1 file changed, 41 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/93/333793/1

diff --git a/src/PHPQueue/Backend/Predis.php b/src/PHPQueue/Backend/Predis.php
index aaeb9bd..130e2d2 100644
--- a/src/PHPQueue/Backend/Predis.php
+++ b/src/PHPQueue/Backend/Predis.php
@@ -50,6 +50,8 @@
 public $expiry;
 public $order_key;
 public $correlation_key;
+public $idle_timeout = 0;
+protected $last_request_time;
 
 public function __construct($options=array())
 {
@@ -73,6 +75,9 @@
 if (!empty($options['correlation_key'])) {
 $this->correlation_key = $options['correlation_key'];
 }
+   if (!empty($options['idle_timeout'])) {
+   $this->idle_timeout = $options['idle_timeout'];
+   }
 }
 
 public function connect()
@@ -81,6 +86,7 @@
 throw new BackendException("No servers specified");
 }
 $this->connection = new \Predis\Client($this->servers, 
$this->redis_options);
+$this->last_request_time = time();
 }
 
 /** @deprecated */
@@ -92,6 +98,12 @@
 $this->push($data);
 return true;
 }
+
+public function beforeAdd($data=null)
+   {
+   $this->checkIdleTimeout();
+   parent::beforeAdd($data);
+   }
 
 public function push($data)
 {
@@ -155,6 +167,12 @@
 }
 return null;
 }
+
+   public function beforeGet($jobId=null)
+   {
+   $this->checkIdleTimeout();
+   parent::beforeGet($jobId);
+   }
 
 /**
  * @return array|null
@@ -283,6 +301,12 @@
 
 return Json::safe_decode($data);
 }
+
+public function beforeRelease($jobId=null)
+   {
+   $this->checkIdleTimeout();
+   parent::beforeRelease($jobId);
+   }
 
 public function release($jobId=null)
 {
@@ -421,6 +445,12 @@
 return $data;
 }
 
+   public function beforeClear($jobId=null)
+   {
+   $this->checkIdleTimeout();
+   parent::beforeClear($jobId);
+   }
+
 /**
  * @deprecated
  */
@@ -491,4 +521,15 @@
 protected static function boolStatus(ResponseInterface $status) {
 return ($status == 'OK' || $status == 'QUEUED');
 }
+
+protected function checkIdleTimeout()
+   {
+   if ($this->idle_timeout === 0) {
+   return;
+   }
+   if (time() - $this->last_request_time > $this->idle_timeout) {
+   $this->connect();
+   }
+   $this->last_request_time = time();
+   }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia629b1b52a202f61e16cad12d6129fba4f174b96
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Always reconnect before sending queue messages

2017-01-20 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/08 )

Change subject: Always reconnect before sending queue messages
..

Always reconnect before sending queue messages

Avoid holding a connection open long enough to be closed by the
server for idleness.

TODO: should php-queue or predis implement an idle_timeout option
that would automatically reconnect before reads or writes after
an idle period?

Bug: T155150
Change-Id: Ie0c6d33b2585c511f7db0e5040f822b4ca42d1fd
---
M sites/all/modules/globalcollect_audit/globalcollect_audit.module
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/08/08/1

diff --git a/sites/all/modules/globalcollect_audit/globalcollect_audit.module 
b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
index e14d443..34eab3a 100644
--- a/sites/all/modules/globalcollect_audit/globalcollect_audit.module
+++ b/sites/all/modules/globalcollect_audit/globalcollect_audit.module
@@ -2004,7 +2004,7 @@
 
wmf_common_set_message_source( $body, 'audit', 'GlobalCollect WR1 
Auditor' );
 
-   $newQueue = Configuration::getDefaultConfig()->object( $configKey, true 
);
+   $newQueue = Configuration::getDefaultConfig()->object( $configKey, 
false );
$newQueue->push( $body );
 }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie0c6d33b2585c511f7db0e5040f822b4ca42d1fd
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP base class for Ingenico payments using SDK

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333154 )

Change subject: WIP base class for Ingenico payments using SDK
..

WIP base class for Ingenico payments using SDK

Change-Id: I4996945c83e31a60f695912fd5458895ba00ad4c
---
A PaymentProviders/Ingenico/IngenicoPaymentProvider.php
M SmashPig.yaml
M composer.json
M composer.lock
4 files changed, 96 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/54/333154/1

diff --git a/PaymentProviders/Ingenico/IngenicoPaymentProvider.php 
b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
new file mode 100644
index 000..c089c2b
--- /dev/null
+++ b/PaymentProviders/Ingenico/IngenicoPaymentProvider.php
@@ -0,0 +1,33 @@
+config = Context::get()->getConfiguration();
+   $connection = $this->config->object( 'connection' );
+   $communicatorConfiguration = $this->config->object( 
'communicator-config' );
+   $communicator = new Communicator( $connection, 
$communicatorConfiguration );
+   $this->client = new Client( $communicator );
+   }
+}
diff --git a/SmashPig.yaml b/SmashPig.yaml
index e09d775..2569269 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -411,3 +411,16 @@
 endpoints:
 listener:
 class: 
SmashPig\PaymentProviders\GlobalCollect\GlobalCollectListener
+
+ingenico:
+# 
https://developer.globalcollect.com/documentation/sdk/server/php/#initialization
+communicator-configuration:
+class: Ingenico\Connect\Sdk\CommunicatorConfiguration
+constructor-parameters:
+- 'apiKey'
+- 'apiSecret'
+- 'baseUri'
+- 'integrator'
+connection:
+class: Ingenico\Connect\Sdk\DefaultConnection
+constructor-parameters: []
diff --git a/composer.json b/composer.json
index ead77ea..cfaaa6b 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,8 @@
 "symfony/event-dispatcher": "^2.1",
 "symfony/http-foundation": "^2.1",
 "symfony/yaml": "^2.8",
-"amzn/login-and-pay-with-amazon-sdk-php": "dev-master"
+"amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
+"Ingenico-ePayments/connect-sdk-php": "^5.1"
 },
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9",
diff --git a/composer.lock b/composer.lock
index c438192..93bb3cb 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "b9fb8f640ad664864e5c9ea93dbc8b1a",
-"content-hash": "6f0c1657143a0d54fdac09cb749ba44b",
+"hash": "c3f38e54779883f73a3c2a6b850ce50a",
+"content-hash": "f450e8dd0ec298cc0aeb00b7add291fd",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -152,6 +152,52 @@
 "time": "2017-01-04 21:01:15"
 },
 {
+"name": "ingenico-epayments/connect-sdk-php",
+"version": "5.1.0",
+"source": {
+"type": "git",
+"url": 
"https://github.com/Ingenico-ePayments/connect-sdk-php.git";,
+"reference": "f72d2738c939925b037a197abbed24ee5cafb5c5"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/Ingenico-ePayments/connect-sdk-php/zipball/f72d2738c939925b037a197abbed24ee5cafb5c5";,
+"reference": "f72d2738c939925b037a197abbed24ee5cafb5c5",
+"shasum": ""
+},
+"require": {
+"php": ">=5.4"
+},
+"require-dev": {
+"phpunit/phpunit": "~4"
+},
+"type": "library",
+"autoload": {
+"psr-4": {
+"Ingenico\\Connect\\Sdk\\": [
+"src/Ingenico/Connect/Sdk",
+"lib/Ingenico/Connect/Sdk"
+]
+}
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"MIT"
+],
+"authors": [
+{
+"name": "Ingenico ePayments",
+"homepage": "http://www.ingenico.com/epayments/";
+}
+],
+"description": "PHP SDK to communicate with the GlobalCollect 
platform server-to-server API",
+"homepage": "http://www.ingenico.com/epayments/";,
+"keywords": [
+"sdk"
+],
+"time": "2016-12-20 12:21:28"
+},
+{
 "name": "ircmaxell/password-compat",
 "version": "v1.0.4",
 "source": {

-- 
To view

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP add PaymentParameters and BasePaymentProvider

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333153 )

Change subject: WIP add PaymentParameters and BasePaymentProvider
..

WIP add PaymentParameters and BasePaymentProvider

PaymentParameters is a much dumber version of DonationData. The
idea would be to make doPayment a lot more stateless than it is
now by passing in all of the info gleaned from the UI layer.

Change-Id: Ieacdbc12b65c717217693c28e1400de6d5b6b053
---
A PaymentProviders/PaymentParameters.php
A PaymentProviders/PaymentProvider.php
2 files changed, 38 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/53/333153/1

diff --git a/PaymentProviders/PaymentParameters.php 
b/PaymentProviders/PaymentParameters.php
new file mode 100644
index 000..ed1a086
--- /dev/null
+++ b/PaymentProviders/PaymentParameters.php
@@ -0,0 +1,24 @@
+https://gerrit.wikimedia.org/r/333153
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieacdbc12b65c717217693c28e1400de6d5b6b053
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP add Ingenico bank payment provider

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333155 )

Change subject: WIP add Ingenico bank payment provider
..

WIP add Ingenico bank payment provider

So far this just looks up iDEAL banks, but it will eventually
implement doPayment

Bug: T128692
Change-Id: I4a43f8eca3a2a47ea7a487aba7b8f923fb0f5421
---
A PaymentProviders/Ingenico/BankPaymentProvider.php
M SmashPig.yaml
2 files changed, 37 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/55/333155/1

diff --git a/PaymentProviders/Ingenico/BankPaymentProvider.php 
b/PaymentProviders/Ingenico/BankPaymentProvider.php
new file mode 100644
index 000..8daa05b
--- /dev/null
+++ b/PaymentProviders/Ingenico/BankPaymentProvider.php
@@ -0,0 +1,34 @@
+countryCode = $country;
+   $query->currencyCode = $currency;
+
+   $directory = $this->client
+   ->merchant( $this->config->val( 'merchant-id' ) )
+   ->products()
+   ->directory( $productId, $query );
+
+   $banks = array();
+   foreach( $directory->entries as $entry ) {
+   $banks[$entry->issuerId] = $entry->issuerName;
+   }
+   return $banks;
+   }
+}
diff --git a/SmashPig.yaml b/SmashPig.yaml
index 2569269..ac01cf2 100644
--- a/SmashPig.yaml
+++ b/SmashPig.yaml
@@ -413,6 +413,8 @@
 class: 
SmashPig\PaymentProviders\GlobalCollect\GlobalCollectListener
 
 ingenico:
+merchant-id: 'merchant-id'
+
 # 
https://developer.globalcollect.com/documentation/sdk/server/php/#initialization
 communicator-configuration:
 class: Ingenico\Connect\Sdk\CommunicatorConfiguration
@@ -421,6 +423,7 @@
 - 'apiSecret'
 - 'baseUri'
 - 'integrator'
+
 connection:
 class: Ingenico\Connect\Sdk\DefaultConnection
 constructor-parameters: []

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a43f8eca3a2a47ea7a487aba7b8f923fb0f5421
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Push PaymentResult down into SmashPig

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333152 )

Change subject: Push PaymentResult down into SmashPig
..

Push PaymentResult down into SmashPig

Getting rid of fromResults method because the PaymentTransactionResponse
class is kind of janky. That method can live in some factory in
DonationInterface as long as it's needed.

Change-Id: Ia59d391ad7d5eb751978c80316bdd7af898757ae
---
A PaymentProviders/PaymentResult.php
1 file changed, 108 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/52/333152/1

diff --git a/PaymentProviders/PaymentResult.php 
b/PaymentProviders/PaymentResult.php
new file mode 100644
index 000..f720626
--- /dev/null
+++ b/PaymentProviders/PaymentResult.php
@@ -0,0 +1,108 @@
+iframe = $name;
+   return $response;
+   }
+
+   public static function newForm( $name ) {
+   $response = new PaymentResult();
+   $response->form = $name;
+   return $response;
+   }
+
+   public static function newRedirect( $url ) {
+   $response = new PaymentResult();
+   $response->redirect = $url;
+   return $response;
+   }
+
+   public static function newRefresh( $errors = array() ) {
+   $response = new PaymentResult();
+   $response->refresh = true;
+   $response->errors = $errors;
+   return $response;
+   }
+
+   public static function newSuccess() {
+   $response = new PaymentResult();
+   return $response;
+   }
+
+   public static function newFailure( $errors = array() ) {
+   $response = new PaymentResult();
+   $response->failed = true;
+   $response->errors = $errors;
+   return $response;
+   }
+
+   public static function newEmpty() {
+   $response = new PaymentResult();
+   $response->errors = array(
+   'internal-' => 'Internal error: no results yet.',
+   );
+   $response->failed = true;
+   return $response;
+   }
+
+   public function getIframe() {
+   return $this->iframe;
+   }
+
+   public function getForm() {
+   return $this->form;
+   }
+
+   public function getRedirect() {
+   return $this->redirect;
+   }
+
+   public function getRefresh() {
+   return $this->refresh;
+   }
+
+   public function getErrors() {
+   return $this->errors;
+   }
+
+   public function isFailed() {
+   return $this->failed;
+   }
+}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia59d391ad7d5eb751978c80316bdd7af898757ae
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Fix insecure uncaught exception logging

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333140 )

Change subject: Fix insecure uncaught exception logging
..

Fix insecure uncaught exception logging

When there's an uncaught error in a maintenance script, the last
chance error handler was smushing all the exception info into a
string and calling MaintenanceBase->error with $fatal set to true.

With $fatal == true, it logs the whole thing including stack trace
at alert level then exits. This patch fixes it to use the more
discerning exception logging that keeps the stack trace out of
failmails.

Bug: T155757
Change-Id: I23d28f722a0bb5675425e0a56a2366bed916c22e
---
M Maintenance/MaintenanceBase.php
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/40/333140/1

diff --git a/Maintenance/MaintenanceBase.php b/Maintenance/MaintenanceBase.php
index 440dc31..8fe10fe 100644
--- a/Maintenance/MaintenanceBase.php
+++ b/Maintenance/MaintenanceBase.php
@@ -597,16 +597,12 @@
}
 
/**
-* Hook from set_exception_handler(). Will clear output data, set the 
HTTP
-* status to 500: Internal Error and then die.
+* Hook from set_exception_handler().
 *
 * @param \Exception $ex The uncaught exception
 */
public static function lastChanceExceptionHandler( $ex ) {
-   MaintenanceBase::error(
-   "{$ex->getMessage()} @ 
{$ex->getFile()}:{$ex->getLine()}.\n{$ex->getTraceAsString()}",
-   true
-   );
Logger::alert( "Last chance exception handler fired.", null, 
$ex );
+   exit( 1 );
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23d28f722a0bb5675425e0a56a2366bed916c22e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: WIP use Monolog for logging

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333130 )

Change subject: WIP use Monolog for logging
..

WIP use Monolog for logging

Change-Id: I4233f3def73004bd6018b9d5062a4b682da6471a
---
A Core/Logging/FailMailHandler.php
M composer.json
M composer.lock
3 files changed, 53 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/30/333130/1

diff --git a/Core/Logging/FailMailHandler.php b/Core/Logging/FailMailHandler.php
new file mode 100644
index 000..b644dc4
--- /dev/null
+++ b/Core/Logging/FailMailHandler.php
@@ -0,0 +1,48 @@
+ '[ALERT]',
+   LOG_ERR => '[ERROR]',
+   LOG_WARNING => '[WARNING]',
+   LOG_INFO=> '[INFO]',
+   LOG_NOTICE  => '[NOTICE]',
+   LOG_DEBUG   => '[DEBUG]',
+   );
+
+   public function __construct( $toAddr, $fromAddr = null, $level = 
Logger::DEBUG, $bubble = true ) {
+   parent::__construct( $level, $bubble );
+   $this->to = $toAddr;
+
+   if ( $fromAddr ) {
+   $this->from = $fromAddr;
+   } else {
+   $this->from = 'smashpig-failmail@' . gethostname();
+   }
+   }
+
+   /**
+* Writes the record down to the log of the implementing handler
+*
+* @param  array $record
+* @return void
+*/
+   protected function write( array $record ) {
+   // TODO: Implement write() method.
+   }
+}
diff --git a/composer.json b/composer.json
index ead77ea..3c69c78 100644
--- a/composer.json
+++ b/composer.json
@@ -30,7 +30,9 @@
 "symfony/event-dispatcher": "^2.1",
 "symfony/http-foundation": "^2.1",
 "symfony/yaml": "^2.8",
-"amzn/login-and-pay-with-amazon-sdk-php": "dev-master"
+"amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
+"psr/log": "^1.0",
+"monolog/monolog": "^1.22"
 },
"require-dev": {
"jakub-onderka/php-parallel-lint": "^0.9",
diff --git a/composer.lock b/composer.lock
index c438192..7e9c891 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "b9fb8f640ad664864e5c9ea93dbc8b1a",
-"content-hash": "6f0c1657143a0d54fdac09cb749ba44b",
+"hash": "91404bdb755be52aa0d7ad5ec62e1850",
+"content-hash": "5ff3b398e4ee1c4e000f79d5ed76f2cc",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4233f3def73004bd6018b9d5062a4b682da6471a
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Fix insecure uncaught exception logging

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333082 )

Change subject: Fix insecure uncaught exception logging
..

Fix insecure uncaught exception logging

When there's an uncaught error in a maintenance script, the last
chance error handler was smushing all the exception info into a
string and calling MaintenanceBase->error with $fatal set to true.

With $fatal == true, it logs the whole thing including stack trace
at alert level then exits. This patch fixes it to use the more
discerning exception logging that keeps the stack trace out of
failmails.

Bug: T155757
Change-Id: I23d28f722a0bb5675425e0a56a2366bed916c22e
---
M Maintenance/MaintenanceBase.php
1 file changed, 2 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/82/333082/1

diff --git a/Maintenance/MaintenanceBase.php b/Maintenance/MaintenanceBase.php
index 440dc31..8fe10fe 100644
--- a/Maintenance/MaintenanceBase.php
+++ b/Maintenance/MaintenanceBase.php
@@ -597,16 +597,12 @@
}
 
/**
-* Hook from set_exception_handler(). Will clear output data, set the 
HTTP
-* status to 500: Internal Error and then die.
+* Hook from set_exception_handler().
 *
 * @param \Exception $ex The uncaught exception
 */
public static function lastChanceExceptionHandler( $ex ) {
-   MaintenanceBase::error(
-   "{$ex->getMessage()} @ 
{$ex->getFile()}:{$ex->getLine()}.\n{$ex->getTraceAsString()}",
-   true
-   );
Logger::alert( "Last chance exception handler fired.", null, 
$ex );
+   exit( 1 );
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I23d28f722a0bb5675425e0a56a2366bed916c22e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333061 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

8c04ac6 Move exception trace into log data

Change-Id: I8be1c87b9b7b7e298a4dbc559e6f6427d0b5ed5f
---
0 files changed, 0 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/61/333061/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8be1c87b9b7b7e298a4dbc559e6f6427d0b5ed5f
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Move exception trace into log data

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/333041 )

Change subject: Move exception trace into log data
..

Move exception trace into log data

Data object is not included in failmail, but should still be logged.

Bug: T155757
Change-Id: Id2ac43afb19f36f8e28bdf5d6852e40814983d9e
---
M Core/Logging/LogEvent.php
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/41/333041/1

diff --git a/Core/Logging/LogEvent.php b/Core/Logging/LogEvent.php
index 3d2e43b..41b77d4 100644
--- a/Core/Logging/LogEvent.php
+++ b/Core/Logging/LogEvent.php
@@ -55,7 +55,7 @@
$jdata = $data->toJson();
}
catch ( DataSerializationException $ex ) {
-  }
+   }
} else {
$jdata = json_encode( $data );
}
@@ -69,6 +69,13 @@
$this->data = null;
}
 
+   if ( $exception ) {
+   if ( $this->data === null ) {
+   $this->data = $exception->getTraceAsString();
+   } else {
+   $this->data .= $exception->getTraceAsString();
+   }
+   }
if ( !$timestamp ) {
$this->timestamp = time();
$this->datestring = date( 'c' );
@@ -101,10 +108,6 @@
} while ( $cex );
$descStr = implode( ' -> ', array_reverse( $descStr ) );
 
-   // Get the stack trace
-   $stack = explode( "\n", $this->exception->getTraceAsString() );
-
-   array_unshift( $stack, $descStr );
-   return $stack;
+   return $descStr;
}
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id2ac43afb19f36f8e28bdf5d6852e40814983d9e
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Fold getRetryData into mustache error form

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332970 )

Change subject: Fold getRetryData into mustache error form
..

Fold getRetryData into mustache error form

No need to have it on the gateway interface if the form already
has the donation data.

Change-Id: If82e4d9cbe0404aa65492120015a6ab26b3fa4bc
---
M gateway_common/GatewayType.php
M gateway_common/gateway.adapter.php
M gateway_forms/MustacheErrorForm.php
3 files changed, 3 insertions(+), 18 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/70/332970/1

diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php
index 8c93558..c31e840 100644
--- a/gateway_common/GatewayType.php
+++ b/gateway_common/GatewayType.php
@@ -223,14 +223,6 @@
public function getData_Unstaged_Escaped( $val = '' );
 
/**
-* Retrieve the data we will need in order to retry a payment.
-* This is useful in the event that we have just killed a session before
-* the next retry.
-* @return array Data required for a payment retry.
-*/
-   public function getRetryData();
-
-   /**
 * Get metadata for the specified payment method as set in
 * @see definePaymentMethods
 *
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index d7754ab..74fbe5f 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -3175,14 +3175,6 @@
return $match;
}
 
-   public function getRetryData() {
-   $params = array ( );
-   foreach ( $this->dataObj->getRetryFields() as $field ) {
-   $params[$field] = $this->getData_Unstaged_Escaped( 
$field );
-   }
-   return $params;
-   }
-
/**
 * buildOrderIDSources: Uses the 'alt_locations' array in the order id
 * metadata, to build an array of all possible candidates for order_id.
diff --git a/gateway_forms/MustacheErrorForm.php 
b/gateway_forms/MustacheErrorForm.php
index 9e633c7..434f9b3 100644
--- a/gateway_forms/MustacheErrorForm.php
+++ b/gateway_forms/MustacheErrorForm.php
@@ -36,8 +36,9 @@
'gateway' => $this->gateway->getIdentifier()
);
if ( !$this->gateway->session_hasDonorData() ) {
-   $preserve = $this->gateway->getRetryData();
-   $params = array_merge( $preserve, $params );
+   foreach ( DonationData::getRetryFields() as $field ) {
+   $params[$field] = $data[$field];
+   }
}
$data['ffname_retry'] = 
GatewayFormChooser::buildPaymentsFormURL( $back_form, $params ) ;
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If82e4d9cbe0404aa65492120015a6ab26b3fa4bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove unused api_request stuff

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332971 )

Change subject: Remove unused api_request stuff
..

Remove unused api_request stuff

This was used to skip a bunch of RapidHTML logic, which is now gone.

We were also consulting this in the Amazon adapter to decide if we
had to push a ffname into the session. I believe this is now
unneeded as well. If I'm wrong, the worst that should happen is we
get spam in the error logs on the Amazon form when we return from
their login page.

Change-Id: I2eb79b9ad3afd9983c52c5aa271edc4095d6809f
---
M amazon_gateway/amazon.adapter.php
M amazon_gateway/amazon.api.php
M gateway_common/donation.api.php
M gateway_common/gateway.adapter.php
M tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
5 files changed, 3 insertions(+), 42 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/71/332971/1

diff --git a/amazon_gateway/amazon.adapter.php 
b/amazon_gateway/amazon.adapter.php
index 8bdce22..d10e136 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -63,10 +63,6 @@
array( 'payment_method' => 'amazon' )
);
}
-   if ( !$this->isApiRequest() ) {
-   // Avoid missing ffname issues on return from Amazon 
login
-   $this->session_pushFormName( 
$this->getData_Unstaged_Escaped( 'ffname' ) );
-   }
$this->session_addDonorData();
}
 
diff --git a/amazon_gateway/amazon.api.php b/amazon_gateway/amazon.api.php
index be09ecf..07ad771 100644
--- a/amazon_gateway/amazon.api.php
+++ b/amazon_gateway/amazon.api.php
@@ -15,7 +15,6 @@
$recurring = $this->getParameter( 'recurring');
$token = $this->getParameter( 'wmf_token' );
$adapterParams = array(
-   'api_request' => true,
'external_data' => array(
'amount' => $this->getParameter( 'amount' ),
'currency_code' => $this->getParameter( 
'currency_code' ),
diff --git a/gateway_common/donation.api.php b/gateway_common/donation.api.php
index 6d4be51..03d2960 100644
--- a/gateway_common/donation.api.php
+++ b/gateway_common/donation.api.php
@@ -142,11 +142,7 @@
}
 
private function getGatewayObject() {
-   $gateway_opts = array(
-   'api_request' => 'true'
-   );
-
$className = DonationInterface::getAdapterClassForGateway( 
$this->gateway );
-   return new $className( $gateway_opts );
+   return new $className();
}
 }
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 74fbe5f..b5b5f69 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -171,7 +171,6 @@
 */
public $posted = false;
protected $batch = false;
-   protected $api_request = false;
 
// ALL OF THESE need to be redefined in the children. Much voodoo 
depends on the accuracy of these constants.
const GATEWAY_NAME = 'Donation Gateway';
@@ -206,15 +205,12 @@
 * @param array $options
 *   OPTIONAL - You may set options for testing
 *   - external_data - array, data from unusual sources (such as test 
fixture)
-*   - api_request - Boolean, this is an api request, do not perform UI 
actions
-*
 * @see DonationData
 */
public function __construct( $options = array() ) {
 
$defaults = array(
'external_data' => null,
-   'api_request' => false,
);
$options = array_merge( $defaults, $options );
if ( array_key_exists( 'batch_mode', $options ) ) {
@@ -228,11 +224,6 @@
$this->profiler = DonationLoggerFactory::getProfiler( $this );
 
$this->logger->info( "Creating a new adapter of type: 
[{$this->getGatewayName()}]" );
-
-   // so we know we can skip all the visual stuff.
-   if ( $options['api_request'] ) {
-   $this->setApiRequest();
-   }
 
// The following needs to be set up before we initialize 
DonationData.
// TODO: move the rest of the initialization here
@@ -2363,27 +2354,6 @@
 
public function isBatchProcessor() {
return $this->batch;
-   }
-
-   /**
-* Tell the gateway that it is going to be used for an API request, so
-* it can bypass setting up all the visual components.
-* @param boolean $set True if this is an API request, false if not.
-*/
-   public function setApiRequest( $set = true ) {

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove unused base adapter code

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332969 )

Change subject: Remove unused base adapter code
..

Remove unused base adapter code

Worldpay was the only thing that used cdata, get rid of it.
Nothing uses isValidSpecialForm any more.

Change-Id: I49db12594d30f209cb619fc315156680b60b4826
---
M gateway_common/gateway.adapter.php
1 file changed, 1 insertion(+), 26 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/69/332969/1

diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index c64eb22..d7754ab 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -53,11 +53,6 @@
protected $dataConstraints = array();
 
/**
-* $cdata lists fields which require CDATA tags
-*/
-   protected $cdata = array();
-
-   /**
 * $error_map maps gateway errors to client errors
 *
 * The key of each error should map to a i18n message key or a callable
@@ -886,11 +881,7 @@
$temp = $this->xmlDoc->createElement( $value );
 
$data = null;
-   if ( in_array( $value, $this->cdata ) ) {
-   $data = $this->xmlDoc->createCDATASection( 
$nodevalue );
-   } else {
-   $data = $this->xmlDoc->createTextNode( 
$nodevalue );
-   }
+   $data = $this->xmlDoc->createTextNode( $nodevalue );
 
$temp->appendChild( $data );
$node->appendChild( $temp );
@@ -3190,22 +3181,6 @@
$params[$field] = $this->getData_Unstaged_Escaped( 
$field );
}
return $params;
-   }
-
-   /**
-* isValidSpecialForm: Tells us if the ffname supplied is a valid
-* special form for the current gateway.
-* @var string $ffname The form name we want to try
-* @return boolean True if this is a valid special form, otherwise false
-*/
-   public function isValidSpecialForm( $ffname ){
-   $defn = GatewayFormChooser::getFormDefinition( $ffname );
-   if ( is_array( $defn ) &&
-   DataValidator::value_appears_in( 
$this->getIdentifier(), $defn['gateway'] ) &&
-   array_key_exists( 'special_type', $defn ) ){
-   return true;
-   }
-   return false;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I49db12594d30f209cb619fc315156680b60b4826
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Delete unused CyclicalArray

2017-01-19 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332968 )

Change subject: Delete unused CyclicalArray
..

Delete unused CyclicalArray

Nifty code, but we're no longer using it for orphans.

Change-Id: If40e4bcea7a6ecf2d79d33694f521df40ca00ee9
---
M extension.json
D globalcollect_gateway/CyclicalArray.php
2 files changed, 0 insertions(+), 38 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/68/332968/1

diff --git a/extension.json b/extension.json
index f0762b3..12c2c5a 100644
--- a/extension.json
+++ b/extension.json
@@ -69,7 +69,6 @@
"ContributionTrackingPlusUnique": 
"gateway_common/ContributionTrackingPlusUnique.php",
"CurrencyRates": "gateway_common/CurrencyRates.php",
"CurrencyRatesModule": "modules/CurrencyRatesModule.php",
-   "CyclicalArray": "globalcollect_gateway/CyclicalArray.php",
"DonationData": "gateway_common/DonationData.php",
"DonationInterface": "DonationInterface.class.php",
"DonationLoggerFactory": 
"gateway_common/DonationLoggerFactory.php",
diff --git a/globalcollect_gateway/CyclicalArray.php 
b/globalcollect_gateway/CyclicalArray.php
deleted file mode 100644
index dcf5da9..000
--- a/globalcollect_gateway/CyclicalArray.php
+++ /dev/null
@@ -1,37 +0,0 @@
-queues = (array) $queue_list;
-   }
-
-   public function current() {
-   return $this->queues[0];
-   }
-
-   public function isEmpty() {
-   return empty( $this->queues );
-   }
-
-   public function rotate() {
-   if ( count( $this->queues ) < 1 ) {
-   return;
-   }
-   $rotate_elem = array_shift( $this->queues );
-   array_push( $this->queues, $rotate_elem );
-   }
-
-   public function dropCurrent() {
-   array_shift( $this->queues );
-   }
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If40e4bcea7a6ecf2d79d33694f521df40ca00ee9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove unused noScript form function

2017-01-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332963 )

Change subject: Remove unused noScript form function
..

Remove unused noScript form function

This is properly templatized now.
TODO: same thing with the verisign seal, if we're keeping it.

Change-Id: If1ca1ff53b949036ff427127e23b9b74f9e2353b
---
M gateway_forms/Form.php
1 file changed, 0 insertions(+), 19 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/63/332963/1

diff --git a/gateway_forms/Form.php b/gateway_forms/Form.php
index 83bafd8..b42bcfa 100644
--- a/gateway_forms/Form.php
+++ b/gateway_forms/Form.php
@@ -64,25 +64,6 @@
}
 
/**
-* Generate HTML for  tags
-* For displaying when a user does not have Javascript enabled in their 
browser.
-*/
-   protected function getNoScript() {
-   $noScriptRedirect = $this->gateway->getGlobal( 
'NoScriptRedirect' );
-
-   $form = '';
-   $form .= '';
-   $form .= '' . wfMessage( 
'donate_interface-noscript-msg' )->escaped() . '';
-   if ( $noScriptRedirect ) {
-   $form .= '' . wfMessage( 
'donate_interface-noscript-redirect-msg' )->escaped() . '';
-   $form .= '' . htmlspecialchars( 
$noScriptRedirect ) . '';
-   }
-   $form .= '';
-   $form .= '';
-   return $form;
-   }
-
-   /**
 * Determine the 'no cache' form action
 *
 * This mostly exists to ensure that the form does not try to use AJAX 
to

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If1ca1ff53b949036ff427127e23b9b74f9e2353b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: ProcessResponse no longer needs to be public

2017-01-18 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332962 )

Change subject: ProcessResponse no longer needs to be public
..

ProcessResponse no longer needs to be public

Remove it from the public interface, mark as protected.

Change-Id: Ibde7cead7ff3b837fe7487937c734fd6a5d6a28b
---
M astropay_gateway/astropay.adapter.php
M gateway_common/GatewayType.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M paypal_gateway/express_checkout/paypal_express.adapter.php
5 files changed, 11 insertions(+), 16 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/62/332962/1

diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index fa86262..829dbfa 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -251,7 +251,7 @@
 *params from request
 * @throws ResponseProcessingException
 */
-   public function processResponse( $response ) {
+   protected function processResponse( $response ) {
$this->transaction_response->setData( $response );
if ( !$response ) {
throw new ResponseProcessingException(
diff --git a/gateway_common/GatewayType.php b/gateway_common/GatewayType.php
index 31393bb..8c93558 100644
--- a/gateway_common/GatewayType.php
+++ b/gateway_common/GatewayType.php
@@ -48,17 +48,6 @@
public static function getGlobal( $varname );
 
/**
-* Process the API response obtained from the payment processor and set
-* properties of transaction_response
-* @param array|DomDocument $response Cleaned-up response returned from
-*@see getFormattedResponse.  Type depends on 
$this->getResponseType
-* @throws ResponseProcessingException with an actionable error code 
and any
-* variables to retry
-*/
-   public function processResponse( $response );
-
-
-   /**
 * Perform any additional processing required when donor returns from
 * payment processor site. Should set the final status.
 * @param array $requestValues all GET and POST values from the request
diff --git a/gateway_common/gateway.adapter.php 
b/gateway_common/gateway.adapter.php
index 67a423c..c64eb22 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -1450,10 +1450,16 @@
}
 
/**
+* Process the API response obtained from the payment processor and set
+* properties of transaction_response.
 * Default implementation just says we got a response.
-* @param array|DomDocument $response
+*
+* @param array|DomDocument $response Cleaned-up response returned from
+*@see getFormattedResponse.  Type depends on 
$this->getResponseType
+* @throws ResponseProcessingException with an actionable error code 
and any
+* variables to retry
 */
-   public function processResponse( $response ) {
+   protected function processResponse( $response ) {
$this->transaction_response->setCommunicationStatus( true );
}
 
diff --git a/globalcollect_gateway/globalcollect.adapter.php 
b/globalcollect_gateway/globalcollect.adapter.php
index e54f98c..2970e7e 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -1271,7 +1271,7 @@
 *
 * @throws ResponseProcessingException with code and potentially retry 
vars.
 */
-   public function processResponse( $response ) {
+   protected function processResponse( $response ) {
$this->transaction_response->setCommunicationStatus(
$this->parseResponseCommunicationStatus( $response )
);
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php 
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index a38a1f6..8b9965b 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -382,7 +382,7 @@
return true;
}
 
-   public function processResponse( $response ) {
+   protected function processResponse( $response ) {
$this->transaction_response->setData( $response );
// FIXME: I'm not sure why we're responsible for failing the
// transaction.  If not, we can omit the try/catch here.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibde7cead7ff3b837fe7487937c734fd6a5d6a28b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Update libraries

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332716 )

Change subject: Update libraries
..

Update libraries

Change-Id: Id8c37034ae4f54a8c258c9e63d36342844d75cb1
---
M composer.lock
1 file changed, 67 insertions(+), 110 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/16/332716/1

diff --git a/composer.lock b/composer.lock
index e18e257..013a6a4 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,8 +4,8 @@
 "Read more about it at 
https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file";,
 "This file is @generated automatically"
 ],
-"hash": "16969a6f73b030f3d6c3a2435a7099ae",
-"content-hash": "b48455e6e53399fe588ca65fb1257c5e",
+"hash": "ee3f90702fff3bcc172baabd6f541eb5",
+"content-hash": "c80503673255d9fe80c09a081876776e",
 "packages": [
 {
 "name": "amzn/login-and-pay-with-amazon-sdk-php",
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
+"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,57 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-08-05 19:16:32"
-},
-{
-"name": "fusesource/stomp-php",
-"version": "2.1.1",
-"source": {
-"type": "git",
-"url": "https://github.com/dejanb/stomp-php.git";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dejanb/stomp-php/zipball/4ac51c0abee05078e198faf13f48c056a72f8f8c";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.0"
-},
-"type": "library",
-"autoload": {
-"psr-0": {
-"FuseSource": "src/"
-}
-},
-"notification-url": "https://packagist.org/downloads/";,
-"license": [
-"Apache-2.0"
-],
-"authors": [
-{
-"name": "Dejan Bosnanac",
-"email": "de...@nighttale.net",
-"homepage": "http://www.nighttale.net";
-},
-{
-"name": "Sören Rohweder",
-"email": "s.rohwe...@blage.net",
-"homepage": "http://www.monofone.de";
-}
-],
-"description": "stomp support for PHP",
-"homepage": "http://github.com/dejanb/stomp-php";,
-"keywords": [
-"activeMQ",
-"jms",
-"messaging",
-"stomp"
-],
-"abandoned": "stomp-php/stomp-php",
-"time": "2013-02-23 17:34:44"
+"time": "2017-01-04 21:01:15"
 },
 {
 "name": "ircmaxell/password-compat",
@@ -245,23 +195,22 @@
 },
 {
 "name": "minfraud/http",
-"version": "v1.70",
+"version": "v1.71",
 "source": {
 "type": "git",
 "url": "https://github.com/maxmind/ccfd-api-php.git";,
-"reference": "941e9345f9c237a253be8b908ecef951698a1a99"
+"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/941e9345f9c237a253be8b908ecef951698a1a99";,
-"reference": "941e9345f9c237a253be8b908ecef951698a1a99",
+"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/5f6c2a5454e755f1c56be17a1fc0c97576ff010e";,
+"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e",
 "shasum": ""
 },
 "type": "library",
 "autoload": {
-"files": [
-"src/HTTPBase.php",
-"src/CreditCardFraudDetection.php"
+"classmap": [
+"src"
 ]
 },
 "notification-url": "https://packagist.org/downloads/";,
@@ -282,7 +231,7 @@
 "maxmind",
 "minfraud"
 ],
-"time": "2015-07-21 14:49:48"
+"time": "2016-10-13 14:35:01"
 },
 {

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Remove dependency on stomp-php

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332715 )

Change subject: Remove dependency on stomp-php
..

Remove dependency on stomp-php

And update default queue backend to an in-memory PDO queue with
ATTR_PERSISTENT (12) set to true.

Bug: T131274
Change-Id: I22ee8384becb7e45506eac9c1953747f388372b2
---
M composer.json
M extension.json
2 files changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/15/332715/1

diff --git a/composer.json b/composer.json
index ff07415..717ffa5 100644
--- a/composer.json
+++ b/composer.json
@@ -23,7 +23,6 @@
},
"require": {
"coderkungfu/php-queue": "dev-master",
-   "fusesource/stomp-php": "^2.1",
"minfraud/http": "^1.70",
"monolog/monolog": "~1.18.2",
"neitanod/forceutf8": "^2.0",
diff --git a/extension.json b/extension.json
index f0762b3..673b30f 100644
--- a/extension.json
+++ b/extension.json
@@ -369,10 +369,11 @@
"AstroPayGatewayURL": "https://astropaycard.com/";,
"AstroPayGatewayTestingURL": 
"https://sandbox.astropaycard.com/";,
"DonationInterfaceDefaultQueueServer": {
-   "type": "PHPQueue\\Backend\\Stomp",
-   "uri": "tcp://localhost:61613",
-   "read_timeout": "1",
-   "expiry": "30 days",
+   "type": "PHPQueue\\Backend\\PDO",
+   "connection_string": "sqlite::memory:",
+   "pdo_options": {
+   "12": true
+   },
"_merge_strategy": "array_plus"
},
"DonationInterfaceQueues": {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I22ee8384becb7e45506eac9c1953747f388372b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332713 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

And update vendor

61968f7 Update library versions

Change-Id: I488b1c833cf22258b9a302fe9abc7e4e24c00457
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/13/332713/1

diff --git a/vendor b/vendor
index 6e4efba..1eba7bc 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 6e4efba4d620eb94f3936e7434c636f153edd08b
+Subproject commit 1eba7bc3eabdf4872d9d1757e56be2be6be24283

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I488b1c833cf22258b9a302fe9abc7e4e24c00457
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Update library versions

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332700 )

Change subject: Update library versions
..

Update library versions

Change-Id: Ic02389864f75420be17387fda8a761cd1fec2426
---
M composer.lock
1 file changed, 117 insertions(+), 107 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/00/332700/1

diff --git a/composer.lock b/composer.lock
index 77d3ed8..c438192 100644
--- a/composer.lock
+++ b/composer.lock
@@ -44,7 +44,7 @@
 "payment",
 "payments"
 ],
-"time": "2016-02-17 00:53:20"
+"time": "2016-02-17 00:44:20"
 },
 {
 "name": "clio/clio",
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
+"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-08-05 19:16:32"
+"time": "2017-01-04 21:01:15"
 },
 {
 "name": "ircmaxell/password-compat",
@@ -195,16 +195,16 @@
 },
 {
 "name": "monolog/monolog",
-"version": "1.21.0",
+"version": "1.22.0",
 "source": {
 "type": "git",
 "url": "https://github.com/Seldaek/monolog.git";,
-"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952"
+"reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952";,
-"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952",
+"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558";,
+"reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
 "shasum": ""
 },
 "require": {
@@ -215,7 +215,7 @@
 "psr/log-implementation": "1.0.0"
 },
 "require-dev": {
-"aws/aws-sdk-php": "^2.4.9",
+"aws/aws-sdk-php": "^2.4.9 || ^3.0",
 "doctrine/couchdb": "~1.0@dev",
 "graylog2/gelf-php": "~1.0",
 "jakub-onderka/php-parallel-lint": "0.9",
@@ -269,20 +269,20 @@
 "logging",
 "psr-3"
 ],
-"time": "2016-07-29 03:23:52"
+"time": "2016-11-26 00:15:39"
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.21",
+"version": "v5.2.22",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/b18cb98131bd83103ccb26a888fdfe3177b8a663";,
+"reference": "b18cb98131bd83103ccb26a888fdfe3177b8a663",
 "shasum": ""
 },
 "require": {
@@ -329,7 +329,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-12-28 15:35:48"
+"time": "2017-01-09 09:33:47"
 },
 {
 "name": "predis/predis",
@@ -383,22 +383,30 @@
 },
 {
 "name": "psr/log",
-"version": "1.0.0",
+"version": "1.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/php-fig/log.git";,
-"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b";,
-"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+"url": 
"https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba

[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Remove Stomp (!)

2017-01-17 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/332641 )

Change subject: Remove Stomp (!)
..


Remove Stomp (!)

Change-Id: I184b3a26581bc028a8d70752ae2d225d1abc50a2
---
M composer/autoload_namespaces.php
M composer/autoload_static.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
36 files changed, 0 insertions(+), 3,078 deletions(-)

Approvals:
  Ejegg: Verified; Looks good to me, approved



diff --git a/composer/autoload_namespaces.php b/composer/autoload_namespaces.php
index 1cb6750..9386d69 100644
--- a/composer/autoload_namespaces.php
+++ b/composer/autoload_namespaces.php
@@ -8,6 +8,5 @@
 return array(
 'Psr\\Log\\' => array($vendorDir . '/psr/log'),
 'PHPQueue' => array($vendorDir . '/coderkungfu/php-queue/src'),
-'FuseSource' => array($vendorDir . '/fusesource/stomp-php/src'),
 'Clio' => array($vendorDir . '/clio/clio/src'),
 );
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 2f4c3e5..49931c8 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -90,13 +90,6 @@
 0 => __DIR__ . '/..' . '/coderkungfu/php-queue/src',
 ),
 ),
-'F' => 
-array (
-'FuseSource' => 
-array (
-0 => __DIR__ . '/..' . '/fusesource/stomp-php/src',
-),
-),
 'C' => 
 array (
 'Clio' => 
diff --git a/composer/installed.json b/composer/installed.json
index d062fd9..c947a30 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -83,58 +83,6 @@
 ]
 },
 {
-"name": "fusesource/stomp-php",
-"version": "2.1.1",
-"version_normalized": "2.1.1.0",
-"source": {
-"type": "git",
-"url": "https://github.com/dejanb/stomp-php.git";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dejanb/stomp-php/zipball/4ac51c0abee05078e198faf13f48c056a72f8f8c";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.0"
-},
-"time": "2013-02-23 17:34:44",
-"type": "library",
-"installation-source": "dist",
-"autoload": {
-"psr-0": {
-"FuseSource": "src/"
-}
-},
-"notification-url": "https://packagist.org/downloads/";,
-"license": [
-"Apache-2.0"
-],
-"authors": [
-{
-"name": "Dejan Bosnanac",
-"email": "de...@nighttale.net",
-"homepage": "http://www.nighttale.net";
-},
-{
-"name": "Sören Rohweder",
-"email": "s.rohwe...@blage.net",
-"homepage": "http://www.monofone.de";
-}
-],
-"description": "stomp support for PHP",
-"homepage": "http://github.com/dejanb/stomp-php";,
-"keywords": [
-"activeMQ",
-"jms",
-"messaging",
-"stomp"
-

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332642 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

de0fa53 Revert on deployment: gitignore vendor directory
c4b3d9c Migrate 'EmptyQueueToDump' script off Stomp
1adfcd9 Erase Stomp

Also update vendor and revert .gitignore

Change-Id: I7b90180ccd511431a97962b766dbe39c837c7ea5
---
M .gitignore
D PaymentProviders/Adyen/Tests/faker/README
M vendor
3 files changed, 1 insertion(+), 37 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/42/332642/1

diff --git a/.gitignore b/.gitignore
index eab43d6..8bcf162 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,3 @@
 
 # IDE Tools
 .idea
-
-# Composer deps only on deployment branch
-vendor
diff --git a/PaymentProviders/Adyen/Tests/faker/README 
b/PaymentProviders/Adyen/Tests/faker/README
deleted file mode 100644
index 481f70f..000
--- a/PaymentProviders/Adyen/Tests/faker/README
+++ /dev/null
@@ -1,33 +0,0 @@
-<<< HEAD   (3da597 Update vendor)
-===
-Creates matching DonationInterface queue messages and IPN posts
-
-Usage: faker.py 10
-
-Will dump 3 files into the current working directory.
-
-adyen-X-auths.xml
-adyen-X-captures.xml
-adyen-X-pending.json
-
-They will contain 10 messages each, with the same set of randomly generated
-contribution tracking IDs, order IDs, and gateway transaction IDs.
-
-First import the pending queue messages using the SmashPig maintenance script:
-
-~/src/SmashPig$ php Maintenance/PopulateQueueFromDump.php --queue pending 
adyen-12345-pending.json
-
-Then use the soap injector to simulate some IPN messages for the 
authorizations:
-~/src/SmashPig/Tests/SoapInjector$ ./soapinject.py localhost 
'/ipn/smashpig_http_handler.php?p=adyen/listener' ../../adyen-12345-auths.xml
-
-This should queue up some capture request jobs. Run them like this:
-
-~/src/SmashPig$ php Maintenance/QueueJobRunner.php --queue jobs-adyen 
--config-node adyen
-TODO: fake API endpoint
-
-Then inject some capture success messages
-~/src/SmashPig/Tests/SoapInjector$ ./soapinject.py localhost 
'/ipn/smashpig_http_handler.php?p=adyen/listener' ../../adyen-12345-captures.xml
-
-This should queue up jobs to record the successful captures. Execute the job
-runner again and it should move the donor information into the Civi queue.
->>> BRANCH (1adfcd Erase Stomp)
diff --git a/vendor b/vendor
index a325017..6e4efba 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit a3250177eec55bbe6dc0420950ff75092d0dc0cb
+Subproject commit 6e4efba4d620eb94f3936e7434c636f153edd08b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7b90180ccd511431a97962b766dbe39c837c7ea5
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Remove Stomp (!)

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332641 )

Change subject: Remove Stomp (!)
..

Remove Stomp (!)

Change-Id: I184b3a26581bc028a8d70752ae2d225d1abc50a2
---
M composer/autoload_namespaces.php
M composer/autoload_static.php
M composer/installed.json
D fusesource/stomp-php/.gitignore
D fusesource/stomp-php/.travis.yml
D fusesource/stomp-php/README.md
D fusesource/stomp-php/build.xml
D fusesource/stomp-php/composer.json
D fusesource/stomp-php/examples/activemq-connectivity.xml
D fusesource/stomp-php/examples/activemq-security.xml
D fusesource/stomp-php/examples/binary.php
D fusesource/stomp-php/examples/connectivity.php
D fusesource/stomp-php/examples/durable.php
D fusesource/stomp-php/examples/first.php
D fusesource/stomp-php/examples/security.php
D fusesource/stomp-php/examples/transactions.php
D fusesource/stomp-php/examples/transformation.php
D fusesource/stomp-php/phpunit.xml
D fusesource/stomp-php/src/FuseSource/Stomp/Exception/StompException.php
D fusesource/stomp-php/src/FuseSource/Stomp/ExceptionInterface.php
D fusesource/stomp-php/src/FuseSource/Stomp/Frame.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Bytes.php
D fusesource/stomp-php/src/FuseSource/Stomp/Message/Map.php
D fusesource/stomp-php/src/FuseSource/Stomp/Stomp.php
D fusesource/stomp-php/tests/bootstrap.php
D fusesource/stomp-php/tests/functional/StompASyncTest.php
D fusesource/stomp-php/tests/functional/StompFailoverTest.php
D fusesource/stomp-php/tests/functional/StompRabbitTest.php
D fusesource/stomp-php/tests/functional/StompSslTest.php
D fusesource/stomp-php/tests/functional/StompSyncTest.php
D fusesource/stomp-php/tests/functional/StompTest.php
D fusesource/stomp-php/tests/stubbed/StompUnitTest.php
D fusesource/stomp-php/tests/stubbed/fusesource_stream_function_stubs.php
D fusesource/stomp-php/travisci/bin/ci/install_dependencies.sh
D fusesource/stomp-php/travisci/conf/amq/activemq.xml
36 files changed, 0 insertions(+), 3,078 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig/vendor 
refs/changes/41/332641/1

diff --git a/composer/autoload_namespaces.php b/composer/autoload_namespaces.php
index 1cb6750..9386d69 100644
--- a/composer/autoload_namespaces.php
+++ b/composer/autoload_namespaces.php
@@ -8,6 +8,5 @@
 return array(
 'Psr\\Log\\' => array($vendorDir . '/psr/log'),
 'PHPQueue' => array($vendorDir . '/coderkungfu/php-queue/src'),
-'FuseSource' => array($vendorDir . '/fusesource/stomp-php/src'),
 'Clio' => array($vendorDir . '/clio/clio/src'),
 );
diff --git a/composer/autoload_static.php b/composer/autoload_static.php
index 2f4c3e5..49931c8 100644
--- a/composer/autoload_static.php
+++ b/composer/autoload_static.php
@@ -90,13 +90,6 @@
 0 => __DIR__ . '/..' . '/coderkungfu/php-queue/src',
 ),
 ),
-'F' => 
-array (
-'FuseSource' => 
-array (
-0 => __DIR__ . '/..' . '/fusesource/stomp-php/src',
-),
-),
 'C' => 
 array (
 'Clio' => 
diff --git a/composer/installed.json b/composer/installed.json
index d062fd9..c947a30 100644
--- a/composer/installed.json
+++ b/composer/installed.json
@@ -83,58 +83,6 @@
 ]
 },
 {
-"name": "fusesource/stomp-php",
-"version": "2.1.1",
-"version_normalized": "2.1.1.0",
-"source": {
-"type": "git",
-"url": "https://github.com/dejanb/stomp-php.git";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c"
-},
-"dist": {
-"type": "zip",
-"url": 
"https://api.github.com/repos/dejanb/stomp-php/zipball/4ac51c0abee05078e198faf13f48c056a72f8f8c";,
-"reference": "4ac51c0abee05078e198faf13f48c056a72f8f8c",
-"shasum": ""
-},
-"require": {
-"php": ">=5.3.0"
-},
-"time": "2013-02-23 17:34:44",
-"type": "library",
-"installation-source": "dist",
-"autoload": {
-"psr-0": {
-"FuseSource": "src/"
-}
-},
-"notification-url": "https://packagist.org/downloads/";,
-"license": [
-"Apache-2.0"
-],
-"authors": [
-{
-"name": "Dejan Bosnanac",
-"email": "de...@nighttale.net",
-"homepage": "http://www.nighttale.net";
-},
-{
-"name": "Sören Rohweder",
-"email": "s.rohwe...@blage.net",
-"homepage": "http://www.monofone.de";
-}
-],
-"description": "stomp support for PHP",
-"homepage": "http://github.com/dejanb/stomp-php";,
-"keywords": [
-"activeMQ",
-"jms",
-

[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332541 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: I1c66bef3e3b043ec1a2357be6658a3056c232cb6
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/41/332541/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 3dab87f..e7abdbe 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 3dab87fc01af9cae8d95b4f47949054374588a52
+Subproject commit e7abdbefcdca14158e3b4e79beeb5b7e00ab109b

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1c66bef3e3b043ec1a2357be6658a3056c232cb6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-01-17 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/332539 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

257e9cf Localisation updates from https://translatewiki.net.
dfafc32 Remove duplicate key from i18n json files
c186674 Localisation updates from https://translatewiki.net.
bbbc5f7 Localisation updates from https://translatewiki.net.
97f4b9f Localisation updates from https://translatewiki.net.
b7213ab Use more specific error messages
c8cfc6d Add more 'try again' errors for globalcollect
7bdbd15 Localisation updates from https://translatewiki.net.
e77a80a Localisation updates from https://translatewiki.net.
5ed7026 Less overloaded processResponse

Change-Id: I5f0331c872dfe0239161bc64530f90821731a324
---
D tests/phpunit/Adapter/AstroPay/AstroPayTest.php
D tests/phpunit/includes/test_gateway/TestingGenericAdapter.php
2 files changed, 0 insertions(+), 666 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/39/332539/1

diff --git a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php 
b/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
deleted file mode 100644
index dedc51a..000
--- a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
+++ /dev/null
@@ -1,549 +0,0 @@
-<<< HEAD   (3dab87 Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAstroPayAdapter';
-   }
-
-   function setUp() {
-   parent::setUp();
-   $this->setMwGlobals( array(
-   'wgAstroPayGatewayEnabled' => true,
-   ) );
-   }
-
-   /**
-* Ensure we're setting the right url for each transaction
-* @covers AstroPayAdapter::getCurlBaseOpts
-*/
-   function testCurlUrl() {
-   $init = $this->getDonorTestData( 'BR' );
-   $gateway = $this->getFreshGatewayObject( $init );
-   $gateway->setCurrentTransaction( 'NewInvoice' );
-
-   $result = $gateway->getCurlBaseOpts();
-
-   $this->assertEquals(
-   
'https://sandbox.astropay.example.com/api_curl/streamline/NewInvoice',
-   $result[CURLOPT_URL],
-   'Not setting URL to transaction-specific value.'
-   );
-   }
-
-   /**
-* Test the NewInvoice transaction is making a sane request and signing
-* it correctly
-*/
-   function testNewInvoiceRequest() {
-   $init = $this->getDonorTestData( 'BR' );
-   $session['Donor']['order_id'] = '123456789';
-   $this->setUpRequest( $init, $session );
-   $this->setLanguage( $init['language'] );
-   $gateway = new TestingAstroPayAdapter();
-
-   $gateway->do_transaction( 'NewInvoice' );
-   parse_str( $gateway->curled[0], $actual );
-
-   $expected = array(
-   'x_login' => 'createlogin',
-   'x_trans_key' => 'createpass',
-   'x_invoice' => '123456789',
-   'x_amount' => '100.00',
-   'x_currency' => 'BRL',
-   'x_bank' => 'TE',
-   'x_country' => 'BR',
-   'x_description' => wfMessage( 
'donate_interface-donation-description' )->inLanguage( $init['language'] 
)->text(),
-   'x_iduser' => 'nob...@example.org',
-   'x_cpf' => '3456789',
-   'x_name' => 'Nome Apelido',
-   'x_email' => 'nob...@example.org',
-   // 'x_address' => 'Rua Falso 123',
-   // 'x_zip' => '01110-111',
-   // 'x_city' => 'São Paulo',
-   // 'x_state' => 'SP',
-   'control' => 
'AC43664E0C4DF30607A26F271C8998BC4EE26511366E65AFB69B96E89BFD4359',
-   'type' => 'json',
-   );
-   $this->assertEquals( $expected, $actual, 'NewInvoice is not 
including the right parameters' );
-   }
-
-   /**
-* When AstroPay sends back valid JSON with status "0", we should set 
txn
-* status to true and errors should be empty.
-*/
-   function testStatusNoErrors() {
-   $init = $this->getDonorTestData( 'BR' );
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $gateway->do_transaction( 'NewInvoice' );
-
-   $this->assertEquals( true, $gateway->getTransactionStatus(),
-   'Transaction status should be true for code "0"' );
-
-   $this->assertEmpty( $gateway->getTransactionErrors(),
-   'Transaction errors should be empty for code "0"' );
-   }
-
-   /**
-* If astropay sends back non-JSON, communic

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Fix missing ct_id recovery

2017-01-11 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331823 )

Change subject: Fix missing ct_id recovery
..

Fix missing ct_id recovery

We were returning a blank when there were no ct_ids on any associated
contributions. Don't return early if empty, and let the existing
backfill logic do its job.

Bug: T147873
Change-Id: Id6a9374260d6bbc4b73df90e3924cb6f38c6f198
---
M sites/all/modules/queue2civicrm/recurring/recurring.module
M sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
M sites/all/modules/wmf_civicrm/tracking.inc
3 files changed, 23 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/23/331823/1

diff --git a/sites/all/modules/queue2civicrm/recurring/recurring.module 
b/sites/all/modules/queue2civicrm/recurring/recurring.module
index 4b6588b..106e2b7 100644
--- a/sites/all/modules/queue2civicrm/recurring/recurring.module
+++ b/sites/all/modules/queue2civicrm/recurring/recurring.module
@@ -167,8 +167,10 @@
 $query = "SELECT id FROM {contribution_tracking} WHERE contribution_id 
IN ( {$id_list} )";
 // we can use this related contribution tracking id
 $contribution_tracking_id = db_query( $query )->fetchField();
-watchdog( 'recurring', 'recurring_get_contribution_tracking_id: 
Selected contrib tracking id from past contributions, %cti', array( '%cti' => 
$contribution_tracking_id ), WATCHDOG_DEBUG );
-return $contribution_tracking_id;
+if ( !empty( $contribution_tracking_id ) ) {
+  watchdog( 'recurring', 'recurring_get_contribution_tracking_id: 
Selected contrib tracking id from past contributions, %cti', array( '%cti' => 
$contribution_tracking_id ), WATCHDOG_DEBUG );
+  return $contribution_tracking_id;
+}
   }
 }
 
diff --git 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
index 7bfada8..fcc4d59 100644
--- 
a/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
+++ 
b/sites/all/modules/recurring_globalcollect/tests/RecurringGlobalCollectTest.php
@@ -186,4 +186,22 @@
$this->assertTrue( $result->getCommunicationStatus() );
$this->assertRegExp( '/SET_PAYMENT/', $result->getRawResponse() 
);
}
+
+   /**
+* Recover from missing ct_ids on all associated contributions
+*/
+   public function testBackfillContributionTracking() {
+   $id_list = implode( ',', $this->contributions );
+
+   $dbs = wmf_civicrm_get_dbs();
+   $dbs->push( 'donations' );
+   $query = "DELETE FROM {contribution_tracking} WHERE 
contribution_id IN( $id_list )";
+   db_query( $query );
+   $contribution_tracking_id = 
recurring_get_contribution_tracking_id( array(
+   'txn_type' => 'subscr_payment',
+   'subscr_id' => $this->subscriptionId,
+   'payment_date' => strtotime( "now" ),
+   ) );
+   $this->assertNotEmpty( $contribution_tracking_id );
+   }
 }
diff --git a/sites/all/modules/wmf_civicrm/tracking.inc 
b/sites/all/modules/wmf_civicrm/tracking.inc
index 178af4f..6d7739c 100644
--- a/sites/all/modules/wmf_civicrm/tracking.inc
+++ b/sites/all/modules/wmf_civicrm/tracking.inc
@@ -7,7 +7,7 @@
  * particular transaction.  Rare, but inserting some data for a trxn when
  * absent helps facilitate better analytics.
  * 
- * @return the contribution_tracking id 
+ * @return int the contribution_tracking id
  */
 function wmf_civicrm_insert_contribution_tracking( $utm_source, $utm_medium, 
$utm_campaign, $ts, $contrib_id=null, $optout=null, $anonymous=null ) {
 // make sure we're using the default (drupal) db

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id6a9374260d6bbc4b73df90e3924cb6f38c6f198
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Migrate 'EmptyQueueToDump' script off Stomp

2017-01-10 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331506 )

Change subject: Migrate 'EmptyQueueToDump' script off Stomp
..

Migrate 'EmptyQueueToDump' script off Stomp

Move the write logic into a simple BaseQueueConsumer subclass.

Bug: T131274
Change-Id: Ib7e0bdc3546705ef4b0e37e8aa1de4d0d8d1328a
---
A Core/QueueConsumers/QueueFileDumper.php
M Maintenance/EmptyQueueToDump.php
2 files changed, 36 insertions(+), 63 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/06/331506/1

diff --git a/Core/QueueConsumers/QueueFileDumper.php 
b/Core/QueueConsumers/QueueFileDumper.php
new file mode 100644
index 000..d0f1e4b
--- /dev/null
+++ b/Core/QueueConsumers/QueueFileDumper.php
@@ -0,0 +1,28 @@
+file = fopen( $filename, 'a' );
+   }
+
+   public function processMessage( $message ) {
+   fwrite( $this->file, json_encode( $message, true ) . '\n' );
+   }
+
+   public function __destruct() {
+   fclose( $this->file );
+   }
+}
diff --git a/Maintenance/EmptyQueueToDump.php b/Maintenance/EmptyQueueToDump.php
index 6440a42..615bc1b 100644
--- a/Maintenance/EmptyQueueToDump.php
+++ b/Maintenance/EmptyQueueToDump.php
@@ -2,20 +2,14 @@
 
 require ( 'MaintenanceBase.php' );
 
-use SmashPig\Core\DataStores\DataSerializationException;
+use SmashPig\Core\QueueConsumers\QueueFileDumper;
 use SmashPig\Core\Logging\Logger;
-use SmashPig\Core\DataStores\StompDataStore;
 
 $maintClass = '\SmashPig\Maintenance\EmptyQueueToDump';
 
 /**
  * Script to empty out a queue backing store into a file. Objects are not kept
  * in the queue after dumping.
- *
- * Selectors must be specified when dumping. A selector is a SQL like statement
- * such as 'gateway=adyen'. In general selectors only work on the contents of
- * headers and should only be text. Numeric selectors MAY work but it's
- * protocol and version specific.
  *
  * @package SmashPig\Maintenance
  */
@@ -28,71 +22,22 @@
$this->addOption( 'queue', 'queue name to consume from', 'test' 
);
$this->addOption( 'max-messages', 'At most consume  
messages, 0 is infinite', 10, 'm' );
$this->addOption( 'outfile', 'File to place JSON encoded 
messages into', 'messages.json', 'f' );
-   $this->addOption( 'raw', 'Do not ensure that extracted messages 
are SmashPig objects' );
-   $this->addOption( 'no-ack', 'Do not ack messages - leave them 
in the queue' );
-   $this->addArgument( 'selector', 'STOMP selector to use', false 
);
-   $this->addArgument( 'selector2', 'Additional STOMP 
selectors...', false );
}
 
/**
 * Do the actual work of the script.
 */
public function execute() {
-   $this->datastore = new StompDataStore( $this->getOption( 
'queue' ) );
-
-   $maxMessages = $this->getOption( 'max-messages' );
-   $startTime = time();
-   $messageCount = 0;
-
-   $raw = $this->getOption( 'raw' );
-   $ignore = $this->getOption( 'no-ack' );
-
-   // Construct the selectors
-   $argId = 0;
-   $selectors = array();
-   while ( $this->hasArgument( $argId ) ) {
-   $selectors[] = $this->getArgument( $argId );
-   $argId += 1;
-   }
-
-   // Open the file for write-append
$outfile = $this->getOption( 'outfile' );
-   $f = fopen( $outfile, 'a' );
-   if ( !$f ) {
-   $this->error( "Could not open $outfile for write 
append", true );
-   }
 
-   // Do the loop!
-   do {
-   // This is actually quite inefficient; but this whole 
thing is a hack so meh!
-   // ...Ideally we would take the JSON from the store 
directly instead of walking
-   // it through an object
-   try {
-   $queueObj = $this->datastore->queueGetObject( 
null, null, $selectors, !$raw );
+   $consumer = new QueueFileDumper(
+   $this->getOption( 'queue' ),
+   $this->getOption( 'max-messages' ),
+   $outfile
+   );
 
-   if ( !$queueObj ) {
-   break;
-   }
-
-   if ( $raw ) {
-   fwrite( $f, 'raw' . "=" . json_encode( 
$queueObj ) . "\n" );
-   } else {
-   fwrite( $f, get_class( $queueObj ) . 
"=" . $queueObj->toJson( false ) . "\n" );
-   }
-   } catch ( DataSerializationExcep

[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Little cleanups to large donation notifier

2017-01-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331373 )

Change subject: Little cleanups to large donation notifier
..

Little cleanups to large donation notifier

Oops, I submitted this to deployment (and it got merged)

Change-Id: Ib7634ab6c32426aa2c8f61101d1d1393d7373626
---
M sites/all/modules/large_donation/large_donation.module
1 file changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/73/331373/1

diff --git a/sites/all/modules/large_donation/large_donation.module 
b/sites/all/modules/large_donation/large_donation.module
index 38bb9a6..eeaa051 100644
--- a/sites/all/modules/large_donation/large_donation.module
+++ b/sites/all/modules/large_donation/large_donation.module
@@ -196,7 +196,7 @@
  *
  * No personally identifiable information should be included.
  *
- * @param CRM_Contribution_BAO_Contribution $contribution
+ * @param CRM_Contribute_BAO_Contribution $contribution
  * @param stdClass $notification
  */
 function large_donation_notification_send( $contribution, $notification ) {
@@ -238,13 +238,8 @@
 'html' => $message,
 );
 $mailer->send( $email );
-
-$email_success = true;
+   watchdog('large_donation', 'A large donation notification was 
sent to: ' . print_r( $to, true ) );
 } catch ( Exception $e ) {
-watchdog('large_donation', 'Sending large donation message failed for 
contribution: ' . $contribution_id . '' . 
check_plain(print_r($contribution, TRUE)) . "\n\n" . $e->getMessage() . 
'', array(), WATCHDOG_ERROR);
-}
-
-if ( $email_success ) {
-watchdog('large_donation', 'A large donation notification was sent to: 
' . print_r( $to, true ) );
+watchdog('large_donation', 'Sending large donation message failed for 
contribution: ' . $contribution->id . '' . 
check_plain(print_r($contribution, TRUE)) . "\n\n" . $e->getMessage() . 
'', array(), WATCHDOG_ERROR);
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7634ab6c32426aa2c8f61101d1d1393d7373626
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...crm[master]: Only send failmail when refund difference is > 2%

2017-01-09 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/331372 )

Change subject: Only send failmail when refund difference is > 2%
..

Only send failmail when refund difference is > 2%

Change-Id: I900a22947fb149e4528f11464896c4c504804528
---
M sites/all/modules/wmf_civicrm/wmf_civicrm.module
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/72/331372/1

diff --git a/sites/all/modules/wmf_civicrm/wmf_civicrm.module 
b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
index 559ca66..7fe3d79 100644
--- a/sites/all/modules/wmf_civicrm/wmf_civicrm.module
+++ b/sites/all/modules/wmf_civicrm/wmf_civicrm.module
@@ -2163,7 +2163,7 @@
 }
 }
 
-if ($amount_scammed > 0) {
+if ($amount_scammed > 0.02 * $original_amount) {
   wmf_common_failmail('wmf_civicrm', "Refund amount mismatch for : 
$contribution_id, difference is {$amount_scammed}. See "
 . CRM_Utils_System::url('civicrm/contact/view/contribution', 
array('reset' => 1, 'id' => $contribution_id, 'action' => 'view'), TRUE));
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I900a22947fb149e4528f11464896c4c504804528
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Get rid of the rest of the !important modifiers in forms.css

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330742 )

Change subject: Get rid of the rest of the !important modifiers in forms.css
..

Get rid of the rest of the !important modifiers in forms.css

FIXME: still something wrong with card alignment in mobile

Except the one that we need to push the form up the page, and
the one that hides things.

Change-Id: I5ce8985001b685221f71e73dfd9ce6dd6da32153
---
M gateway_forms/mustache/forms.css
1 file changed, 47 insertions(+), 48 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/42/330742/1

diff --git a/gateway_forms/mustache/forms.css b/gateway_forms/mustache/forms.css
index 1f9882f..0cf91d5 100644
--- a/gateway_forms/mustache/forms.css
+++ b/gateway_forms/mustache/forms.css
@@ -2,7 +2,6 @@
max-width: 100px;
 }
 div#payment_gateway-donate-submessage {
-   font-size: 90%;
line-height: 120%;
 }
 div#payment_gateway-donate-submessage img {
@@ -54,14 +53,14 @@
background-color: transparent;
 }
 div#content {
-   background-color: transparent !important;
-   background-image: none !important;
+   background-color: transparent;
+   background-image: none;
 }
 div#mw-head-base {
-   background-image: none !important;
+   background-image: none;
 }
 #footer {
-   background-image: none !important;
+   background-image: none;
 }
 
 /* Hiding stuff we don't need */
@@ -71,8 +70,8 @@
 
 /* NEW STUFF */
 ul#moreinfolinks li{
-list-style: none !important;
-list-style-image: none !important;
+list-style: none;
+list-style-image: none;
 }
 .form .options-h {
 margin: 0;
@@ -120,17 +119,17 @@
 opacity: 1;
 }
 #donate {
-  min-width: 32em !important;
-  padding: 1em !important;
+  min-width: 32em;
+  padding: 1em;
 }
 
 
 #greenBackground {
-  background-color: #e2e2e2 !important;
-  position: relative !important;
-  padding: 1.6em !important;
-  border: 0 !important;
-  width: auto !important;
+  background-color: #e2e2e2;
+  position: relative;
+  padding: 1.6em;
+  border: 0;
+  width: auto;
 }
 
 #greenBackground:before {
@@ -183,8 +182,8 @@
 margin-left: 8px;
 }
 
-div.donor { width: auto !important; }
-div.donor { width: 100% !important; }
+div.donor { width: auto; }
+div.donor { width: 100%; }
 
 #payment-table-donor input[type="text"],
 #payment-table-donor input[type="number"],
@@ -192,7 +191,7 @@
 #payment-table-donor input[type="email"],
 #payment-table-donor select {
   background-color: #f6f6f6;
-  padding: 1em !important;
+  padding: 1em;
   -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, 
.1);
   -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 
0, .1);
   box-shadow: 0 1px 1px rgba(0, 0, 0, .2), inset 0 0 0 1px rgba(0, 0, 0, .1);
@@ -227,7 +226,7 @@
   box-shadow: inset 0 1px 3px rgba(0,0,1,.5), inset 0 0 0 1px rgba(0,0,0,.1);
 }
 
-#payment-table-donor select { padding: .9em 1em !important; line-height: 40px; 
}
+#payment-table-donor select { padding: .9em 1em; line-height: 40px; }
 
 #amount_input * {
 vertical-align: top;
@@ -239,7 +238,7 @@
 
 .mw-donate-submessage {
   text-transform: uppercase;
-  font-size: .75em !important;
+  font-size: 0.75em;
   color: #7c7c7c;
   text-align: center;
 }
@@ -256,7 +255,7 @@
 #cards:after { clear: both; }
 #cards li {
 background: #d1d1d1;
-margin: 0 .7% .7% 0 !important;
+margin: 0 .7% .7% 0;
 float: left;
 text-align: center;
 -moz-border-radius: 4px;
@@ -298,8 +297,8 @@
 #cards li input {
 display: block;
 width: 100%;
-margin: 0 0 .7em !important;
-box-shadow: none !important;
+margin: 0 0 .7em;
+box-shadow: none;
 }
 #cards li label {
 cursor: pointer;
@@ -307,20 +306,20 @@
 display: block;
 }
 #cards li label img {
-margin: 0 auto !important;
-height: auto !important;
+margin: 0 auto;
+height: auto;
 }
 #cards li.has_sub_text label {
 margin-top: 0;
 }
 #cards li.has_sub_text input {
-margin-bottom: 0.1em !important;
+margin-bottom: 0.1em;
 }
 #cards li label p.card_sub_text {
 margin: -0.5em auto;
 }
 #paymentContinue, #paymentSubmit {
-  margin-top: 1em !important;
+  margin-top: 1em;
   clear: both;
   display: none;
 }
@@ -328,21 +327,21 @@
 display:block;
 }
 .btn {
-  background-color: #757575 !important;
-  color: #fff !important;
+  background-color: #757575;
+  color: #fff;
   width: 100%;
   text-transform: uppercase;
   font-size: 1.3em;
   -moz-border-radius: 4px;
   -webkit-border-radius: 4px;
   border-radius: 4px;
-  padding: .6em !important;
+  padding: .6em;
 }
 .btn.enabled {
-  background-color: #367fb4 !important;
+  background-color: #367fb4;
   cursor: pointer;
 }
-.btn.enabled:hover { background-color: #1d5278 !important; }
+.btn.enabled:hover { background-color: #1d5278; }
 .btn:active {
   -moz-

[MediaWiki-commits] [Gerrit] mediawiki/core[fundraising/REL1_27]: Update DonationInterface submodule

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330734 )

Change subject: Update DonationInterface submodule
..

Update DonationInterface submodule

Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
---
M extensions/DonationInterface
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/34/330734/1

diff --git a/extensions/DonationInterface b/extensions/DonationInterface
index 5edaa17..3dab87f 16
--- a/extensions/DonationInterface
+++ b/extensions/DonationInterface
@@ -1 +1 @@
-Subproject commit 5edaa173de13b1a5227915af2fb630d3a5699b9e
+Subproject commit 3dab87fc01af9cae8d95b4f47949054374588a52

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I00cd30b5c83ecd6ddc34db5119399b6cf52ddc05
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: fundraising/REL1_27
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2017-01-05 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330733 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

05c6cf9 Remove donationinterface-desc from extension.json
aa270db Rename 'zip' to 'postal_code'

Change-Id: I072225b0602fae6c6fbf1e63d24a31b70780949e
---
D tests/phpunit/Adapter/Adyen/AdyenTest.php
D tests/phpunit/Adapter/GatewayAdapterTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectFormLoadTest.php
D tests/phpunit/Adapter/GlobalCollect/GlobalCollectTest.php
D tests/phpunit/DonationDataTest.php
D tests/phpunit/DonationInterfaceTestCase.php
D tests/phpunit/DonationQueueTest.php
D tests/phpunit/GatewayPageTest.php
D tests/phpunit/LoggingTest.php
9 files changed, 0 insertions(+), 2,994 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/33/330733/1

diff --git a/tests/phpunit/Adapter/Adyen/AdyenTest.php 
b/tests/phpunit/Adapter/Adyen/AdyenTest.php
deleted file mode 100644
index c2763b2..000
--- a/tests/phpunit/Adapter/Adyen/AdyenTest.php
+++ /dev/null
@@ -1,157 +0,0 @@
-<<< HEAD   (5edaa1 Merge branch 'master' into deployment)
-===
-testAdapterClass = 'TestingAdyenAdapter';
-   }
-
-   public function setUp() {
-   parent::setUp();
-
-   $this->setMwGlobals( array(
-   'wgAdyenGatewayEnabled' => true,
-   ) );
-   }
-
-   /**
-* Integration test to verify that the donate transaction works as 
expected when all necessary data is present.
-*/
-   function testDoTransactionDonate() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $gateway->do_transaction( 'donate' );
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $ret = $exposed->buildRequestParams();
-
-   $expected = array (
-   'allowedMethods' => 'card',
-   'billingAddress.street' => $init['street'],
-   'billingAddress.city' => $init['city'],
-   'billingAddress.postalCode' => $init['postal_code'],
-   'billingAddress.stateOrProvince' => $init['state'],
-   'billingAddress.country' => $init['country'],
-   'billingAddress.houseNumberOrName' => 'NA',
-   'billingAddressType' => 2,
-   'card.cardHolderName' => $init['fname'] . ' ' . 
$init['lname'],
-   'currencyCode' => $init['currency_code'],
-   'merchantAccount' => 'wikitest',
-   'merchantReference' => $exposed->getData_Staged( 
'order_id' ),
-   'merchantSig' => $exposed->getData_Staged( 
'hpp_signature' ),
-   'paymentAmount' => ($init['amount']) * 100,
-// 'sessionValidity' => '2014-03-09T19:41:50+00:00',   
//commenting out, because this is a problem.
-// 'shipBeforeDate' => $exposed->getData_Staged( 
'expiration' ),   //this too.
-   'skinCode' => 'testskin',
-   'shopperLocale' => 'en_US',
-   'shopperEmail' => 'nob...@wikimedia.org',
-   'offset' => '52', //once we construct the 
FraudFiltersTestCase, it should land here.
-   );
-
-   //deal with problem keys.
-   //@TODO: Refactor gateway so these are more testable
-   $problems = array (
-   'sessionValidity',
-   'shipBeforeDate',
-   );
-
-   foreach ( $problems as $oneproblem ) {
-   if ( isset( $ret[$oneproblem] ) ) {
-   unset( $ret[$oneproblem] );
-   }
-   }
-
-   $this->assertEquals( $expected, $ret, 'Adyen "donate" 
transaction not constructing the expected redirect URL' );
-   $this->assertNotNull( $gateway->getData_Unstaged_Escaped( 
'order_id' ), "Adyen order_id is null, and we need one for 'merchantReference'" 
);
-   }
-
-   function testRiskScoreAddedToQueueMessage() {
-   $init = $this->getDonorTestData();
-   $gateway = $this->getFreshGatewayObject( $init );
-
-   $exposed = TestingAccessWrapper::newFromObject( $gateway );
-   $exposed->risk_score = 57;
-   $message = $exposed->getStompTransaction();
-   $this->assertEquals( 57, $message['risk_score'], 'Risk score 
was not correctly added to queue message.' );
-   }
-
-   /**
-* Make sure language is staged correctly when qs param is uppercase
-*/
-   function testLanguageCaseSensitivity() {
-   

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Update composer dependencies

2017-01-04 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330599 )

Change subject: Update composer dependencies
..

Update composer dependencies

Change-Id: If720e9e977eabeaf7d204f8a0200d821d8ce3a30
---
M composer.lock
1 file changed, 111 insertions(+), 101 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/99/330599/1

diff --git a/composer.lock b/composer.lock
index 77d3ed8..5494827 100644
--- a/composer.lock
+++ b/composer.lock
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
+"reference": "d56c5bd69dad595f2e00a3e10c851736b1feb57b"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-08-05 19:16:32"
+"time": "2017-01-04 21:01:15"
 },
 {
 "name": "ircmaxell/password-compat",
@@ -195,16 +195,16 @@
 },
 {
 "name": "monolog/monolog",
-"version": "1.21.0",
+"version": "1.22.0",
 "source": {
 "type": "git",
 "url": "https://github.com/Seldaek/monolog.git";,
-"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952"
+"reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952";,
-"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952",
+"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558";,
+"reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
 "shasum": ""
 },
 "require": {
@@ -215,7 +215,7 @@
 "psr/log-implementation": "1.0.0"
 },
 "require-dev": {
-"aws/aws-sdk-php": "^2.4.9",
+"aws/aws-sdk-php": "^2.4.9 || ^3.0",
 "doctrine/couchdb": "~1.0@dev",
 "graylog2/gelf-php": "~1.0",
 "jakub-onderka/php-parallel-lint": "0.9",
@@ -269,7 +269,7 @@
 "logging",
 "psr-3"
 ],
-"time": "2016-07-29 03:23:52"
+"time": "2016-11-26 00:15:39"
 },
 {
 "name": "phpmailer/phpmailer",
@@ -383,22 +383,30 @@
 },
 {
 "name": "psr/log",
-"version": "1.0.0",
+"version": "1.0.2",
 "source": {
 "type": "git",
 "url": "https://github.com/php-fig/log.git";,
-"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
+"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b";,
-"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
+"url": 
"https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d";,
+"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
 "shasum": ""
 },
+"require": {
+"php": ">=5.3.0"
+},
 "type": "library",
+"extra": {
+"branch-alias": {
+"dev-master": "1.0.x-dev"
+}
+},
 "autoload": {
-"psr-0": {
-"Psr\\Log\\": ""
+"psr-4": {
+"Psr\\Log\\": "Psr/Log/"
 }
 },
 "notification-url": "https://packagist.org/downloads/";,
@@ -412,25 +420,26 @@
 }
 ],
 "description": "Common interface for logging libraries",
+"homepage": "https://github.com/php-fig/log";,
 "keywords": [
 "log",
 "psr",
 "psr-3"
 ],
-"time": "2012-12-21 11:40:51"
+"time": "2016-10-10 12:19:37"
 },
 {
 "name": "symfony/event-dispatcher",
-"version": "v2.8.9",
+"version": "v2.8.15",
 "source": {
 "type": "git",
 "url": "https://github.com/symfony/event-dispatcher.git";,
-"reference": "889983a79a043dfda68f38c38b6dba092dd49cd8"
+"reference"

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Erase Stomp

2017-01-04 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330591 )

Change subject: Erase Stomp
..

Erase Stomp

FIXME: update EmptyQueueToDump maintenance script

TODO: get rid of MultiQueueWriter bits and -new queue suffixes
Probably can also simplify the silly keyedOpaqueBlah stuff

Change-Id: Ib66753c3a03a29613309a779f64bcc2f3c17cbd1
---
D Core/DataStores/StompDataStore.php
D Maintenance/StompJobRunner.php
M PaymentProviders/Adyen/Tests/faker/README
M SmashPig.yaml
M composer.json
M composer.lock
6 files changed, 1 insertion(+), 650 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/91/330591/1

diff --git a/Core/DataStores/StompDataStore.php 
b/Core/DataStores/StompDataStore.php
deleted file mode 100644
index d5da70e..000
--- a/Core/DataStores/StompDataStore.php
+++ /dev/null
@@ -1,485 +0,0 @@
-getConfiguration();
-
-   // Configuration sanity checks
-   if ( !$c->nodeExists( "data-store/stomp/queues/{$queueName}" ) 
) {
-   throw new DataStoreException( "STOMP data store is 
unaware of a queue named '{$queueName}'" );
-   }
-   $this->queue_id = $c->val( 
"data-store/stomp/queues/{$queueName}" );
-
-   // Get some more configuration variables
-   $this->uri = $c->val( 'data-store/stomp/uri' );
-   $this->timeout = $c->val( 'data-store/stomp/timeout' );
-   $this->refreshConnection = $c->val( 
'data-store/stomp/refresh-connection' );
-   $this->convertStringExpressions = $c->val( 
'data-store/stomp/convert-string-expressions' );
-
-   // Start the connection
-   $this->createBackingObject();
-   }
-
-   /**
-* Destroy the STOMP data store connection.
-*/
-   public function __destruct() {
-   $this->deleteSubscription();
-   }
-
-   /**
-* Creates the STOMP store backing object.
-*/
-   protected function createBackingObject() {
-   Logger::debug( "Attempting connection to STOMP server 
'{$this->uri}'" );
-   $this->stompObj = new Stomp( $this->uri );
-   if ( method_exists( $this->stompObj, 'connect' ) ) {
-   $this->stompObj->connect();
-   }
-   Logger::debug( "STOMP server connection success." );
-
-   // Post connection configuration
-   $this->stompObj->setReadTimeout( $this->timeout );
-   }
-
-   /**
-* Adds an object to the persistent data store.
-*
-* @param KeyedOpaqueStorableObject $obj
-*
-* @throws DataStoreException if the message could not be stored.
-* @return null
-*/
-   public function addObject( KeyedOpaqueStorableObject $obj ) {
-   $objClass = get_class( $obj );
-
-   $objKeys = $obj->getObjectKeys();
-
-   if ( !array_key_exists( 'correlationId', $objKeys ) ) {
-   throw new DataStoreException(
-   "Required property correlationId was not 
exposed when adding object of type $objClass."
-   );
-   }
-
-   $headers = array(
-   'persistent'=> 'true', // So the message 
doesn't disappear when the server restarts
-   'php-message-class' => $objClass, // Sneakyness! No 
parameter can have '-' in it's name so this is safe!
-
-   'source_name' => "SmashPig",
-   'source_type' => "listener",
-   'source_host' => gethostname(),
-   'source_run_id' => getmypid(),
-   'source_version' => Context::get()->getSourceRevision(),
-   'source_enqueued_time' => time(),
-   );
-
-   // Populate with custom keys
-   foreach ( $objKeys as $keyName => $keyValue ) {
-   if ( $keyName == 'correlationId' ) {
-   $headers[ 'JMSCorrelationID' ] = $keyValue;
-   } else {
-   $headers[ $keyName ] = $keyValue;
-   }
-   }
-
-   // Push the object to the queue!
-   $bodyJson = $obj->toJson();
-   try {
-   $this->addObjectRaw( $bodyJson, $headers );
-   } catch ( DataStoreException $ex ) {
-   Logger::error(
-   "Could not queue message ({$objClass}) with id 
'{$objKeys[ 'correlationId' ]}' to '{$this->queue_id}' on '{$this->uri}'",
-   $bodyJson
-   );
-   throw $ex;
-   }
-   }
-
-   /**
-* Function to inject a raw messag

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: WIP less overloaded processResponse

2017-01-04 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330580 )

Change subject: WIP less overloaded processResponse
..

WIP less overloaded processResponse

processResponse should be for doing stuff with responses to API calls

new function processDonorReturn is for doing stuff when the donor
hits the resultSwitcher

Bug: 153972
Change-Id: I275b91068374387bd623c10c8234a3d122ae4344
---
M adyen_gateway/adyen.adapter.php
M astropay_gateway/astropay.adapter.php
M astropay_gateway/astropay_resultswitcher.body.php
M gateway_common/GatewayPage.php
M gateway_common/GatewayType.php
M gateway_common/gateway.adapter.php
6 files changed, 50 insertions(+), 40 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/80/330580/1

diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index fadcc3f..52ddeff 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -217,23 +217,22 @@
}
 
/**
-* For Adyen, we only call this on the donor's return to the 
ResultSwitcher
-* @param array $response GET/POST params from request
+* @param array $requestValues GET/POST params from request
 * @throws ResponseProcessingException
 */
-   public function processResponse( $response ) {
+   public function processDonorReturn( $requestValues ) {
// Always called outside do_transaction, so just make a new 
response object
$this->transaction_response = new PaymentTransactionResponse();
-   if ( empty( $response ) ) {
+   if ( empty( $requestValues ) ) {
$this->logger->info( "No response from gateway" );
throw new ResponseProcessingException(
'No response from gateway',
ResponseCodes::NO_RESPONSE
);
}
-   $this->logger->info( "Processing user return data: " . print_r( 
$response, TRUE ) );
+   $this->logger->info( "Processing user return data: " . print_r( 
$requestValues, TRUE ) );
 
-   if ( !$this->checkResponseSignature( $response ) ) {
+   if ( !$this->checkResponseSignature( $requestValues ) ) {
$this->logger->info( "Bad signature in response" );
throw new ResponseProcessingException(
'Bad signature in response',
@@ -244,14 +243,14 @@
 
// Overwrite the order ID we have with the return data, in case 
the
// donor opened a second window.
-   $orderId = $response['merchantReference'];
+   $orderId = $requestValues['merchantReference'];
$this->addRequestData( array(
'order_id' => $orderId,
) );
-   $gateway_txn_id = isset( $response['pspReference'] ) ? 
$response['pspReference'] : '';
+   $gateway_txn_id = isset( $requestValues['pspReference'] ) ? 
$requestValues['pspReference'] : '';
$this->transaction_response->setGatewayTransactionId( 
$gateway_txn_id );
 
-   $result_code = isset( $response['authResult'] ) ? 
$response['authResult'] : '';
+   $result_code = isset( $requestValues['authResult'] ) ? 
$requestValues['authResult'] : '';
if ( $result_code == 'PENDING' || $result_code == 'AUTHORISED' 
) {
// Both of these are listed as pending because we have 
to submit a capture
// request on 'AUTHORIZATION' ipn message receipt.
@@ -274,7 +273,7 @@
}
else {
$this->finalizeInternalStatus( FinalStatus::FAILED );
-   $this->logger->info( "Negative response from gateway. 
Full response: " . print_r( $response, TRUE ) );
+   $this->logger->info( "Negative response from gateway. 
Full response: " . print_r( $requestValues, TRUE ) );
}
$this->postProcessDonation();
}
diff --git a/astropay_gateway/astropay.adapter.php 
b/astropay_gateway/astropay.adapter.php
index da6b8c8..0dd6f9f 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -246,8 +246,7 @@
}
 
/**
-* Processes JSON data from AstroPay API, and also processes GET/POST 
params
-* on donor's return to ResultSwitcher
+* Processes JSON data from AstroPay API
 * @param array $response JSON response decoded to array, or GET/POST
 *params from request
 * @throws ResponseProcessingException
@@ -269,27 +268,6 @@
case 'PaymentStatus':
$this->processStatusResponse( $response );

[MediaWiki-commits] [Gerrit] wikimedia...crm[deployment]: Little cleanups to large donation notifier

2017-01-04 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330457 )

Change subject: Little cleanups to large donation notifier
..

Little cleanups to large donation notifier

Change-Id: Ib7634ab6c32426aa2c8f61101d1d1393d7373626
---
M sites/all/modules/large_donation/large_donation.module
1 file changed, 3 insertions(+), 8 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/crm 
refs/changes/57/330457/1

diff --git a/sites/all/modules/large_donation/large_donation.module 
b/sites/all/modules/large_donation/large_donation.module
index 38bb9a6..eeaa051 100644
--- a/sites/all/modules/large_donation/large_donation.module
+++ b/sites/all/modules/large_donation/large_donation.module
@@ -196,7 +196,7 @@
  *
  * No personally identifiable information should be included.
  *
- * @param CRM_Contribution_BAO_Contribution $contribution
+ * @param CRM_Contribute_BAO_Contribution $contribution
  * @param stdClass $notification
  */
 function large_donation_notification_send( $contribution, $notification ) {
@@ -238,13 +238,8 @@
 'html' => $message,
 );
 $mailer->send( $email );
-
-$email_success = true;
+   watchdog('large_donation', 'A large donation notification was 
sent to: ' . print_r( $to, true ) );
 } catch ( Exception $e ) {
-watchdog('large_donation', 'Sending large donation message failed for 
contribution: ' . $contribution_id . '' . 
check_plain(print_r($contribution, TRUE)) . "\n\n" . $e->getMessage() . 
'', array(), WATCHDOG_ERROR);
-}
-
-if ( $email_success ) {
-watchdog('large_donation', 'A large donation notification was sent to: 
' . print_r( $to, true ) );
+watchdog('large_donation', 'Sending large donation message failed for 
contribution: ' . $contribution->id . '' . 
check_plain(print_r($contribution, TRUE)) . "\n\n" . $e->getMessage() . 
'', array(), WATCHDOG_ERROR);
 }
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7634ab6c32426aa2c8f61101d1d1393d7373626
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/crm
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...php-queue[master]: Fix JsonException extends statement

2017-01-03 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/330256 )

Change subject: Fix JsonException extends statement
..

Fix JsonException extends statement

Was extending non-existent class
\PHPQueue\Exception\PHPQueue\Exception\Exception

Change-Id: I11a57e964fb25af177a55eda509e2fa0e987abb3
---
M src/PHPQueue/Exception/JsonException.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/56/330256/1

diff --git a/src/PHPQueue/Exception/JsonException.php 
b/src/PHPQueue/Exception/JsonException.php
index 76ebd1e..2f825b7 100644
--- a/src/PHPQueue/Exception/JsonException.php
+++ b/src/PHPQueue/Exception/JsonException.php
@@ -4,6 +4,6 @@
 /**
  * Something bad with the JSON
  */
-class JsonException extends PHPQueue\Exception\Exception
+class JsonException extends Exception
 {
 }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I11a57e964fb25af177a55eda509e2fa0e987abb3
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Merge branch 'master' into deployment

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329535 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

And update vendor

e1e7c42 Localisation updates from https://translatewiki.net.
c4729eb Localisation updates from https://translatewiki.net.
951d084 Adyen iframe form fields should be white on mobile
ef776f2 Add 'maxlength' attributes to personal info fields
01069be Localisation updates from https://translatewiki.net.
65c6d0f Localisation updates from https://translatewiki.net.
2de0945 Localisation updates from https://translatewiki.net.
6823f20 update composer.lock
81061a5 Revert "update composer.lock"
4fca4ba Update (only) phpmailer in composer.lock

Change-Id: Ia975d6f47d1295fac02e2035f9f40e1ef55663bc
---
M composer.lock
M vendor
2 files changed, 53 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/35/329535/1

diff --git a/composer.lock b/composer.lock
index f1f8c44..e18e257 100644
--- a/composer.lock
+++ b/composer.lock
@@ -198,6 +198,7 @@
 "messaging",
 "stomp"
 ],
+"abandoned": "stomp-php/stomp-php",
 "time": "2013-02-23 17:34:44"
 },
 {
@@ -886,7 +887,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git";,
-"reference": "61f47be34b4c8ade307bf218b84c55966a8e4acb"
+"reference": "8625a3502c2f7f48b6ed0e388d95b35a6398ad9f"
 },
 "require": {
 "amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
@@ -937,7 +938,7 @@
 "donations",
 "payments"
 ],
-"time": "2016-09-15 00:32:38"
+"time": "2016-09-13 18:34:33"
 },
 {
 "name": "zordius/lightncandy",
@@ -987,7 +988,55 @@
 "time": "2015-11-05 07:14:57"
 }
 ],
-"packages-dev": null,
+"packages-dev": [
+{
+"name": "jakub-onderka/php-parallel-lint",
+"version": "v0.9.2",
+"source": {
+"type": "git",
+"url": "https://github.com/JakubOnderka/PHP-Parallel-Lint.git";,
+"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa"
+},
+"dist": {
+"type": "zip",
+"url": 
"https://api.github.com/repos/JakubOnderka/PHP-Parallel-Lint/zipball/2ead2e4043ab125bee9554f356e0a86742c2d4fa";,
+"reference": "2ead2e4043ab125bee9554f356e0a86742c2d4fa",
+"shasum": ""
+},
+"require": {
+"php": ">=5.3.3"
+},
+"require-dev": {
+"jakub-onderka/php-console-highlighter": "~0.3",
+"nette/tester": "~1.3"
+},
+"suggest": {
+"jakub-onderka/php-console-highlighter": "Highlight syntax in 
code snippet"
+},
+"bin": [
+"parallel-lint"
+],
+"type": "library",
+"autoload": {
+"classmap": [
+"./"
+]
+},
+"notification-url": "https://packagist.org/downloads/";,
+"license": [
+"BSD-2-Clause"
+],
+"authors": [
+{
+"name": "Jakub Onderka",
+"email": "jakub.onde...@gmail.com"
+}
+],
+"description": "This tool check syntax of PHP files about 20x 
faster than serial check.",
+"homepage": "https://github.com/JakubOnderka/PHP-Parallel-Lint";,
+"time": "2015-12-15 10:42:16"
+}
+],
 "aliases": [],
 "minimum-stability": "stable",
 "stability-flags": {
diff --git a/vendor b/vendor
index 4707185..78065ce 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit 470718556c34eb7bdfd6fe095f639c2bf035f438
+Subproject commit 78065ce486209a6c6ce1bbdc3263eef27564a26e

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia975d6f47d1295fac02e2035f9f40e1ef55663bc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...vendor[master]: Update phpmailer (and restore smash-pig)

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329534 )

Change subject: Update phpmailer (and restore smash-pig)
..

Update phpmailer (and restore smash-pig)

Make smash-pig match composer.lock

Change-Id: I83d210e8c9f8720e3fea22111b411e6f87df4053
---
M composer/LICENSE
M composer/autoload_classmap.php
M composer/installed.json
D phpmailer/phpmailer/.gitignore
D phpmailer/phpmailer/.scrutinizer.yml
D phpmailer/phpmailer/.travis.yml
D phpmailer/phpmailer/README.md
M phpmailer/phpmailer/VERSION
D phpmailer/phpmailer/changelog.md
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.phpmaileroauth.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
M phpmailer/phpmailer/composer.lock
D phpmailer/phpmailer/docs/Callback_function_notes.txt
D phpmailer/phpmailer/docs/DomainKeys_notes.txt
D phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt
D phpmailer/phpmailer/docs/extending.html
D phpmailer/phpmailer/docs/faq.html
D phpmailer/phpmailer/docs/generatedocs.sh
D phpmailer/phpmailer/docs/pop3_article.txt
M phpmailer/phpmailer/examples/scripts/shLegacy.js
M phpmailer/phpmailer/examples/smtp_check.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M phpmailer/phpmailer/extras/ntlm_sasl_client.php
R phpmailer/phpmailer/language/phpmailer.lang-cs.php
R phpmailer/phpmailer/language/phpmailer.lang-da.php
M phpmailer/phpmailer/language/phpmailer.lang-de.php
M phpmailer/phpmailer/language/phpmailer.lang-es.php
R phpmailer/phpmailer/language/phpmailer.lang-nb.php
R phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
M phpmailer/phpmailer/language/phpmailer.lang-ro.php
R phpmailer/phpmailer/language/phpmailer.lang-sv.php
D phpmailer/phpmailer/test/bootstrap.php
D phpmailer/phpmailer/test/fakepopserver.sh
D phpmailer/phpmailer/test/fakesendmail.sh
D phpmailer/phpmailer/test/phpmailerLangTest.php
D phpmailer/phpmailer/test/phpmailerTest.php
D phpmailer/phpmailer/test/runfakepopserver.sh
D phpmailer/phpmailer/test/test_callback.php
D phpmailer/phpmailer/test/testbootstrap-dist.php
D phpmailer/phpmailer/travis.phpunit.xml.dist
M wikimedia/smash-pig/Core/DataStores/PaymentsInitialDatabase.php
M wikimedia/smash-pig/Core/DataStores/PendingDatabase.php
M wikimedia/smash-pig/Core/Jobs/DeletePendingJob.php
M wikimedia/smash-pig/Core/Listeners/ListenerBase.php
M wikimedia/smash-pig/Core/QueueConsumers/PendingQueueConsumer.php
A wikimedia/smash-pig/CrmLink/Messages/DonationInterfaceAntifraud.php
D wikimedia/smash-pig/CrmLink/Messages/DonationInterfaceAntifraudFactory.php
M wikimedia/smash-pig/Maintenance/ConsumePendingQueue.php
M wikimedia/smash-pig/Maintenance/CreateIpnMessagesFromPendingDb.php
M wikimedia/smash-pig/Maintenance/MaintenanceBase.php
M wikimedia/smash-pig/PaymentProviders/Adyen/AdyenListener.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Jobs/ProcessCaptureRequestJob.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Tests/AdyenTestConfiguration.php
M wikimedia/smash-pig/PaymentProviders/Adyen/Tests/config_test.yaml
M wikimedia/smash-pig/PaymentProviders/Adyen/Tests/phpunit/CaptureJobTest.php
M 
wikimedia/smash-pig/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
M 
wikimedia/smash-pig/PaymentProviders/Amazon/ExpatriatedMessages/PaymentCapture.php
M 
wikimedia/smash-pig/PaymentProviders/AstroPay/ExpatriatedMessages/AstroPayMessage.php
M wikimedia/smash-pig/Schema/mysql/001_CreatePendingTable.sql
M wikimedia/smash-pig/Schema/mysql/002_CreateDamagedTable.sql
M wikimedia/smash-pig/Schema/mysql/003_CreatePaymentsInitialTable.sql
M wikimedia/smash-pig/Schema/sqlite/001_CreatePendingTable.sql
M wikimedia/smash-pig/Schema/sqlite/002_CreateDamagedTable.sql
M wikimedia/smash-pig/Schema/sqlite/003_CreatePaymentsInitialTable.sql
M wikimedia/smash-pig/SmashPig.yaml
M wikimedia/smash-pig/Tests/MessageTest.php
M wikimedia/smash-pig/Tests/PendingQueueConsumerTest.php
70 files changed, 874 insertions(+), 4,527 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface/vendor 
refs/changes/34/329534/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I83d210e8c9f8720e3fea22111b411e6f87df4053
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface/vendor
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Revert "update composer.lock"

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329532 )

Change subject: Revert "update composer.lock"
..

Revert "update composer.lock"

This reverts commit 6823f20b632bed4606cc1ce7e7d27e31b659fae9.

Change-Id: I31217c6f607a5f5f8c6d7e46a13c7a97091e6edf
---
M composer.lock
1 file changed, 57 insertions(+), 65 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/32/329532/1

diff --git a/composer.lock b/composer.lock
index 5cd945b..ea09d7f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "8e15cbf9a46ef58ceeadb9b359fee925291a0173"
+"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-10-17 23:39:02"
+"time": "2016-08-05 19:16:32"
 },
 {
 "name": "fusesource/stomp-php",
@@ -245,22 +245,23 @@
 },
 {
 "name": "minfraud/http",
-"version": "v1.71",
+"version": "v1.70",
 "source": {
 "type": "git",
 "url": "https://github.com/maxmind/ccfd-api-php.git";,
-"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e"
+"reference": "941e9345f9c237a253be8b908ecef951698a1a99"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/5f6c2a5454e755f1c56be17a1fc0c97576ff010e";,
-"reference": "5f6c2a5454e755f1c56be17a1fc0c97576ff010e",
+"url": 
"https://api.github.com/repos/maxmind/ccfd-api-php/zipball/941e9345f9c237a253be8b908ecef951698a1a99";,
+"reference": "941e9345f9c237a253be8b908ecef951698a1a99",
 "shasum": ""
 },
 "type": "library",
 "autoload": {
-"classmap": [
-"src"
+"files": [
+"src/HTTPBase.php",
+"src/CreditCardFraudDetection.php"
 ]
 },
 "notification-url": "https://packagist.org/downloads/";,
@@ -281,7 +282,7 @@
 "maxmind",
 "minfraud"
 ],
-"time": "2016-10-13 14:35:01"
+"time": "2015-07-21 14:49:48"
 },
 {
 "name": "monolog/monolog",
@@ -397,16 +398,16 @@
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.21",
+"version": "v5.2.16",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
+"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a";,
+"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a",
 "shasum": ""
 },
 "require": {
@@ -453,7 +454,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-12-28 15:35:48"
+"time": "2016-06-06 09:09:37"
 },
 {
 "name": "predis/predis",
@@ -507,30 +508,22 @@
 },
 {
 "name": "psr/log",
-"version": "1.0.2",
+"version": "1.0.0",
 "source": {
 "type": "git",
 "url": "https://github.com/php-fig/log.git";,
-"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d";,
-"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d",
+"url": 
"https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b";,
+"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b",
 "sha

[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[master]: Update (only) phpmailer in composer.lock

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329533 )

Change subject: Update (only) phpmailer in composer.lock
..

Update (only) phpmailer in composer.lock

Change-Id: I5c278d30816cec3f7fd0c912e9a4df4dadcd6a12
---
M composer.lock
1 file changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface 
refs/changes/33/329533/1

diff --git a/composer.lock b/composer.lock
index ea09d7f..e18e257 100644
--- a/composer.lock
+++ b/composer.lock
@@ -398,16 +398,16 @@
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.16",
+"version": "v5.2.21",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a"
+"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a";,
-"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
+"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
 "shasum": ""
 },
 "require": {
@@ -454,7 +454,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-06-06 09:09:37"
+"time": "2016-12-28 15:35:48"
 },
 {
 "name": "predis/predis",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5c278d30816cec3f7fd0c912e9a4df4dadcd6a12
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...php-queue[master]: Decoding null to null is not an error

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329531 )

Change subject: Decoding null to null is not an error
..

Decoding null to null is not an error

Quit throwing exceptions when the queue is empty.

Change-Id: Ie5479c81c0a6138e1cad416b40d3edabffb1e9c4
---
M src/PHPQueue/Json.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/php-queue 
refs/changes/31/329531/1

diff --git a/src/PHPQueue/Json.php b/src/PHPQueue/Json.php
index ad518ed..ed2e6d1 100644
--- a/src/PHPQueue/Json.php
+++ b/src/PHPQueue/Json.php
@@ -5,6 +5,9 @@
 
 class Json {
 public static function safe_decode( $text ) {
+if ( $text === null ) {
+return null;
+}
 $data = json_decode($text, true);
 if ( $data === null ) {
 throw new JsonException("JSON could not be decoded: '{$text}'");

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie5479c81c0a6138e1cad416b40d3edabffb1e9c4
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/php-queue
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: DO NOT MERGE: Update payments_initial when donation completes

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329529 )

Change subject: DO NOT MERGE: Update payments_initial when donation completes
..

DO NOT MERGE: Update payments_initial when donation completes

Needs settings updates to deploy, as we have been using a read-only
connection for the fredge db.

FIXME: This direct-to-db approach doesn't work for Amazon and Astropay
listeners as they exist now. But if we move the pending merge into a
SmashPig job, they can do the payments_init update then.

Bigger FIXME: payments_init row should really stay intact, and a new
table should track status changes.

Old Change: Ibb79ba42d22d57dd849ffdd5eae3db92ad57163c

Change-Id: I13e146b383ba7349885b21b1f15d5fecfbf605ce
---
M Core/DataStores/PaymentsInitialDatabase.php
M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M PaymentProviders/Adyen/Tests/config_test.yaml
M PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
4 files changed, 70 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/29/329529/1

diff --git a/Core/DataStores/PaymentsInitialDatabase.php 
b/Core/DataStores/PaymentsInitialDatabase.php
index d40238c..857377e 100644
--- a/Core/DataStores/PaymentsInitialDatabase.php
+++ b/Core/DataStores/PaymentsInitialDatabase.php
@@ -75,6 +75,25 @@
$this->prepareAndExecute( $sql, $message );
}
 
+   public function updatePaymentStatus(
+   $gateway, $contributionTrackingId, $orderId, $status
+   ) {
+   $sql = 'UPDATE payments_initial
+   SET payments_final_status = :status
+   WHERE gateway = :gateway
+   AND contribution_tracking_id = :ct_id
+   AND order_id = :order_id';
+
+   $params = array(
+   'gateway' => $gateway,
+   'ct_id' => $contributionTrackingId,
+   'order_id' => $orderId,
+   'status' => $status
+   );
+
+   $this->prepareAndExecute( $sql, $params );
+   }
+
protected function getConfigKey() {
return 'data-store/fredge-db';
}
diff --git a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php 
b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
index bdcb117..8531ed8 100644
--- a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
+++ b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
@@ -1,6 +1,7 @@
 object( 'data-store/verified' )->push( 
$queueMessage );
 
+   PaymentsInitialDatabase::get()
+   ->updatePaymentStatus(
+   'adyen',
+   $dbMessage['contribution_tracking_id'],
+   $dbMessage['order_id'],
+   'complete'
+   );
+
// Remove it from the pending database
$logger->debug( 'Removing donor details message from 
pending database' );
$db->deleteMessage( $dbMessage );
diff --git a/PaymentProviders/Adyen/Tests/config_test.yaml 
b/PaymentProviders/Adyen/Tests/config_test.yaml
index 33e8128..6f249d0 100644
--- a/PaymentProviders/Adyen/Tests/config_test.yaml
+++ b/PaymentProviders/Adyen/Tests/config_test.yaml
@@ -24,6 +24,11 @@
 constructor-parameters:
 - 'sqlite::memory:'
 
+fredge-db:
+class: PDO
+constructor-parameters:
+- 'sqlite::memory:'
+
 payment-provider:
 adyen:
 api:
diff --git a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
index ce3edf9..f59e1b2 100644
--- a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
+++ b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
@@ -3,11 +3,14 @@
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
+use SmashPig\Core\DataStores\PaymentsInitialDatabase;
 use SmashPig\Core\DataStores\PendingDatabase;
 use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 use SmashPig\PaymentProviders\Adyen\Jobs\RecordCaptureJob;
 use SmashPig\PaymentProviders\Adyen\Tests\AdyenTestConfiguration;
 use SmashPig\Tests\BaseSmashPigUnitTestCase;
+use SmashPig\Tests\PaymentsInitialDatabaseTest;
+use SmashPig\Tests\TestingDatabase;
 
 /**
  * Verify Adyen RecordCapture job functions
@@ -23,21 +26,43 @@
 */
protected $pendingDatabase;
protected $pendingMessage;
+   /**
+* @var PaymentsInitialDatabase
+*/
+   protected $paymentsInitDatabase;
+   protected $paymentsInitMessage;
 
public function setUp() {
parent::se

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Update vendor

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329528 )

Change subject: Update vendor
..

Update vendor

Just phpmailer lib

Change-Id: Ie7907c14c62ebaab4a352ddac05bcb85485bdc92
---
M vendor
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/28/329528/1

diff --git a/vendor b/vendor
index b97f8f8..a325017 16
--- a/vendor
+++ b/vendor
@@ -1 +1 @@
-Subproject commit b97f8f82b9fd4ba92f9a99911ac0dabe02482e79
+Subproject commit a3250177eec55bbe6dc0420950ff75092d0dc0cb

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7907c14c62ebaab4a352ddac05bcb85485bdc92
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: deployment
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Update (only) phpmailer

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329527 )

Change subject: Update (only) phpmailer
..

Update (only) phpmailer

Change-Id: Ibabce5112b3160d25bf192960809e3772bbeaa03
---
M composer/LICENSE
M composer/autoload_real.php
M composer/installed.json
D phpmailer/phpmailer/.gitignore
D phpmailer/phpmailer/.scrutinizer.yml
D phpmailer/phpmailer/.travis.yml
D phpmailer/phpmailer/README.md
M phpmailer/phpmailer/VERSION
D phpmailer/phpmailer/changelog.md
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.phpmaileroauth.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
M phpmailer/phpmailer/composer.lock
D phpmailer/phpmailer/docs/Callback_function_notes.txt
D phpmailer/phpmailer/docs/DomainKeys_notes.txt
D phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt
D phpmailer/phpmailer/docs/extending.html
D phpmailer/phpmailer/docs/faq.html
D phpmailer/phpmailer/docs/generatedocs.sh
D phpmailer/phpmailer/docs/pop3_article.txt
M phpmailer/phpmailer/examples/scripts/shLegacy.js
M phpmailer/phpmailer/examples/smtp_check.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M phpmailer/phpmailer/extras/ntlm_sasl_client.php
R phpmailer/phpmailer/language/phpmailer.lang-cs.php
R phpmailer/phpmailer/language/phpmailer.lang-da.php
M phpmailer/phpmailer/language/phpmailer.lang-de.php
M phpmailer/phpmailer/language/phpmailer.lang-es.php
R phpmailer/phpmailer/language/phpmailer.lang-nb.php
R phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
M phpmailer/phpmailer/language/phpmailer.lang-ro.php
R phpmailer/phpmailer/language/phpmailer.lang-sv.php
D phpmailer/phpmailer/test/bootstrap.php
D phpmailer/phpmailer/test/fakepopserver.sh
D phpmailer/phpmailer/test/fakesendmail.sh
D phpmailer/phpmailer/test/phpmailerLangTest.php
D phpmailer/phpmailer/test/phpmailerTest.php
D phpmailer/phpmailer/test/runfakepopserver.sh
D phpmailer/phpmailer/test/test_callback.php
D phpmailer/phpmailer/test/testbootstrap-dist.php
D phpmailer/phpmailer/travis.phpunit.xml.dist
42 files changed, 685 insertions(+), 4,363 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig/vendor 
refs/changes/27/329527/1


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibabce5112b3160d25bf192960809e3772bbeaa03
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig/vendor
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Revert "update phpmailer for CVE"

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329526 )

Change subject: Revert "update phpmailer for CVE"
..

Revert "update phpmailer for CVE"

This reverts commit b97f8f82b9fd4ba92f9a99911ac0dabe02482e79.

Change-Id: I9ff373aae3a6a1aedce2394c6a76dcdb87719551
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
D coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
D coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/LICENSE
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
M monolog/monolog/CHANGELOG.mdown
M monolog/monolog/composer.json
M monolog/monolog/doc/02-handlers-formatters-processors.md
M monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
M monolog/monolog/src/Monolog/Formatter/LineFormatter.php
M monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
M monolog/monolog/src/Monolog/Handler/AmqpHandler.php
M monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
M monolog/monolog/src/Monolog/Handler/RavenHandler.php
M monolog/monolog/src/Monolog/Handler/RollbarHandler.php
D monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php
M monolog/monolog/src/Monolog/Handler/SlackHandler.php
D monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php
D monolog/monolog/src/Monolog/Handler/SlackbotHandler.php
M monolog/monolog/src/Monolog/Handler/StreamHandler.php
M monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php
M monolog/monolog/src/Monolog/Handler/TestHandler.php
M monolog/monolog/src/Monolog/Logger.php
D monolog/monolog/src/Monolog/Processor/MercurialProcessor.php
M monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php
M monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php
M monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php
D monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php
M monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php
D monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php
D monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php
M monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php
M monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php
M monolog/monolog/tests/Monolog/LoggerTest.php
D monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php
A phpmailer/phpmailer/.gitignore
A phpmailer/phpmailer/.scrutinizer.yml
A phpmailer/phpmailer/.travis.yml
A phpmailer/phpmailer/README.md
M phpmailer/phpmailer/VERSION
A phpmailer/phpmailer/changelog.md
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.phpmaileroauth.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
M phpmailer/phpmailer/composer.lock
A phpmailer/phpmailer/docs/Callback_function_notes.txt
A phpmailer/phpmailer/docs/DomainKeys_notes.txt
A phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt
A phpmailer/phpmailer/docs/extending.html
A phpmailer/phpmailer/docs/faq.html
A phpmailer/phpmailer/docs/generatedocs.sh
A phpmailer/phpmailer/docs/pop3_article.txt
M phpmailer/phpmailer/examples/scripts/shLegacy.js
M phpmailer/phpmailer/examples/smtp_check.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M phpmailer/phpmailer/extras/ntlm_sasl_client.php
R phpmailer/phpmailer/language/phpmailer.lang-br.php
R phpmailer/phpmailer/language/phpmailer.lang-cz.php
M phpmailer/phpmailer/language/phpmailer.lang-de.php
R phpmailer/phpmailer/language/phpmailer.lang-dk.php
M phpmailer/phpmailer/language/phpmailer.lang-es.php
R phpmailer/phpmailer/language/phpmailer.lang-no.php
M phpmailer/phpmailer/language/phpmailer.lang-ro.php
R phpmailer/phpmailer/language/phpmailer.lang-se.php
A phpmailer/phpmailer/test/bootstrap.php
A phpmailer/phpmailer/test/fakepopserver.sh
A phpmailer/phpmailer/test/fakesendmail.sh
A phpmailer/phpmailer/test/phpmailerLangTest.php
A phpmailer/phpmailer/test/phpmailerTest.php
A phpmailer/phpmailer/test/runfakepopserver.sh
A phpmailer/phpmailer/test/test_callback.php
A phpmailer/phpmailer/test/testbootstrap-dist.php
A phpmailer/phpmailer/travis.phpunit.xml.dist
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
M psr/log/Psr/Log/LoggerAwareTrait.php
M psr/log/Psr/Log/LoggerInterface.php
M psr/log/Psr/Log/LoggerTrait.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/EventDispatcher.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[deployment]: Merge branch 'master' into deployment

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329525 )

Change subject: Merge branch 'master' into deployment
..

Merge branch 'master' into deployment

5db2b21 Clean up a couple unused things
78a59db Update payments_initial when donation completes
e181e46 Less noisy queue consumer logging
bbba45f reject some address_names
63d30e8 Update phpmailer for CVE-2016-10045 and CVE-2016-10033
7424e99 Revert "Update phpmailer for CVE-2016-10045 and CVE-2016-10033"
ae44b1a Update (only) PHPMailer
7bc3113 Revert "Update payments_initial when donation completes"

This just gets us out of cherry-pick hell
Everything except the libs and payments_initial update are already deployed.

Change-Id: I7815a05f5e7cf51d90fcdc6b9e95ff3bd25f8247
---
D PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
1 file changed, 0 insertions(+), 147 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/25/329525/1

diff --git 
a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php 
b/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
deleted file mode 100644
index b2e4312..000
--- a/PaymentProviders/PayPal/Tests/phpunit/CaptureIncomingMessageTest.php
+++ /dev/null
@@ -1,147 +0,0 @@
-<<< HEAD   (8597bd REVERT "DEPLOYMENT ONLY: Short-circuit everything to 
disable)
-===
- 'verified',
-   'subscr_signup.json' => 'recurring',
-   'subscr_payment.json' => 'recurring',
-   'refund.json' => 'refund',
-   'chargeback_settlement.json' => 'refund',
-   // this should not actually get written to
-   // TODO 'new_case.json' => 'no-op',
-   );
-
-   static $messages = array();
-
-   public function setUp() {
-   parent::setUp();
-   $this->config = PayPalTestConfiguration::get();
-
-   // php-queue\PDO complains about pop() from non-existent table
-   $this->config->object( 'data-store/jobs-paypal' )
-   ->createTable( 'jobs-paypal' );
-
-   Context::initWithLogger( $this->config );
-   foreach ( self::$message_data as $file => $type ) {
-   self::$messages[] = array(
-   'type' => $type,
-   'payload' => json_decode(
-   file_get_contents( __DIR__ . 
'/../Data/' . $file ),
-   true
-   )
-   );
-   }
-   }
-
-   public function tearDown() {
-   self::$fail_verification = false;
-   self::$paypal_is_broken = false;
-   parent::tearDown();
-   }
-
-   private function capture( $msg ) {
-   $request = new Request( $msg );
-   $response = new Response;
-   $listener = new Listener;
-   return $listener->execute( $request, $response );
-   }
-
-   public function testCapture() {
-   foreach ( self::$messages as $msg ) {
-
-   $this->capture( $msg['payload'] );
-
-   $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-   $jobMessage = $jobQueue->pop();
-
-   $this->assertEquals( $jobMessage['php-message-class'],
-   'SmashPig\PaymentProviders\PayPal\Job' );
-
-   $this->assertEquals( $jobMessage['payload'], 
$msg['payload'] );
-   }
-   }
-
-   public function testBlankMessage() {
-   $this->capture( array() );
-   $jobQueue = $this->config->object( 'data-store/jobs-paypal' );
-   $this->assertNull( $jobQueue->pop() );
-   }
-
-   public function testConsume() {
-   foreach ( self::$messages as $msg ) {
-   $this->capture( $msg['payload'] );
-
-   $jobQueue = $this->config->object( 
'data-store/jobs-paypal' );
-   $jobMessage = $jobQueue->pop();
-
-   $job = KeyedOpaqueStorableObject::fromJsonProxy(
-   $jobMessage['php-message-class'],
-   json_encode( $jobMessage )
-   );
-
-   $job->execute();
-
-   $queue = $this->config->object( 'data-store/' . 
$msg['type'] );
-   $queue->createTable( $msg['type'] );
-   $message = $queue->pop();
-
-   if ( $job->is_reject() ) {
-   $this->assertEmpty( $message );
-   } else {
-   $this->assertNotEmpty( $message );
-   if ( isset( 
$message['contribut

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Revert "Update payments_initial when donation completes"

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329524 )

Change subject: Revert "Update payments_initial when donation completes"
..

Revert "Update payments_initial when donation completes"

Will re-apply once we can deploy it

This reverts commit 78a59db62eccfbc6cfa9ab08443e4cba31517ca4.

Change-Id: I591f6ced479d8e9a30b490b2167464cb3b753ac8
---
M Core/DataStores/PaymentsInitialDatabase.php
M PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
M PaymentProviders/Adyen/Tests/config_test.yaml
M PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
4 files changed, 1 insertion(+), 70 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/24/329524/1

diff --git a/Core/DataStores/PaymentsInitialDatabase.php 
b/Core/DataStores/PaymentsInitialDatabase.php
index 857377e..d40238c 100644
--- a/Core/DataStores/PaymentsInitialDatabase.php
+++ b/Core/DataStores/PaymentsInitialDatabase.php
@@ -75,25 +75,6 @@
$this->prepareAndExecute( $sql, $message );
}
 
-   public function updatePaymentStatus(
-   $gateway, $contributionTrackingId, $orderId, $status
-   ) {
-   $sql = 'UPDATE payments_initial
-   SET payments_final_status = :status
-   WHERE gateway = :gateway
-   AND contribution_tracking_id = :ct_id
-   AND order_id = :order_id';
-
-   $params = array(
-   'gateway' => $gateway,
-   'ct_id' => $contributionTrackingId,
-   'order_id' => $orderId,
-   'status' => $status
-   );
-
-   $this->prepareAndExecute( $sql, $params );
-   }
-
protected function getConfigKey() {
return 'data-store/fredge-db';
}
diff --git a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php 
b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
index 8531ed8..bdcb117 100644
--- a/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
+++ b/PaymentProviders/Adyen/Jobs/RecordCaptureJob.php
@@ -1,7 +1,6 @@
 object( 'data-store/verified' )->push( 
$queueMessage );
-
-   PaymentsInitialDatabase::get()
-   ->updatePaymentStatus(
-   'adyen',
-   $dbMessage['contribution_tracking_id'],
-   $dbMessage['order_id'],
-   'complete'
-   );
 
// Remove it from the pending database
$logger->debug( 'Removing donor details message from 
pending database' );
diff --git a/PaymentProviders/Adyen/Tests/config_test.yaml 
b/PaymentProviders/Adyen/Tests/config_test.yaml
index 6f249d0..33e8128 100644
--- a/PaymentProviders/Adyen/Tests/config_test.yaml
+++ b/PaymentProviders/Adyen/Tests/config_test.yaml
@@ -24,11 +24,6 @@
 constructor-parameters:
 - 'sqlite::memory:'
 
-fredge-db:
-class: PDO
-constructor-parameters:
-- 'sqlite::memory:'
-
 payment-provider:
 adyen:
 api:
diff --git a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php 
b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
index f59e1b2..ce3edf9 100644
--- a/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
+++ b/PaymentProviders/Adyen/Tests/phpunit/RecordCaptureJobTest.php
@@ -3,14 +3,11 @@
 use SmashPig\Core\Configuration;
 use SmashPig\Core\Context;
 use SmashPig\Core\DataStores\KeyedOpaqueStorableObject;
-use SmashPig\Core\DataStores\PaymentsInitialDatabase;
 use SmashPig\Core\DataStores\PendingDatabase;
 use SmashPig\Core\QueueConsumers\BaseQueueConsumer;
 use SmashPig\PaymentProviders\Adyen\Jobs\RecordCaptureJob;
 use SmashPig\PaymentProviders\Adyen\Tests\AdyenTestConfiguration;
 use SmashPig\Tests\BaseSmashPigUnitTestCase;
-use SmashPig\Tests\PaymentsInitialDatabaseTest;
-use SmashPig\Tests\TestingDatabase;
 
 /**
  * Verify Adyen RecordCapture job functions
@@ -26,43 +23,21 @@
 */
protected $pendingDatabase;
protected $pendingMessage;
-   /**
-* @var PaymentsInitialDatabase
-*/
-   protected $paymentsInitDatabase;
-   protected $paymentsInitMessage;
 
public function setUp() {
parent::setUp();
$this->config = 
AdyenTestConfiguration::createWithSuccessfulApi();
Context::initWithLogger( $this->config );
-
-   $this->paymentsInitDatabase = PaymentsInitialDatabase::get();
-   $this->paymentsInitDatabase->createTable();
-   $this->paymentsInitMessage = 
PaymentsInitialDatabaseTest::generateTestMessage();
-   $this->paymentsInitMes

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Update (only) PHPMailer

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329523 )

Change subject: Update (only) PHPMailer
..

Update (only) PHPMailer

Change-Id: I7922aab6116360112668ecbefd1656d43757cc19
---
M composer.lock
1 file changed, 6 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/23/329523/1

diff --git a/composer.lock b/composer.lock
index d93db56..bd4ec82 100644
--- a/composer.lock
+++ b/composer.lock
@@ -198,6 +198,7 @@
 "messaging",
 "stomp"
 ],
+"abandoned": "stomp-php/stomp-php",
 "time": "2013-02-23 17:34:44"
 },
 {
@@ -322,16 +323,16 @@
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.16",
+"version": "v5.2.21",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a"
+"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a";,
-"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
+"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
 "shasum": ""
 },
 "require": {
@@ -378,7 +379,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-06-06 09:09:37"
+"time": "2016-12-28 15:35:48"
 },
 {
 "name": "predis/predis",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7922aab6116360112668ecbefd1656d43757cc19
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Revert "Update phpmailer for CVE-2016-10045 and CVE-2016-10033"

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329522 )

Change subject: Revert "Update phpmailer for CVE-2016-10045 and CVE-2016-10033"
..

Revert "Update phpmailer for CVE-2016-10045 and CVE-2016-10033"

This reverts commit 63d30e8c6dfaee0b38db746a21a993c282424ec8.

Change-Id: I1b0fd5ef6ddfe296290b0c254d4a9eb967e89312
---
M composer.lock
1 file changed, 107 insertions(+), 118 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/22/329522/1

diff --git a/composer.lock b/composer.lock
index 5278ada..d93db56 100644
--- a/composer.lock
+++ b/composer.lock
@@ -44,7 +44,7 @@
 "payment",
 "payments"
 ],
-"time": "2016-02-17 00:44:20"
+"time": "2016-02-17 00:53:20"
 },
 {
 "name": "clio/clio",
@@ -93,7 +93,7 @@
 "source": {
 "type": "git",
 "url": 
"https://gerrit.wikimedia.org/r/p/wikimedia/fundraising/php-queue.git";,
-"reference": "8e15cbf9a46ef58ceeadb9b359fee925291a0173"
+"reference": "14198ba1f7d4868933649a85621a3955965e83cd"
 },
 "require": {
 "clio/clio": "0.1.*",
@@ -149,7 +149,7 @@
 "queue",
 "transaction"
 ],
-"time": "2016-10-17 23:39:02"
+"time": "2016-08-05 19:16:32"
 },
 {
 "name": "fusesource/stomp-php",
@@ -198,7 +198,6 @@
 "messaging",
 "stomp"
 ],
-"abandoned": "stomp-php/stomp-php",
 "time": "2013-02-23 17:34:44"
 },
 {
@@ -245,16 +244,16 @@
 },
 {
 "name": "monolog/monolog",
-"version": "1.22.0",
+"version": "1.21.0",
 "source": {
 "type": "git",
 "url": "https://github.com/Seldaek/monolog.git";,
-"reference": "bad29cb8d18ab0315e6c477751418a82c850d558"
+"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/bad29cb8d18ab0315e6c477751418a82c850d558";,
-"reference": "bad29cb8d18ab0315e6c477751418a82c850d558",
+"url": 
"https://api.github.com/repos/Seldaek/monolog/zipball/f42fbdfd53e306bda545845e4dbfd3e72edb4952";,
+"reference": "f42fbdfd53e306bda545845e4dbfd3e72edb4952",
 "shasum": ""
 },
 "require": {
@@ -265,7 +264,7 @@
 "psr/log-implementation": "1.0.0"
 },
 "require-dev": {
-"aws/aws-sdk-php": "^2.4.9 || ^3.0",
+"aws/aws-sdk-php": "^2.4.9",
 "doctrine/couchdb": "~1.0@dev",
 "graylog2/gelf-php": "~1.0",
 "jakub-onderka/php-parallel-lint": "0.9",
@@ -319,20 +318,20 @@
 "logging",
 "psr-3"
 ],
-"time": "2016-11-26 00:15:39"
+"time": "2016-07-29 03:23:52"
 },
 {
 "name": "phpmailer/phpmailer",
-"version": "v5.2.21",
+"version": "v5.2.16",
 "source": {
 "type": "git",
 "url": "https://github.com/PHPMailer/PHPMailer.git";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e"
+"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a"
 },
 "dist": {
 "type": "zip",
-"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d51856b76c06fc687fcd9180efa7a0bed0d761e";,
-"reference": "1d51856b76c06fc687fcd9180efa7a0bed0d761e",
+"url": 
"https://api.github.com/repos/PHPMailer/PHPMailer/zipball/1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a";,
+"reference": "1d85f9ef3ecfc42bbc4f3c70d5e37ca9a65f629a",
 "shasum": ""
 },
 "require": {
@@ -379,7 +378,7 @@
 }
 ],
 "description": "PHPMailer is a full-featured email creation and 
transfer class for PHP",
-"time": "2016-12-28 15:35:48"
+"time": "2016-06-06 09:09:37"
 },
 {
 "name": "predis/predis",
@@ -433,30 +432,22 @@
 },
 {
 "name": "psr/log",
-"version": "1.0.2",
+"version": "1.0.0",
 "source": {
 "type": "git",
 "url": "https://github.com/php-fig/log.git";,
-"reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d"
+"reference": "fe0936ee26643249e916849d48e3a51d5f5e278b"
 },
 

[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: update phpmailer for CVE

2016-12-28 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329513 )

Change subject: update phpmailer for CVE
..


update phpmailer for CVE

Change-Id: I21168da04c03d5a5d8eea29f159e58d4f3374676
---
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
A coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
A coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/LICENSE
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/installed.json
M monolog/monolog/CHANGELOG.mdown
M monolog/monolog/composer.json
M monolog/monolog/doc/02-handlers-formatters-processors.md
M monolog/monolog/src/Monolog/Formatter/JsonFormatter.php
M monolog/monolog/src/Monolog/Formatter/LineFormatter.php
M monolog/monolog/src/Monolog/Formatter/NormalizerFormatter.php
M monolog/monolog/src/Monolog/Handler/AmqpHandler.php
M monolog/monolog/src/Monolog/Handler/DynamoDbHandler.php
M monolog/monolog/src/Monolog/Handler/RavenHandler.php
M monolog/monolog/src/Monolog/Handler/RollbarHandler.php
A monolog/monolog/src/Monolog/Handler/Slack/SlackRecord.php
M monolog/monolog/src/Monolog/Handler/SlackHandler.php
A monolog/monolog/src/Monolog/Handler/SlackWebhookHandler.php
A monolog/monolog/src/Monolog/Handler/SlackbotHandler.php
M monolog/monolog/src/Monolog/Handler/StreamHandler.php
M monolog/monolog/src/Monolog/Handler/SyslogUdpHandler.php
M monolog/monolog/src/Monolog/Handler/TestHandler.php
M monolog/monolog/src/Monolog/Logger.php
A monolog/monolog/src/Monolog/Processor/MercurialProcessor.php
M monolog/monolog/tests/Monolog/Formatter/JsonFormatterTest.php
M monolog/monolog/tests/Monolog/Formatter/NormalizerFormatterTest.php
M monolog/monolog/tests/Monolog/Handler/RavenHandlerTest.php
A monolog/monolog/tests/Monolog/Handler/Slack/SlackRecordTest.php
M monolog/monolog/tests/Monolog/Handler/SlackHandlerTest.php
A monolog/monolog/tests/Monolog/Handler/SlackWebhookHandlerTest.php
A monolog/monolog/tests/Monolog/Handler/SlackbotHandlerTest.php
M monolog/monolog/tests/Monolog/Handler/SyslogUdpHandlerTest.php
M monolog/monolog/tests/Monolog/Handler/TestHandlerTest.php
M monolog/monolog/tests/Monolog/LoggerTest.php
A monolog/monolog/tests/Monolog/Processor/MercurialProcessorTest.php
D phpmailer/phpmailer/.gitignore
D phpmailer/phpmailer/.scrutinizer.yml
D phpmailer/phpmailer/.travis.yml
D phpmailer/phpmailer/README.md
M phpmailer/phpmailer/VERSION
D phpmailer/phpmailer/changelog.md
M phpmailer/phpmailer/class.phpmailer.php
M phpmailer/phpmailer/class.phpmaileroauth.php
M phpmailer/phpmailer/class.pop3.php
M phpmailer/phpmailer/class.smtp.php
M phpmailer/phpmailer/composer.lock
D phpmailer/phpmailer/docs/Callback_function_notes.txt
D phpmailer/phpmailer/docs/DomainKeys_notes.txt
D phpmailer/phpmailer/docs/Note_for_SMTP_debugging.txt
D phpmailer/phpmailer/docs/extending.html
D phpmailer/phpmailer/docs/faq.html
D phpmailer/phpmailer/docs/generatedocs.sh
D phpmailer/phpmailer/docs/pop3_article.txt
M phpmailer/phpmailer/examples/scripts/shLegacy.js
M phpmailer/phpmailer/examples/smtp_check.phps
M phpmailer/phpmailer/extras/htmlfilter.php
M phpmailer/phpmailer/extras/ntlm_sasl_client.php
R phpmailer/phpmailer/language/phpmailer.lang-cs.php
R phpmailer/phpmailer/language/phpmailer.lang-da.php
M phpmailer/phpmailer/language/phpmailer.lang-de.php
M phpmailer/phpmailer/language/phpmailer.lang-es.php
R phpmailer/phpmailer/language/phpmailer.lang-nb.php
R phpmailer/phpmailer/language/phpmailer.lang-pt_br.php
M phpmailer/phpmailer/language/phpmailer.lang-ro.php
R phpmailer/phpmailer/language/phpmailer.lang-sv.php
D phpmailer/phpmailer/test/bootstrap.php
D phpmailer/phpmailer/test/fakepopserver.sh
D phpmailer/phpmailer/test/fakesendmail.sh
D phpmailer/phpmailer/test/phpmailerLangTest.php
D phpmailer/phpmailer/test/phpmailerTest.php
D phpmailer/phpmailer/test/runfakepopserver.sh
D phpmailer/phpmailer/test/test_callback.php
D phpmailer/phpmailer/test/testbootstrap-dist.php
D phpmailer/phpmailer/travis.phpunit.xml.dist
M psr/log/Psr/Log/AbstractLogger.php
M psr/log/Psr/Log/LogLevel.php
M psr/log/Psr/Log/LoggerAwareInterface.php
M psr/log/Psr/Log/LoggerAwareTrait.php
M psr/log/Psr/Log/LoggerInterface.php
M psr/log/Psr/Log/LoggerTrait.php
M psr/log/Psr/Log/NullLogger.php
M psr/log/Psr/Log/Test/LoggerInterfaceTest.php
M psr/log/composer.json
M symfony/event-dispatcher/EventDispatcher.php
M symfony/http-foundation/BinaryFileResponse.php
M symfony/http-foundation/File/MimeType/FileinfoMimeTypeGuesser.php
M symfony/http-foundation/JsonResponse.php
M symfony/http-foundation/Request.php
M symfony/http-foundation/RequestMatcher.php
M symfony/http-foundation/Response.php
M symfony/http-foundation/Session/Storage/Handler/MemcacheSessionHandler.php
M symfony/http-foundation/StreamedResponse.php
M symfony/http-foundat

[MediaWiki-commits] [Gerrit] wikimedia...vendor[master]: Revert "update libs"

2016-12-28 Thread Ejegg (Code Review)
Ejegg has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/329512 )

Change subject: Revert "update libs"
..


Revert "update libs"

This reverts commit c1ebacd623ce6a6d0b553f92ad978bfeb83132e2.

Change-Id: I2fd11d03a13067cf85b2af6aa49b7228ef7e6019
---
M autoload.php
D bin/parallel-lint
D bin/phpunit
M coderkungfu/php-queue/src/PHPQueue/Backend/PDO.php
M coderkungfu/php-queue/src/PHPQueue/Backend/Predis.php
D coderkungfu/php-queue/src/PHPQueue/Exception/JsonException.php
D coderkungfu/php-queue/src/PHPQueue/Json.php
M coderkungfu/php-queue/test/PHPQueue/Backend/PredisTest.php
M composer/ClassLoader.php
M composer/LICENSE
M composer/autoload_classmap.php
M composer/autoload_files.php
M composer/autoload_namespaces.php
M composer/autoload_psr4.php
M composer/autoload_real.php
M composer/autoload_static.php
M composer/installed.json
D doctrine/instantiator/.gitignore
D doctrine/instantiator/.scrutinizer.yml
D doctrine/instantiator/.travis.install.sh
D doctrine/instantiator/.travis.yml
D doctrine/instantiator/CONTRIBUTING.md
D doctrine/instantiator/LICENSE
D doctrine/instantiator/README.md
D doctrine/instantiator/composer.json
D doctrine/instantiator/phpmd.xml.dist
D doctrine/instantiator/phpunit.xml.dist
D 
doctrine/instantiator/src/Doctrine/Instantiator/Exception/ExceptionInterface.php
D 
doctrine/instantiator/src/Doctrine/Instantiator/Exception/InvalidArgumentException.php
D 
doctrine/instantiator/src/Doctrine/Instantiator/Exception/UnexpectedValueException.php
D doctrine/instantiator/src/Doctrine/Instantiator/Instantiator.php
D doctrine/instantiator/src/Doctrine/Instantiator/InstantiatorInterface.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorPerformance/InstantiatorPerformanceEvent.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/InvalidArgumentExceptionTest.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/Exception/UnexpectedValueExceptionTest.php
D doctrine/instantiator/tests/DoctrineTest/InstantiatorTest/InstantiatorTest.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/AbstractClassAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ArrayObjectAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/ExceptionAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/FinalExceptionAsset.php
D doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/PharExceptionAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SerializableArrayObjectAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleSerializableAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/SimpleTraitAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnCloneableAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/UnserializeExceptionArrayObjectAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/WakeUpNoticesAsset.php
D 
doctrine/instantiator/tests/DoctrineTest/InstantiatorTestAsset/XMLReaderAsset.php
D jakub-onderka/php-parallel-lint/.gitignore
D jakub-onderka/php-parallel-lint/.travis.yml
D jakub-onderka/php-parallel-lint/LICENSE
D jakub-onderka/php-parallel-lint/README.md
D jakub-onderka/php-parallel-lint/appveyor.yml
D jakub-onderka/php-parallel-lint/bin/skip-linting.php
D jakub-onderka/php-parallel-lint/box.json
D jakub-onderka/php-parallel-lint/composer.json
D jakub-onderka/php-parallel-lint/parallel-lint
D jakub-onderka/php-parallel-lint/parallel-lint.php
D jakub-onderka/php-parallel-lint/phpcs-ruleset.xml
D jakub-onderka/php-parallel-lint/src/Error.php
D jakub-onderka/php-parallel-lint/src/ErrorFormatter.php
D jakub-onderka/php-parallel-lint/src/JsonSerializable.php
D jakub-onderka/php-parallel-lint/src/Manager.php
D jakub-onderka/php-parallel-lint/src/Output.php
D jakub-onderka/php-parallel-lint/src/ParallelLint.php
D jakub-onderka/php-parallel-lint/src/Process/GitBlameProcess.php
D jakub-onderka/php-parallel-lint/src/Process/LintProcess.php
D jakub-onderka/php-parallel-lint/src/Process/PhpExecutable.php
D jakub-onderka/php-parallel-lint/src/Process/PhpProcess.php
D jakub-onderka/php-parallel-lint/src/Process/Process.php
D jakub-onderka/php-parallel-lint/src/Process/SkipLintProcess.php
D jakub-onderka/php-parallel-lint/src/Result.php
D jakub-onderka/php-parallel-lint/src/Settings.php
D jakub-onderka/php-parallel-lint/src/exceptions.php
D jakub-onderka/php-parallel-lint/tests/Manager.run.phpt
D jakub-onderka/php-parallel-lint/tests/ParallelLint.lint.phpt
D jakub-onderka/php-parallel-lint/tests/Settings.parseArguments.phpt
D jakub-onderka/php-parallel-lint/tests/SkipLintProcess.phpt
D jakub-onderka/php-parallel-lint/tests/examples/example-01/empty-file
D jakub-onderka/php-parallel-

[MediaWiki-commits] [Gerrit] wikimedia...SmashPig[master]: Revert on deployment: gitignore vendor submodule

2016-12-28 Thread Ejegg (Code Review)
Ejegg has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/329509 )

Change subject: Revert on deployment: gitignore vendor submodule
..

Revert on deployment: gitignore vendor submodule

So we don't get complaints switching between master and deployment

Change-Id: Ide702baa01fa33255f021ca80c935ca2b039d078
---
M .gitignore
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/SmashPig 
refs/changes/09/329509/1

diff --git a/.gitignore b/.gitignore
index 8bcf162..eab43d6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,6 @@
 
 # IDE Tools
 .idea
+
+# Composer deps only on deployment branch
+vendor

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide702baa01fa33255f021ca80c935ca2b039d078
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/SmashPig
Gerrit-Branch: master
Gerrit-Owner: Ejegg 

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


<    5   6   7   8   9   10   11   12   13   14   >