[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Revert "Revert "Merge branch 'master' into deployment""
jenkins-bot has submitted this change and it was merged. ( https://gerrit.wikimedia.org/r/363971 ) Change subject: Revert "Revert "Merge branch 'master' into deployment"" .. Revert "Revert "Merge branch 'master' into deployment"" Basically re-applying all the stuff we reverted, since the problems have fixes This reverts commit f8314476c2d391e992725686cb106f4b4488c7d6. Change-Id: Ie7e641537cf2495e1282e447934838865c2f4d02 --- M DonationInterface.alias.php M adyen_gateway/adyen.adapter.php M amazon_gateway/amazon.adapter.php M amazon_gateway/amazon.api.php M amazon_gateway/i18n/en.json M amazon_gateway/i18n/fr.json M amazon_gateway/i18n/qqq.json M amazon_gateway/i18n/ru.json M amazon_gateway/i18n/uk.json M extras/FraudFilter.php M extras/banner_history/BannerHistoryLogIdProcessor.php M gateway_common/DonationData.php M gateway_common/DonationQueue.php M gateway_common/GatewayType.php M gateway_common/NationalCurrencies.php M gateway_common/WmfFramework.drupal.php M gateway_common/WmfFramework.mediawiki.php M gateway_common/gateway.adapter.php M gateway_common/i18n/interface/ast.json M gateway_common/i18n/interface/bg.json M gateway_common/i18n/interface/bn.json M gateway_common/i18n/interface/bs.json M gateway_common/i18n/interface/en.json M gateway_common/i18n/interface/es.json M gateway_common/i18n/interface/fr.json M gateway_common/i18n/interface/hr.json M gateway_common/i18n/interface/ia.json M gateway_common/i18n/interface/it.json M gateway_common/i18n/interface/jv.json M gateway_common/i18n/interface/lt.json M gateway_common/i18n/interface/mk.json M gateway_common/i18n/interface/nb.json M gateway_common/i18n/interface/pt.json M gateway_common/i18n/interface/qqq.json M gateway_common/i18n/interface/ru.json M gateway_common/i18n/interface/sv.json M gateway_common/i18n/interface/uk.json M gateway_common/i18n/interface/ur.json M gateway_common/i18n/interface/yi.json M gateway_common/i18n/interface/zh-hans.json M gateway_common/i18n/interface/zh-hant.json M gateway_forms/mustache/forms.css M globalcollect_gateway/globalcollect_resultswitcher.body.php M globalcollect_gateway/i18n/es.json M globalcollect_gateway/orphan.adapter.php M paypal_gateway/express_checkout/paypal_express.adapter.php 46 files changed, 306 insertions(+), 301 deletions(-) Approvals: jenkins-bot: Verified Ejegg: Looks good to me, approved diff --git a/DonationInterface.alias.php b/DonationInterface.alias.php index 725754d..060dee0 100644 --- a/DonationInterface.alias.php +++ b/DonationInterface.alias.php @@ -1,11 +1,9 @@ array( 'GatewayFormChooser' ), - 'SystemStatus' => array( 'SystemStatus' ), -); +$specialPageAliases['en'] = [ + 'GatewayFormChooser' => [ 'GatewayFormChooser' ], + 'SystemStatus' => [ 'SystemStatus' ], +]; diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index c86adb5..8129c3e 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -215,8 +215,8 @@ * whether to capture the payment or leave it for manual review. * @return array */ - protected function getStompTransaction() { - $transaction = parent::getStompTransaction(); + protected function getQueueDonationMessage() { + $transaction = parent::getQueueDonationMessage(); $transaction['risk_score'] = $this->risk_score; return $transaction; } diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index 8d4473a..08e499a 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -199,7 +199,7 @@ ) ); // Stash their info in pending queue and logs to fill in data for // audit and IPN messages - $details = $this->getStompTransaction(); + $details = $this->getQueueDonationMessage(); $this->logger->info( 'Got info for Amazon donation: ' . json_encode( $details ) ); $this->sendPendingMessage(); } diff --git a/amazon_gateway/amazon.api.php b/amazon_gateway/amazon.api.php index 740b912..3b9cd54 100644 --- a/amazon_gateway/amazon.api.php +++ b/amazon_gateway/amazon.api.php @@ -24,7 +24,9 @@ ), ); - $adapter = new AmazonAdapter( $adapterParams ); + $adapterClass = DonationInterface::getAdapterClassForGateway( 'amazon' ); + // @var AmazonAdapter + $adapter = new $adapterClass( $adapterParams ); if ( $adapter->getErrorState()->hasErrors() ) { $output->addValue( diff --git a/amazon_gateway/i18n/en.json b/amazon_gateway/i18n/en.json index d0ba913..4b1ef57 100644 --- a/amazon_gateway/i18n/en.json +++ b/amazon_gateway/i18n/en.json @@ -4,6 +4,7 @@ }, "amazon_gateway-desc": "Amazon payment
[MediaWiki-commits] [Gerrit] mediawiki...DonationInterface[deployment]: Revert "Revert "Merge branch 'master' into deployment""
Ejegg has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/363971 ) Change subject: Revert "Revert "Merge branch 'master' into deployment"" .. Revert "Revert "Merge branch 'master' into deployment"" Basically re-applying all the stuff we reverted, since the problems have fixes This reverts commit f8314476c2d391e992725686cb106f4b4488c7d6. Change-Id: Ie7e641537cf2495e1282e447934838865c2f4d02 --- M DonationInterface.alias.php M adyen_gateway/adyen.adapter.php M amazon_gateway/amazon.adapter.php M amazon_gateway/amazon.api.php M amazon_gateway/i18n/en.json M amazon_gateway/i18n/fr.json M amazon_gateway/i18n/qqq.json M amazon_gateway/i18n/ru.json M amazon_gateway/i18n/uk.json M extras/FraudFilter.php M extras/banner_history/BannerHistoryLogIdProcessor.php M gateway_common/DonationData.php M gateway_common/DonationQueue.php M gateway_common/GatewayType.php M gateway_common/NationalCurrencies.php M gateway_common/WmfFramework.drupal.php M gateway_common/WmfFramework.mediawiki.php M gateway_common/gateway.adapter.php M gateway_common/i18n/interface/ast.json M gateway_common/i18n/interface/bg.json M gateway_common/i18n/interface/bn.json M gateway_common/i18n/interface/bs.json M gateway_common/i18n/interface/en.json M gateway_common/i18n/interface/es.json M gateway_common/i18n/interface/fr.json M gateway_common/i18n/interface/hr.json M gateway_common/i18n/interface/ia.json M gateway_common/i18n/interface/it.json M gateway_common/i18n/interface/jv.json M gateway_common/i18n/interface/lt.json M gateway_common/i18n/interface/mk.json M gateway_common/i18n/interface/nb.json M gateway_common/i18n/interface/pt.json M gateway_common/i18n/interface/qqq.json M gateway_common/i18n/interface/ru.json M gateway_common/i18n/interface/sv.json M gateway_common/i18n/interface/uk.json M gateway_common/i18n/interface/ur.json M gateway_common/i18n/interface/yi.json M gateway_common/i18n/interface/zh-hans.json M gateway_common/i18n/interface/zh-hant.json M gateway_forms/mustache/forms.css M globalcollect_gateway/globalcollect_resultswitcher.body.php M globalcollect_gateway/i18n/es.json M globalcollect_gateway/orphan.adapter.php M paypal_gateway/express_checkout/paypal_express.adapter.php 46 files changed, 306 insertions(+), 301 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/71/363971/1 diff --git a/DonationInterface.alias.php b/DonationInterface.alias.php index 725754d..060dee0 100644 --- a/DonationInterface.alias.php +++ b/DonationInterface.alias.php @@ -1,11 +1,9 @@ array( 'GatewayFormChooser' ), - 'SystemStatus' => array( 'SystemStatus' ), -); +$specialPageAliases['en'] = [ + 'GatewayFormChooser' => [ 'GatewayFormChooser' ], + 'SystemStatus' => [ 'SystemStatus' ], +]; diff --git a/adyen_gateway/adyen.adapter.php b/adyen_gateway/adyen.adapter.php index c86adb5..8129c3e 100644 --- a/adyen_gateway/adyen.adapter.php +++ b/adyen_gateway/adyen.adapter.php @@ -215,8 +215,8 @@ * whether to capture the payment or leave it for manual review. * @return array */ - protected function getStompTransaction() { - $transaction = parent::getStompTransaction(); + protected function getQueueDonationMessage() { + $transaction = parent::getQueueDonationMessage(); $transaction['risk_score'] = $this->risk_score; return $transaction; } diff --git a/amazon_gateway/amazon.adapter.php b/amazon_gateway/amazon.adapter.php index 8d4473a..08e499a 100644 --- a/amazon_gateway/amazon.adapter.php +++ b/amazon_gateway/amazon.adapter.php @@ -199,7 +199,7 @@ ) ); // Stash their info in pending queue and logs to fill in data for // audit and IPN messages - $details = $this->getStompTransaction(); + $details = $this->getQueueDonationMessage(); $this->logger->info( 'Got info for Amazon donation: ' . json_encode( $details ) ); $this->sendPendingMessage(); } diff --git a/amazon_gateway/amazon.api.php b/amazon_gateway/amazon.api.php index 740b912..3b9cd54 100644 --- a/amazon_gateway/amazon.api.php +++ b/amazon_gateway/amazon.api.php @@ -24,7 +24,9 @@ ), ); - $adapter = new AmazonAdapter( $adapterParams ); + $adapterClass = DonationInterface::getAdapterClassForGateway( 'amazon' ); + // @var AmazonAdapter + $adapter = new $adapterClass( $adapterParams ); if ( $adapter->getErrorState()->hasErrors() ) { $output->addValue( diff --git a/amazon_gateway/i18n/en.json b/amazon_gateway/i18n/en.json index d0ba913..4b1ef57 100644 --- a/amazon_gateway/i18n/en.json +++ b/amazon_gateway/i18n/en.json @@ -4,6 +4,7 @@ }, "amazon_gateway-desc":