Ejegg has uploaded a new change for review. https://gerrit.wikimedia.org/r/271592
Change subject: Merge master into deployment ...................................................................... Merge master into deployment d116eca Use composer-managed Minfraud classes 97a6409 Localisation updates from https://translatewiki.net. 5f62b8c Allow logarithmically increasing Velocity penalty 1da6f99 Localisation updates from https://translatewiki.net. 614abfd Fix case of Html class 18fb1b2 Log Adyen donation details before redirect 59fb1c5 Switch to ct_id + sequenceNum order IDs Removed tests, updated vendor pointer Change-Id: If3bc0b31da11711abe55f29a7a2ac029320168a2 --- D tests/FraudFiltersTest.php M vendor 2 files changed, 0 insertions(+), 131 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/DonationInterface refs/changes/92/271592/1 diff --git a/tests/FraudFiltersTest.php b/tests/FraudFiltersTest.php deleted file mode 100644 index 15413c1..0000000 --- a/tests/FraudFiltersTest.php +++ /dev/null @@ -1,131 +0,0 @@ -<<<<<<< HEAD (9cafae Merge master into deployment) -======= -<?php -/** - * Wikimedia Foundation - * - * LICENSE - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - */ - -/** - * @group Fundraising - * @group DonationInterface - * @group FormChooser - */ -class DonationInterface_FraudFiltersTest extends DonationInterfaceTestCase { - - /** - * @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 - */ - public function __construct( $name = null, array $data = array(), $dataName = '' ) { - $adapterclass = TESTS_ADAPTER_DEFAULT; - $this->testAdapterClass = $adapterclass; - - parent::__construct( $name, $data, $dataName ); - self::setupFraudMaps(); - } - - public static function setupFraudMaps() { - //yeesh. - global $wgDonationInterfaceCustomFiltersActionRanges, $wgDonationInterfaceCustomFiltersRefRules, $wgDonationInterfaceCustomFiltersSrcRules, - $wgDonationInterfaceCustomFiltersFunctions, $wgGlobalCollectGatewayCustomFiltersFunctions, $wgWorldpayGatewayCustomFiltersFunctions, - $wgDonationInterfaceCountryMap, $wgDonationInterfaceUtmCampaignMap, $wgDonationInterfaceUtmSourceMap, $wgDonationInterfaceUtmMediumMap, - $wgDonationInterfaceEmailDomainMap; - - $wgDonationInterfaceCustomFiltersActionRanges = array ( - 'process' => array ( 0, 25 ), - 'review' => array ( 25, 50 ), - 'challenge' => array ( 50, 75 ), - 'reject' => array ( 75, 100 ), - ); - - $wgDonationInterfaceCustomFiltersRefRules = array ( - '/donate-error/i' => 5, - ); - - $wgDonationInterfaceCustomFiltersSrcRules = array ( '/wikimedia\.org/i' => 80 ); - - $wgDonationInterfaceCustomFiltersFunctions = array ( - 'getScoreCountryMap' => 50, - 'getScoreUtmCampaignMap' => 50, - 'getScoreUtmSourceMap' => 15, - 'getScoreUtmMediumMap' => 15, - 'getScoreEmailDomainMap' => 75 - ); - - $wgGlobalCollectGatewayCustomFiltersFunctions = $wgDonationInterfaceCustomFiltersFunctions; - $wgGlobalCollectGatewayCustomFiltersFunctions['getCVVResult'] = 20; - $wgGlobalCollectGatewayCustomFiltersFunctions['getAVSResult'] = 25; - - $wgWorldpayGatewayCustomFiltersFunctions = $wgGlobalCollectGatewayCustomFiltersFunctions; - - $wgDonationInterfaceCountryMap = array ( - 'US' => 40, - 'CA' => 15, - 'RU' => -4, - ); - - $wgDonationInterfaceUtmCampaignMap = array ( - '/^(C14_)/' => 14, - '/^(spontaneous)/' => 5 - ); - $wgDonationInterfaceUtmSourceMap = array ( - '/somethingmedia/' => 70 - ); - $wgDonationInterfaceUtmMediumMap = array ( - '/somethingmedia/' => 80 - ); - $wgDonationInterfaceEmailDomainMap = array ( - 'wikimedia.org' => 42, - 'wikipedia.org' => 50, - ); - } - - function testGCFraudFilters() { - global $wgGlobalCollectGatewayEnableMinfraud; - $wgGlobalCollectGatewayEnableMinfraud = true; - - $options = $this->getDonorTestData(); - $options['email'] = '[email protected]'; - $class = $this->testAdapterClass; - - $gateway = $this->getFreshGatewayObject( $options ); - - $gateway->runAntifraudHooks(); - - $this->assertEquals( 'reject', $gateway->getValidationAction(), 'Validation action is not as expected' ); - $exposed = TestingAccessWrapper::newFromObject( $gateway ); - $this->assertEquals( 157.5, $exposed->risk_score, 'RiskScore is not as expected' ); - - unset( $wgGlobalCollectGatewayEnableMinfraud ); - } -} -// Stub out Minfraud class for CI tests -if ( !class_exists( 'CreditCardFraudDetection' ) ) { - class CreditCardFraudDetection{ - public $server; - public function filter_field( $a, $b ) { - return 'blah'; - } - public function query() {} - public function input( $a ) {} - public function output() { - return array(); - } - } -} - ->>>>>>> BRANCH (59fb1c Switch to ct_id + sequenceNum order IDs) diff --git a/vendor b/vendor index 86615ab..1141c4d 160000 --- a/vendor +++ b/vendor -Subproject commit 86615ab0ddac2b90927bb473c24962efb158e8ea +Subproject commit 1141c4d6bc5d0e963bcb47248c5c72462a99bc72 -- To view, visit https://gerrit.wikimedia.org/r/271592 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If3bc0b31da11711abe55f29a7a2ac029320168a2 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/extensions/DonationInterface Gerrit-Branch: deployment Gerrit-Owner: Ejegg <[email protected]> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
