Skip to content

Commit 3b89704

Browse files
author
Sergey Shvets
committed
Merge branch '2.1.8-develop' of github.com:magento/magento2ce into MAGETWO-68811
2 parents b90e0fe + 3016ddf commit 3b89704

File tree

515 files changed

+26242
-13481
lines changed

Some content is hidden

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

515 files changed

+26242
-13481
lines changed

app/code/Magento/AdvancedPricingImportExport/Model/Import/AdvancedPricing.php

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,24 @@ protected function retrieveOldSkus()
542542
*/
543543
protected function processCountExistingPrices($prices, $table)
544544
{
545+
$oldSkus = $this->retrieveOldSkus();
546+
$existProductIds = array_intersect_key($oldSkus, $prices);
547+
if (!count($existProductIds)) {
548+
return $this;
549+
}
550+
545551
$tableName = $this->_resourceFactory->create()->getTable($table);
546552
$productEntityLinkField = $this->getProductEntityLinkField();
547553
$existingPrices = $this->_connection->fetchAssoc(
548554
$this->_connection->select()->from(
549555
$tableName,
550556
['value_id', $productEntityLinkField, 'all_groups', 'customer_group_id']
551-
)
557+
)->where($productEntityLinkField . ' IN (?)', $existProductIds)
552558
);
553-
$oldSkus = $this->retrieveOldSkus();
554559
foreach ($existingPrices as $existingPrice) {
555-
foreach ($oldSkus as $sku => $productId) {
556-
if ($existingPrice[$productEntityLinkField] == $productId && isset($prices[$sku])) {
557-
$this->incrementCounterUpdated($prices[$sku], $existingPrice);
560+
foreach ($prices as $sku => $skuPrices) {
561+
if (isset($oldSkus[$sku]) && $existingPrice[$productEntityLinkField] == $oldSkus[$sku]) {
562+
$this->incrementCounterUpdated($skuPrices, $existingPrice);
558563
}
559564
}
560565
}

app/code/Magento/Authorizenet/Controller/Directpost/Payment/BackendResponse.php

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,48 @@
66
*/
77
namespace Magento\Authorizenet\Controller\Directpost\Payment;
88

9+
use Magento\Authorizenet\Helper\DataFactory;
10+
use Magento\Authorizenet\Model\Directpost;
11+
use Magento\Authorizenet\Model\DirectpostFactory;
12+
use Magento\Framework\App\Action\Context;
13+
use Magento\Framework\Controller\ResultFactory;
14+
use Magento\Framework\Exception\LocalizedException;
15+
use Magento\Framework\Registry;
16+
use Psr\Log\LoggerInterface;
17+
918
class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Payment
1019
{
20+
/**
21+
* @var LoggerInterface
22+
*/
23+
private $logger;
24+
25+
/**
26+
* @var DirectpostFactory
27+
*/
28+
private $directpostFactory;
29+
30+
/**
31+
* BackendResponse constructor.
32+
*
33+
* @param Context $context
34+
* @param Registry $coreRegistry
35+
* @param DataFactory $dataFactory
36+
* @param DirectpostFactory $directpostFactory
37+
* @param LoggerInterface|null $logger
38+
*/
39+
public function __construct(
40+
Context $context,
41+
Registry $coreRegistry,
42+
DataFactory $dataFactory,
43+
DirectpostFactory $directpostFactory = null,
44+
LoggerInterface $logger = null
45+
) {
46+
parent::__construct($context, $coreRegistry, $dataFactory);
47+
$this->directpostFactory = $directpostFactory ?: $this->_objectManager->create(DirectpostFactory::class);
48+
$this->logger = $logger ?: $this->_objectManager->get(LoggerInterface::class);
49+
}
50+
1151
/**
1252
* Response action.
1353
* Action for Authorize.net SIM Relay Request.
@@ -16,6 +56,21 @@ class BackendResponse extends \Magento\Authorizenet\Controller\Directpost\Paymen
1656
*/
1757
public function execute()
1858
{
59+
$data = $this->getRequest()->getParams();
60+
/** @var Directpost $paymentMethod */
61+
$paymentMethod = $this->directpostFactory->create();
62+
if (!empty($data['store_id'])) {
63+
$paymentMethod->setStore($data['store_id']);
64+
}
65+
$paymentMethod->setResponseData($data);
66+
try {
67+
$paymentMethod->validateResponse();
68+
} catch (LocalizedException $e) {
69+
$this->logger->critical($e->getMessage());
70+
$this->_redirect('noroute');
71+
return;
72+
}
1973
$this->_responseAction('adminhtml');
74+
$this->resultFactory->create(ResultFactory::TYPE_PAGE);
2075
}
2176
}

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.4",
16+
"version": "100.1.5",
1717
"license": [
1818
"proprietary"
1919
],

app/code/Magento/Braintree/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"magento/module-checkout-agreements": "100.1.*"
2525
},
2626
"type": "magento2-module",
27-
"version": "100.1.5",
27+
"version": "100.1.6",
2828
"license": [
2929
"proprietary"
3030
],

app/code/Magento/Braintree/view/adminhtml/ui_component/braintree_report.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<item name="deps" xsi:type="string">braintree_report.braintree_report_data_source</item>
1313
</item>
1414
<item name="spinner" xsi:type="string">braintree_report_columns</item>
15+
<item name="acl" xsi:type="string">Magento_Braintree::settlement_report</item>
1516
</argument>
1617
<dataSource name="braintree_report_data_source">
1718
<argument name="dataProvider" xsi:type="configurableObject">

app/code/Magento/Braintree/view/adminhtml/web/js/vault.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ define([
109109

110110
$('body').trigger('processStart');
111111

112-
$.get(self.nonceUrl, {
112+
$.getJSON(self.nonceUrl, {
113113
'public_hash': self.publicHash
114114
}).done(function (response) {
115115
self.setPaymentDetails(response.paymentMethodNonce);

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/paypal-vault.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ define([
4949
var self = this;
5050

5151
fullScreenLoader.startLoader();
52-
$.get(self.nonceUrl, {
52+
$.getJSON(self.nonceUrl, {
5353
'public_hash': self.publicHash
5454
})
5555
.done(function (response) {

app/code/Magento/Braintree/view/frontend/web/js/view/payment/method-renderer/vault.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ define([
6969
var self = this;
7070

7171
fullScreenLoader.startLoader();
72-
$.get(self.nonceUrl, {
72+
$.getJSON(self.nonceUrl, {
7373
'public_hash': self.publicHash
7474
})
7575
.done(function (response) {

app/code/Magento/Bundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"magento/module-bundle-sample-data": "Sample Data version:100.1.*"
2626
},
2727
"type": "magento2-module",
28-
"version": "100.1.2",
28+
"version": "100.1.3",
2929
"license": [
3030
"OSL-3.0",
3131
"AFL-3.0"

app/code/Magento/Bundle/view/adminhtml/ui_component/bundle_product_listing.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
<item name="deps" xsi:type="string">bundle_product_listing.bundle_product_listing_data_source</item>
1313
</item>
1414
<item name="spinner" xsi:type="string">product_columns</item>
15+
<item name="acl" xsi:type="string">Magento_Catalog::products</item>
1516
</argument>
1617
<dataSource name="bundle_product_listing_data_source">
1718
<argument name="dataProvider" xsi:type="configurableObject">

0 commit comments

Comments
 (0)