jenkins-bot has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/403757 )
Change subject: Use SmashPig FinalStatus
......................................................................
Use SmashPig FinalStatus
Change-Id: I50685fbbfa07d2886e433e07e5e7ba7ff0f1a111
---
M adyen_gateway/adyen.adapter.php
M amazon_gateway/amazon.adapter.php
M astropay_gateway/astropay.adapter.php
M composer.lock
M extension.json
D gateway_common/FinalStatus.php
M gateway_common/GatewayPage.php
M gateway_common/PaymentResult.php
M gateway_common/gateway.adapter.php
M globalcollect_gateway/globalcollect.adapter.php
M globalcollect_gateway/orphan.adapter.php
M paypal_gateway/express_checkout/paypal_express.adapter.php
M paypal_gateway/legacy/paypal_legacy.adapter.php
M tests/phpunit/Adapter/Amazon/AmazonTest.php
M tests/phpunit/Adapter/AstroPay/AstroPayTest.php
M tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
M tests/phpunit/Adapter/Ingenico/RecurringTest.php
M tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
18 files changed, 22 insertions(+), 19 deletions(-)
Approvals:
jenkins-bot: Verified
Ejegg: Looks good to me, approved
diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php
index 9a68fdb..150f1c2 100644
--- a/adyen_gateway/adyen.adapter.php
+++ b/adyen_gateway/adyen.adapter.php
@@ -16,6 +16,7 @@
*
*/
use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
/**
* AdyenAdapter
diff --git a/amazon_gateway/amazon.adapter.php
b/amazon_gateway/amazon.adapter.php
index 27c8920..c392d9c 100644
--- a/amazon_gateway/amazon.adapter.php
+++ b/amazon_gateway/amazon.adapter.php
@@ -4,6 +4,7 @@
use PayWithAmazon\PaymentsClientInterface as PwaClientInterface;
use Psr\Log\LogLevel;
use SmashPig\Core\Context;
+use SmashPig\CrmLink\FinalStatus;
/**
* Wikimedia Foundation
diff --git a/astropay_gateway/astropay.adapter.php
b/astropay_gateway/astropay.adapter.php
index 1f747f1..bddd178 100644
--- a/astropay_gateway/astropay.adapter.php
+++ b/astropay_gateway/astropay.adapter.php
@@ -16,6 +16,7 @@
*
*/
use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
/**
* AstroPayAdapter
diff --git a/composer.lock b/composer.lock
index 5d275a2..51e03b3 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1281,29 +1281,31 @@
],
"description": "Symfony Yaml Component",
"homepage": "https://symfony.com",
- "time": "2017-06-01T20:52:29+00:00"
+ "time": "2018-01-03T07:36:31+00:00"
},
{
"name": "wikimedia/smash-pig",
- "version": "0.5.0",
+ "version": "v0.5.2",
"source": {
"type": "git",
"url":
"https://gerrit.wikimedia.org/r/wikimedia/fundraising/SmashPig.git",
- "reference": "def9c6f3cfc8e3878aa74cf94ebb8287b08ac2cc"
+ "reference": "af6a9bb52291d7cdc696009ede4b3c6271ffb983"
},
"require": {
"amzn/login-and-pay-with-amazon-sdk-php": "dev-master",
"coderkungfu/php-queue": "^1.0",
"corneltek/getoptionkit": "^2.5",
- "php": ">=5.3.3",
+ "php": ">=5.4",
"phpmailer/phpmailer": "^5.2",
"predis/predis": "^1.1",
"psr/cache": "^1.0",
+ "psr/log": "^1.0",
"symfony/event-dispatcher": "^2.1",
"symfony/http-foundation": "^2.1",
"symfony/yaml": "^2.8"
},
"require-dev": {
+ "ext-sqlite3": "*",
"jakub-onderka/php-parallel-lint": "^0.9",
"mediawiki/mediawiki-codesniffer": "0.11.0",
"phpunit/phpunit": "^4.8"
diff --git a/extension.json b/extension.json
index d841370..035f86d 100644
--- a/extension.json
+++ b/extension.json
@@ -87,7 +87,6 @@
"DonorLocale": "gateway_common/DonorLocale.php",
"EncodingMangler": "gateway_common/EncodingMangler.php",
"ErrorState": "gateway_common/ErrorState.php",
- "FinalStatus": "gateway_common/FinalStatus.php",
"FallbackLogPrefixer": "gateway_common/FallbackLogPrefixer.php",
"GatewayAdapter": "gateway_common/gateway.adapter.php",
"GatewayPage": "gateway_common/GatewayPage.php",
diff --git a/gateway_common/FinalStatus.php b/gateway_common/FinalStatus.php
deleted file mode 100644
index 2ae09cf..0000000
--- a/gateway_common/FinalStatus.php
+++ /dev/null
@@ -1,14 +0,0 @@
-<?php
-
-/**
- * Allowed values for final status of a payment attempt
- */
-class FinalStatus {
- const COMPLETE = 'complete';
- const FAILED = 'failed';
- const PENDING = 'pending';
- const PENDING_POKE = 'pending-poke';
- const REVISED = 'revised';
- const REFUNDED = 'refunded';
- const CANCELLED = 'cancelled';
-}
diff --git a/gateway_common/GatewayPage.php b/gateway_common/GatewayPage.php
index 30dcd1a..3c435a3 100644
--- a/gateway_common/GatewayPage.php
+++ b/gateway_common/GatewayPage.php
@@ -17,6 +17,7 @@
*/
use Psr\Log\LogLevel;
use SmashPig\Core\Logging\Logger;
+use SmashPig\CrmLink\FinalStatus;
/**
* GatewayPage
diff --git a/gateway_common/PaymentResult.php b/gateway_common/PaymentResult.php
index 8a7e7ee..7a077d4 100644
--- a/gateway_common/PaymentResult.php
+++ b/gateway_common/PaymentResult.php
@@ -1,6 +1,7 @@
<?php
use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
/**
* Contains donation workflow UI hints
diff --git a/gateway_common/gateway.adapter.php
b/gateway_common/gateway.adapter.php
index 7d11b22..4fdbc3c 100644
--- a/gateway_common/gateway.adapter.php
+++ b/gateway_common/gateway.adapter.php
@@ -22,6 +22,7 @@
use Psr\Log\LogLevel;
use SmashPig\Core\DataStores\QueueWrapper;
use SmashPig\Core\UtcDate;
+use SmashPig\CrmLink\FinalStatus;
use SmashPig\PaymentData\ReferenceData\CurrencyRates;
use SmashPig\PaymentData\ReferenceData\NationalCurrencies;
diff --git a/globalcollect_gateway/globalcollect.adapter.php
b/globalcollect_gateway/globalcollect.adapter.php
index 7059d6e..7b69c56 100644
--- a/globalcollect_gateway/globalcollect.adapter.php
+++ b/globalcollect_gateway/globalcollect.adapter.php
@@ -16,6 +16,7 @@
*
*/
use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
use SmashPig\PaymentProviders\PaymentProviderFactory;
/**
diff --git a/globalcollect_gateway/orphan.adapter.php
b/globalcollect_gateway/orphan.adapter.php
index f61c75f..c2d513a 100644
--- a/globalcollect_gateway/orphan.adapter.php
+++ b/globalcollect_gateway/orphan.adapter.php
@@ -1,5 +1,7 @@
<?php
+use SmashPig\CrmLink\FinalStatus;
+
class GlobalCollectOrphanAdapter extends GlobalCollectAdapter {
// Data we know to be good, that we always want to re-assert after a
load or an addData.
// so far: order_id and the data we pull from contribution tracking.
diff --git a/paypal_gateway/express_checkout/paypal_express.adapter.php
b/paypal_gateway/express_checkout/paypal_express.adapter.php
index 3565b03..c0fe8b7 100644
--- a/paypal_gateway/express_checkout/paypal_express.adapter.php
+++ b/paypal_gateway/express_checkout/paypal_express.adapter.php
@@ -1,6 +1,7 @@
<?php
use Psr\Log\LogLevel;
+use SmashPig\CrmLink\FinalStatus;
/**
* PayPal Express Checkout name value pair integration
diff --git a/paypal_gateway/legacy/paypal_legacy.adapter.php
b/paypal_gateway/legacy/paypal_legacy.adapter.php
index 60dd32e..800da5c 100644
--- a/paypal_gateway/legacy/paypal_legacy.adapter.php
+++ b/paypal_gateway/legacy/paypal_legacy.adapter.php
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*
*/
+use SmashPig\CrmLink\FinalStatus;
/**
* TODO: Document exactly which PayPal product this integrates with and link
to online docs
diff --git a/tests/phpunit/Adapter/Amazon/AmazonTest.php
b/tests/phpunit/Adapter/Amazon/AmazonTest.php
index dc4fa6a..813f5dd 100644
--- a/tests/phpunit/Adapter/Amazon/AmazonTest.php
+++ b/tests/phpunit/Adapter/Amazon/AmazonTest.php
@@ -16,6 +16,7 @@
*/
use SmashPig\PaymentData\ReferenceData\CurrencyRates;
use SmashPig\Core\DataStores\QueueWrapper;
+use SmashPig\CrmLink\FinalStatus;
use SmashPig\PaymentProviders\Amazon\Tests\AmazonTestConfiguration;
use SmashPig\Tests\TestingContext;
diff --git a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
b/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
index 6db57c6..be02700 100644
--- a/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
+++ b/tests/phpunit/Adapter/AstroPay/AstroPayTest.php
@@ -19,6 +19,7 @@
use \Psr\Log\LogLevel;
use SmashPig\Core\DataStores\QueueWrapper;
use SmashPig\CrmLink\Messages\SourceFields;
+use SmashPig\CrmLink\FinalStatus;
use SmashPig\Tests\TestingContext;
use SmashPig\Tests\TestingProviderConfiguration;
use Wikimedia\TestingAccessWrapper;
diff --git a/tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
b/tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
index 8d73817..a5eb3db 100644
--- a/tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
+++ b/tests/phpunit/Adapter/GlobalCollect/RecurringTest.php
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*
*/
+use SmashPig\CrmLink\FinalStatus;
/**
*
diff --git a/tests/phpunit/Adapter/Ingenico/RecurringTest.php
b/tests/phpunit/Adapter/Ingenico/RecurringTest.php
index b3e4274..b55bdbd 100644
--- a/tests/phpunit/Adapter/Ingenico/RecurringTest.php
+++ b/tests/phpunit/Adapter/Ingenico/RecurringTest.php
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*
*/
+use SmashPig\CrmLink\FinalStatus;
/**
*
diff --git a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
index 87a148e..fb3d8ac 100644
--- a/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
+++ b/tests/phpunit/Adapter/PayPal/PayPalExpressTest.php
@@ -9,6 +9,7 @@
use Psr\Log\LogLevel;
use SmashPig\Core\DataStores\QueueWrapper;
+use SmashPig\CrmLink\FinalStatus;
use SmashPig\Tests\TestingContext;
use SmashPig\Tests\TestingProviderConfiguration;
--
To view, visit https://gerrit.wikimedia.org/r/403757
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I50685fbbfa07d2886e433e07e5e7ba7ff0f1a111
Gerrit-PatchSet: 8
Gerrit-Project: mediawiki/extensions/DonationInterface
Gerrit-Branch: master
Gerrit-Owner: Mepps <[email protected]>
Gerrit-Reviewer: AndyRussG <[email protected]>
Gerrit-Reviewer: Ejegg <[email protected]>
Gerrit-Reviewer: XenoRyet <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits