Skip to content

Commit 430ce9c

Browse files
committed
Merge remote-tracking branch 'mainline/develop' into PR_Branch
2 parents 3371fbc + ef6ad27 commit 430ce9c

File tree

216 files changed

+1694
-1011
lines changed

Some content is hidden

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

216 files changed

+1694
-1011
lines changed

app/code/Magento/AdminNotification/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"lib-libxml": "*"
1111
},
1212
"type": "magento2-module",
13-
"version": "100.1.0-rc1",
13+
"version": "100.1.0-rc2",
1414
"license": [
1515
"OSL-3.0",
1616
"AFL-3.0"

app/code/Magento/AdvancedPricingImportExport/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.0-rc1",
16+
"version": "100.1.0-rc2",
1717
"license": [
1818
"OSL-3.0",
1919
"AFL-3.0"

app/code/Magento/Authorization/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"magento/framework": "100.1.*"
88
},
99
"type": "magento2-module",
10-
"version": "100.1.0-rc1",
10+
"version": "100.1.0-rc2",
1111
"license": [
1212
"OSL-3.0",
1313
"AFL-3.0"

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.0-rc1",
16+
"version": "100.1.0-rc2",
1717
"license": [
1818
"proprietary"
1919
],

app/code/Magento/Backend/Model/Session/Quote.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,9 @@ public function getQuote()
155155
if ($this->getStoreId()) {
156156
if (!$this->getQuoteId()) {
157157
$this->_quote->setCustomerGroupId($this->groupManagement->getDefaultGroup()->getId());
158+
$this->_quote->setIsActive(false);
158159
$this->_quote->setStoreId($this->getStoreId());
159-
160+
160161
$this->quoteRepository->save($this->_quote);
161162
$this->setQuoteId($this->_quote->getId());
162163
$this->_quote = $this->quoteRepository->get($this->getQuoteId(), [$this->getStoreId()]);

app/code/Magento/Backend/Test/Unit/Model/Session/QuoteTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,7 @@ public function testGetQuoteWithoutQuoteId()
343343
'',
344344
false
345345
);
346+
346347
$this->quoteRepositoryMock->expects($this->once())->method('get')->willReturn($quoteMock);
347348
$cartInterfaceMock->expects($this->once())
348349
->method('setCustomerGroupId')
@@ -357,7 +358,6 @@ public function testGetQuoteWithoutQuoteId()
357358
$quoteMock->expects($this->once())
358359
->method('setIsSuperMode')
359360
->with(true);
360-
361361
$this->assertEquals($quoteMock, $this->quote->getQuote());
362362
}
363363

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.0-rc1",
25+
"version": "100.1.0-rc2",
2626
"license": [
2727
"OSL-3.0",
2828
"AFL-3.0"

app/code/Magento/Backend/view/adminhtml/templates/page/js/calendar.phtml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ require([
5151
showHour: false,
5252
showMinute: false,
5353
serverTimezoneSeconds: <?php echo (int) $block->getStoreTimestamp(); ?>,
54+
serverTimezoneOffset: <?php echo (int) $block->getTimezoneOffsetSeconds(); ?>,
5455
yearRange: '<?php /* @escapeNotVerified */ echo $block->getYearRange() ?>'
5556
}
5657
});

app/code/Magento/Backup/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"magento/framework": "100.1.*"
1010
},
1111
"type": "magento2-module",
12-
"version": "100.1.0-rc1",
12+
"version": "100.1.0-rc2",
1313
"license": [
1414
"OSL-3.0",
1515
"AFL-3.0"

app/code/Magento/Braintree/Controller/Paypal/Review.php

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
use Magento\Framework\Controller\ResultFactory;
1111
use Magento\Braintree\Gateway\Config\PayPal\Config;
1212
use Magento\Braintree\Model\Paypal\Helper\QuoteUpdater;
13+
use Magento\Framework\Exception\LocalizedException;
1314

1415
/**
1516
* Class Review
@@ -21,6 +22,11 @@ class Review extends AbstractAction
2122
*/
2223
private $quoteUpdater;
2324

25+
/**
26+
* @var string
27+
*/
28+
private static $paymentMethodNonce = 'payment_method_nonce';
29+
2430
/**
2531
* Constructor
2632
*
@@ -52,13 +58,16 @@ public function execute()
5258

5359
try {
5460
$this->validateQuote($quote);
55-
$this->validateRequestData($requestData);
5661

57-
$this->quoteUpdater->execute(
58-
$requestData['nonce'],
59-
$requestData['details'],
60-
$quote
61-
);
62+
if ($this->validateRequestData($requestData)) {
63+
$this->quoteUpdater->execute(
64+
$requestData['nonce'],
65+
$requestData['details'],
66+
$quote
67+
);
68+
} elseif (!$quote->getPayment()->getAdditionalInformation(self::$paymentMethodNonce)) {
69+
throw new LocalizedException(__('We can\'t initialize checkout.'));
70+
}
6271

6372
/** @var \Magento\Framework\View\Result\Page $resultPage */
6473
$resultPage = $this->resultFactory->create(ResultFactory::TYPE_PAGE);
@@ -82,13 +91,10 @@ public function execute()
8291

8392
/**
8493
* @param array $requestData
85-
* @return void
86-
* @throws \InvalidArgumentException
94+
* @return boolean
8795
*/
8896
private function validateRequestData(array $requestData)
8997
{
90-
if (empty($requestData['nonce']) || empty($requestData['details'])) {
91-
throw new \InvalidArgumentException('Data of request cannot be empty.');
92-
}
98+
return !empty($requestData['nonce']) && !empty($requestData['details']);
9399
}
94100
}

0 commit comments

Comments
 (0)