Skip to content

Commit 7d6b7d2

Browse files
author
Oleksii Korshenko
authored
Merge pull request #664 from magento-fearless-kiwis/MAGETWO-62136
[Kiwi] Prepare code base for 2.1.4
2 parents bd7f025 + f20117e commit 7d6b7d2

File tree

590 files changed

+17737
-2960
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

590 files changed

+17737
-2960
lines changed

app/code/Magento/Authorizenet/Model/Source/Cctype.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ class Cctype extends PaymentCctype
1717
*/
1818
public function getAllowedTypes()
1919
{
20-
return ['VI', 'MC', 'AE', 'DI', 'OT', 'JCB', 'DN'];
20+
return ['VI', 'MC', 'AE', 'DI', 'JCB', 'DN'];
2121
}
2222
}

app/code/Magento/Authorizenet/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"magento/framework": "100.1.*"
1414
},
1515
"type": "magento2-module",
16-
"version": "100.1.2",
16+
"version": "100.1.3",
1717
"license": [
1818
"proprietary"
1919
],

app/code/Magento/Authorizenet/etc/di.xml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,14 @@
1616
<argument name="storage" xsi:type="object">Magento\Authorizenet\Model\Directpost\Session\Storage</argument>
1717
</arguments>
1818
</type>
19+
<type name="Magento\Config\Model\Config\Export\ExcludeList">
20+
<arguments>
21+
<argument name="configs" xsi:type="array">
22+
<item name="payment/authorizenet_directpost/login" xsi:type="string">1</item>
23+
<item name="payment/authorizenet_directpost/trans_key" xsi:type="string">1</item>
24+
<item name="payment/authorizenet_directpost/trans_md5" xsi:type="string">1</item>
25+
<item name="payment/authorizenet_directpost/merchant_email" xsi:type="string">1</item>
26+
</argument>
27+
</arguments>
28+
</type>
1929
</config>

app/code/Magento/Backend/App/Config.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,20 @@
1212

1313
use Magento\Config\App\Config\Type\System;
1414
use Magento\Framework\App\Config\ScopeConfigInterface;
15+
use Magento\Framework\App\ObjectManager;
1516

1617
/**
1718
* Backend config accessor.
1819
*/
1920
class Config implements ConfigInterface
2021
{
22+
/**
23+
* @var \Magento\Framework\App\Config\ScopePool
24+
*
25+
* @deprecated
26+
*/
27+
protected $_scopePool;
28+
2129
/**
2230
* @var \Magento\Framework\App\Config
2331
*/
@@ -29,12 +37,17 @@ class Config implements ConfigInterface
2937
private $data;
3038

3139
/**
32-
* @param \Magento\Framework\App\Config $appConfig
33-
* @return void
40+
* @param \Magento\Framework\App\Config\ScopePool $scopePool
41+
* @param \Magento\Framework\App\Config|null $appConfig
3442
*/
35-
public function __construct(\Magento\Framework\App\Config $appConfig)
36-
{
37-
$this->appConfig = $appConfig;
43+
public function __construct(
44+
\Magento\Framework\App\Config\ScopePool $scopePool,
45+
\Magento\Framework\App\Config $appConfig = null
46+
) {
47+
$this->_scopePool = $scopePool;
48+
$this->appConfig = $appConfig ?: ObjectManager::getInstance()->get(
49+
\Magento\Framework\App\Config::class
50+
);
3851
}
3952

4053
/**

app/code/Magento/Backend/Test/Unit/App/ConfigTest.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ protected function setUp()
3434
'',
3535
false
3636
);
37-
$this->model = new \Magento\Backend\App\Config($this->appConfig);
37+
$this->model = new \Magento\Backend\App\Config(
38+
$this->getMock(\Magento\Framework\App\Config\ScopePool::class, [], [], '', false, false),
39+
$this->appConfig
40+
);
3841
}
3942

4043
public function testGetValue()

app/code/Magento/Backend/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"magento/framework": "100.1.*"
2323
},
2424
"type": "magento2-module",
25-
"version": "100.1.1",
25+
"version": "100.1.2",
2626
"license": [
2727
"OSL-3.0",
2828
"AFL-3.0"

app/code/Magento/Backend/etc/di.xml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,22 @@
214214
</argument>
215215
</arguments>
216216
</type>
217+
<type name="Magento\Config\Model\Config\Export\ExcludeList">
218+
<arguments>
219+
<argument name="configs" xsi:type="array">
220+
<item name="trans_email/ident_general/name" xsi:type="string">1</item>
221+
<item name="trans_email/ident_general/email" xsi:type="string">1</item>
222+
<item name="trans_email/ident_sales/name" xsi:type="string">1</item>
223+
<item name="trans_email/ident_sales/email" xsi:type="string">1</item>
224+
<item name="trans_email/ident_support/name" xsi:type="string">1</item>
225+
<item name="trans_email/ident_support/email" xsi:type="string">1</item>
226+
<item name="trans_email/ident_custom1/name" xsi:type="string">1</item>
227+
<item name="trans_email/ident_custom1/email" xsi:type="string">1</item>
228+
<item name="trans_email/ident_custom2/name" xsi:type="string">1</item>
229+
<item name="trans_email/ident_custom2/email" xsi:type="string">1</item>
230+
<item name="admin/url/custom" xsi:type="string">1</item>
231+
<item name="admin/url/custom_path" xsi:type="string">1</item>
232+
</argument>
233+
</arguments>
234+
</type>
217235
</config>
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
<?php
2+
/**
3+
* Copyright © 2016 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Braintree\Block\Customer\PayPal;
7+
8+
use Magento\Braintree\Gateway\Config\PayPal\Config;
9+
use Magento\Braintree\Model\Ui\PayPal\ConfigProvider;
10+
use Magento\Framework\View\Element\Template;
11+
use Magento\Vault\Api\Data\PaymentTokenInterface;
12+
use Magento\Vault\Block\AbstractTokenRenderer;
13+
14+
/**
15+
* Class VaultTokenRenderer
16+
*/
17+
class VaultTokenRenderer extends AbstractTokenRenderer
18+
{
19+
/**
20+
* @var Config
21+
*/
22+
private $config;
23+
24+
public function __construct(
25+
Template\Context $context,
26+
Config $config,
27+
array $data = []
28+
) {
29+
parent::__construct($context, $data);
30+
$this->config = $config;
31+
}
32+
33+
/**
34+
* @inheritdoc
35+
*/
36+
public function getIconUrl()
37+
{
38+
return $this->config->getPayPalIcon()['url'];
39+
}
40+
41+
/**
42+
* @inheritdoc
43+
*/
44+
public function getIconHeight()
45+
{
46+
return $this->config->getPayPalIcon()['height'];
47+
}
48+
49+
/**
50+
* @inheritdoc
51+
*/
52+
public function getIconWidth()
53+
{
54+
return $this->config->getPayPalIcon()['width'];
55+
}
56+
57+
/**
58+
* Can render specified token
59+
*
60+
* @param PaymentTokenInterface $token
61+
* @return boolean
62+
*/
63+
public function canRender(PaymentTokenInterface $token)
64+
{
65+
return $token->getPaymentMethodCode() === ConfigProvider::PAYPAL_CODE;
66+
}
67+
68+
/**
69+
* Get email of PayPal payer
70+
* @return string
71+
*/
72+
public function getPayerEmail()
73+
{
74+
return $this->getTokenDetails()['payerEmail'];
75+
}
76+
}

app/code/Magento/Braintree/Gateway/Command/CaptureStrategyCommand.php

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -166,16 +166,25 @@ private function isExpiredAuthorization(OrderPaymentInterface $payment)
166166
*/
167167
private function isExistsCaptureTransaction(OrderPaymentInterface $payment)
168168
{
169-
$filters[] = $this->filterBuilder->setField('payment_id')
170-
->setValue($payment->getId())
171-
->create();
169+
$this->searchCriteriaBuilder->addFilters(
170+
[
171+
$this->filterBuilder
172+
->setField('payment_id')
173+
->setValue($payment->getId())
174+
->create(),
175+
]
176+
);
172177

173-
$filters[] = $this->filterBuilder->setField('txn_type')
174-
->setValue(TransactionInterface::TYPE_CAPTURE)
175-
->create();
178+
$this->searchCriteriaBuilder->addFilters(
179+
[
180+
$this->filterBuilder
181+
->setField('txn_type')
182+
->setValue(TransactionInterface::TYPE_CAPTURE)
183+
->create(),
184+
]
185+
);
176186

177-
$searchCriteria = $this->searchCriteriaBuilder->addFilters($filters)
178-
->create();
187+
$searchCriteria = $this->searchCriteriaBuilder->create();
179188

180189
$count = $this->transactionRepository->getList($searchCriteria)->getTotalCount();
181190
return (boolean) $count;

app/code/Magento/Braintree/Gateway/Config/Config.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,14 @@ class Config extends \Magento\Payment\Gateway\Config\Config
3030
const KEY_KOUNT_MERCHANT_ID = 'kount_id';
3131
const FRAUD_PROTECTION = 'fraudprotection';
3232

33+
/**
34+
* Get list of available dynamic descriptors keys
35+
* @var array
36+
*/
37+
private static $dynamicDescriptorKeys = [
38+
'name', 'phone', 'url'
39+
];
40+
3341
/**
3442
* Return the country specific card type config
3543
*
@@ -170,6 +178,22 @@ public function isActive()
170178
return (bool) $this->getValue(self::KEY_ACTIVE);
171179
}
172180

181+
/**
182+
* Get list of configured dynamic descriptors
183+
* @return array
184+
*/
185+
public function getDynamicDescriptors()
186+
{
187+
$values = [];
188+
foreach (self::$dynamicDescriptorKeys as $key) {
189+
$value = $this->getValue('descriptor_' . $key);
190+
if (!empty($value)) {
191+
$values[$key] = $value;
192+
}
193+
}
194+
return $values;
195+
}
196+
173197
/**
174198
* Get Merchant account ID
175199
*

0 commit comments

Comments
 (0)