Skip to content

Commit a386178

Browse files
author
Sergey Shvets
committed
Merge remote-tracking branch 'm2/2.1' into 2.1-develop
2 parents 0c6c8a2 + 7026628 commit a386178

File tree

179 files changed

+12829
-11030
lines changed

Some content is hidden

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

179 files changed

+12829
-11030
lines changed

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">

app/code/Magento/Catalog/Block/Product/AbstractProduct.php

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
*/
66
namespace Magento\Catalog\Block\Product;
77

8-
use Magento\Framework\App\ObjectManager;
9-
108
/**
119
* Class AbstractProduct
1210
* @SuppressWarnings(PHPMD.NumberOfChildren)
@@ -99,13 +97,9 @@ class AbstractProduct extends \Magento\Framework\View\Element\Template
9997
/**
10098
* @param Context $context
10199
* @param array $data
102-
* @param ImageBlockBuilder|null $imageBlockBuilder
103100
*/
104-
public function __construct(
105-
Context $context,
106-
array $data = [],
107-
ImageBlockBuilder $imageBlockBuilder = null
108-
) {
101+
public function __construct(\Magento\Catalog\Block\Product\Context $context, array $data = [])
102+
{
109103
$this->_imageHelper = $context->getImageHelper();
110104
$this->imageBuilder = $context->getImageBuilder();
111105
$this->_compareProduct = $context->getCompareProduct();
@@ -117,10 +111,6 @@ public function __construct(
117111
$this->_mathRandom = $context->getMathRandom();
118112
$this->reviewRenderer = $context->getReviewRenderer();
119113
$this->stockRegistry = $context->getStockRegistry();
120-
$this->assign(
121-
'imageBlockBuilder',
122-
$imageBlockBuilder ?: ObjectManager::getInstance()->get(ImageBlockBuilder::class)
123-
);
124114
parent::__construct($context, $data);
125115
}
126116

app/code/Magento/Catalog/Block/Product/ImageBlockBuilder.php

Lines changed: 0 additions & 157 deletions
This file was deleted.

app/code/Magento/Catalog/Block/Product/View/Attributes.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Magento\Catalog\Block\Product\View;
1313

1414
use Magento\Catalog\Model\Product;
15+
use Magento\Framework\Phrase;
1516
use Magento\Framework\Pricing\PriceCurrencyInterface;
1617

1718
class Attributes extends \Magento\Framework\View\Element\Template
@@ -86,7 +87,7 @@ public function getAdditionalData(array $excludeAttr = [])
8687
$value = $this->priceCurrency->convertAndFormat($value);
8788
}
8889

89-
if (is_string($value) && strlen($value)) {
90+
if (($value instanceof Phrase || is_string($value)) && strlen($value)) {
9091
$data[$attribute->getAttributeCode()] = [
9192
'label' => __($attribute->getStoreLabel()),
9293
'value' => $value,

app/code/Magento/Catalog/Block/Product/View/Gallery.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,15 @@ public function getGalleryImages()
6363
);
6464
$image->setData(
6565
'medium_image_url',
66-
$this->_imageHelper->init($product, 'product_page_image_medium_no_frame')
66+
$this->_imageHelper->init($product, 'product_page_image_medium')
67+
->constrainOnly(true)->keepAspectRatio(true)->keepFrame(false)
6768
->setImageFile($image->getFile())
6869
->getUrl()
6970
);
7071
$image->setData(
7172
'large_image_url',
72-
$this->_imageHelper->init($product, 'product_page_image_large_no_frame')
73+
$this->_imageHelper->init($product, 'product_page_image_large')
74+
->constrainOnly(true)->keepAspectRatio(true)->keepFrame(false)
7375
->setImageFile($image->getFile())
7476
->getUrl()
7577
);

0 commit comments

Comments
 (0)