Skip to content

Commit 0b4c496

Browse files
committed
Merge branch '2.3-develop' into feature/271-Customer-Attributes-Validation
2 parents da8d6ac + 2e7f039 commit 0b4c496

File tree

415 files changed

+10753
-2486
lines changed

Some content is hidden

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

415 files changed

+10753
-2486
lines changed

app/code/Magento/AdvancedSearch/view/adminhtml/templates/system/config/testconnection.phtml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
// @codingStandardsIgnoreFile
76
?>
87
<button class="scalable" type="button" id="<?= $block->getHtmlId() ?>" data-mage-init='{"testConnection":{
98
"url": "<?= $block->escapeUrl($block->getAjaxUrl()) ?>",

app/code/Magento/AdvancedSearch/view/frontend/templates/search_data.phtml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,22 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
// @codingStandardsIgnoreFile
6+
77
/**
88
* @var \Magento\AdvancedSearch\Block\SearchData $block
99
*/
1010
?>
1111
<?php
1212
/** @var \Magento\Search\Model\QueryResult[] $data */
1313
$data = $block->getItems();
14-
if (count($data)):?>
14+
if (count($data)) : ?>
1515
<dl class="block">
1616
<dt class="title"><?= $block->escapeHtml(__($block->getTitle())) ?></dt>
1717
<?php foreach ($data as $additionalInfo) : ?>
1818
<dd class="item">
1919
<a href="<?= $block->escapeUrl($block->getLink($additionalInfo->getQueryText())) ?>"
2020
><?= $block->escapeHtml($additionalInfo->getQueryText()) ?></a>
21-
<?php if ($block->isShowResultsCount()): ?>
21+
<?php if ($block->isShowResultsCount()) : ?>
2222
<span class="count"><?= /* @noEscape */ (int)$additionalInfo->getResultsCount() ?></span>
2323
<?php endif; ?>
2424
</dd>

app/code/Magento/Analytics/view/adminhtml/templates/dashboard/section.phtml

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
// @codingStandardsIgnoreFile
76
?>
87

98
<section class="dashboard-advanced-reports" data-index="dashboard-advanced-reports">

app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/iframe.phtml

+4-6
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
8-
97
/**
108
* @var $block \Magento\Authorizenet\Block\Transparent\Iframe
119
*/
@@ -15,15 +13,15 @@ $helper = $block->getHelper('adminhtml');
1513
<html>
1614
<head>
1715
<script>
18-
<?php if (isset($params['redirect'])): ?>
16+
<?php if (isset($params['redirect'])) : ?>
1917
window.location="<?= $block->escapeUrl($params['redirect']) ?>";
2018
<?php endif; ?>
21-
<?php if (isset($params['redirect_parent'])): ?>
19+
<?php if (isset($params['redirect_parent'])) : ?>
2220
window.top.location="<?= $block->escapeUrl($params['redirect_parent']) ?>";
2321
<?php endif; ?>
24-
<?php if (isset($params['error_msg'])): ?>
22+
<?php if (isset($params['error_msg'])) : ?>
2523
window.top.directPostModel.showError(<?= /* @noEscape */ json_encode((array)$params['error_msg']) ?>);
26-
<?php if (isset($params['x_invoice_num'])): ?>
24+
<?php if (isset($params['x_invoice_num'])) : ?>
2725
window.top.directPostModel.successUrl="<?= $block->escapeUrl($helper->getSuccessOrderUrl($params)) ?>";
2826
<?php endif; ?>
2927
<?php endif; ?>

app/code/Magento/Authorizenet/view/adminhtml/templates/directpost/info.phtml

+8-9
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,14 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
87
/**
98
* @var \Magento\Authorizenet\Block\Transparent\Iframe $block
109
* @see \Magento\Authorizenet\Block\Transparent\Iframe
1110
*/
1211
$code = $block->escapeHtml($block->getMethodCode());
1312
$method = $block->getMethod();
1413
$controller = $block->escapeHtml($block->getRequest()->getControllerName());
15-
$orderUrl = $block->escapeUrl($this->helper('Magento\Authorizenet\Helper\Backend\Data')->getPlaceOrderAdminUrl());
14+
$orderUrl = $block->escapeUrl($block->getHelper('adminhtml')->getPlaceOrderAdminUrl());
1615
$ccType = $block->getInfoData('cc_type');
1716
$ccExpMonth = $block->getInfoData('cc_exp_month');
1817
$ccExpYear = $block->getInfoData('cc_exp_year');
@@ -41,9 +40,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4140
'validate-cc-type-select':'#<?= /* @noEscape */ $code ?>_cc_number'
4241
}">
4342
<option value=""><?= $block->escapeHtml(__('Please Select')) ?></option>
44-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
43+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
4544
<option value="<?= $block->escapeHtml($typeCode) ?>"
46-
<?php if ($typeCode == $ccType): ?>selected="selected"<?php endif; ?>>
45+
<?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif; ?>>
4746
<?= $block->escapeHtml($typeName) ?>
4847
</option>
4948
<?php endforeach; ?>
@@ -81,9 +80,9 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
8180
'required':true,
8281
'validate-cc-exp':'#<?= /* @noEscape */ $code ?>_expiration_yr'
8382
}">
84-
<?php foreach ($block->getCcMonths() as $k => $v): ?>
83+
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
8584
<option value="<?= $block->escapeHtml($k) ?>"
86-
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif; ?>>
85+
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif; ?>>
8786
<?= $block->escapeHtml($v) ?>
8887
</option>
8988
<?php endforeach; ?>
@@ -93,17 +92,17 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
9392
class="admin__control-select admin__control-select-year"
9493
data-container="<?= /* @noEscape */ $code ?>-cc-year"
9594
data-validate="{required:true}">
96-
<?php foreach ($block->getCcYears() as $k => $v): ?>
95+
<?php foreach ($block->getCcYears() as $k => $v) : ?>
9796
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
98-
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif; ?>>
97+
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif; ?>>
9998
<?= $block->escapeHtml($v) ?>
10099
</option>
101100
<?php endforeach; ?>
102101
</select>
103102
</div>
104103
</div>
105104

106-
<?php if ($block->hasVerification()): ?>
105+
<?php if ($block->hasVerification()) : ?>
107106
<div class="admin__field _required field-cvv">
108107
<label class="admin__field-label"
109108
for="<?= /* @noEscape */ $code ?>_cc_cid"

app/code/Magento/Authorizenet/view/adminhtml/templates/order/view/info/fraud_details.phtml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,49 +4,48 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
87
/**
98
* @var \Magento\Authorizenet\Block\Adminhtml\Order\View\Info\FraudDetails $block
109
*/
1110
$payment = $block->getPayment();
1211
$fraudDetails = $payment->getAdditionalInformation('fraud_details');
1312
?>
1413

15-
<?php if (!empty($fraudDetails)): ?>
14+
<?php if (!empty($fraudDetails)) : ?>
1615
<div class="admin__page-section-item-title">
1716
<span class="title"><?= $block->escapeHtml(__('Fraud Detection ')) ?></span>
1817
</div>
1918

2019
<div class="admin__page-section-item-content">
2120
<div class="order-payment-additional">
22-
<?php if(!empty($fraudDetails['fds_filter_action'])): ?>
21+
<?php if (!empty($fraudDetails['fds_filter_action'])) : ?>
2322
<?= $block->escapeHtml(__('FDS Filter Action')) ?>:
2423
<?= $block->escapeHtml($fraudDetails['fds_filter_action']) ?>
2524
</br>
2625
<?php endif; ?>
2726

28-
<?php if(!empty($fraudDetails['avs_response'])): ?>
27+
<?php if (!empty($fraudDetails['avs_response'])) : ?>
2928
<?= $block->escapeHtml(__('AVS Response')) ?>:
3029
<?= $block->escapeHtml($fraudDetails['avs_response']) ?>
3130
</br>
3231
<?php endif; ?>
3332

34-
<?php if(!empty($fraudDetails['card_code_response'])): ?>
33+
<?php if (!empty($fraudDetails['card_code_response'])) : ?>
3534
<?= $block->escapeHtml(__('Card Code Response')) ?>:
3635
<?= $block->escapeHtml($fraudDetails['card_code_response']) ?>
3736
</br>
3837
<?php endif; ?>
3938

40-
<?php if(!empty($fraudDetails['cavv_response']) || ($fraudDetails['cavv_response'] === 0)): ?>
39+
<?php if (!empty($fraudDetails['cavv_response']) || ($fraudDetails['cavv_response'] === 0)) : ?>
4140
<?= $block->escapeHtml(__('CAVV Response')) ?>:
4241
<?= $block->escapeHtml($fraudDetails['cavv_response']) ?>
4342
</br>
4443
<?php endif; ?>
4544

46-
<?php if(!empty($fraudDetails['fraud_filters'])): ?>
45+
<?php if (!empty($fraudDetails['fraud_filters'])) : ?>
4746
<strong><?= $block->escapeHtml(__('Fraud Filters')) ?>:
4847
</strong></br>
49-
<?php foreach($fraudDetails['fraud_filters'] as $filter): ?>
48+
<?php foreach ($fraudDetails['fraud_filters'] as $filter) : ?>
5049
<?= $block->escapeHtml($filter['name']) ?>:
5150
<?= $block->escapeHtml($filter['action']) ?>
5251
</br>

app/code/Magento/AuthorizenetAcceptjs/Gateway/Response/CloseTransactionHandler.php

+9-2
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,19 @@ class CloseTransactionHandler implements HandlerInterface
2222
*/
2323
private $subjectReader;
2424

25+
/**
26+
* @var bool
27+
*/
28+
private $closeTransaction;
29+
2530
/**
2631
* @param SubjectReader $subjectReader
32+
* @param bool $closeTransaction
2733
*/
28-
public function __construct(SubjectReader $subjectReader)
34+
public function __construct(SubjectReader $subjectReader, bool $closeTransaction = true)
2935
{
3036
$this->subjectReader = $subjectReader;
37+
$this->closeTransaction = $closeTransaction;
3138
}
3239

3340
/**
@@ -39,7 +46,7 @@ public function handle(array $handlingSubject, array $response): void
3946
$payment = $paymentDO->getPayment();
4047

4148
if ($payment instanceof Payment) {
42-
$payment->setIsTransactionClosed(true);
49+
$payment->setIsTransactionClosed($this->closeTransaction);
4350
$payment->setShouldCloseParentTransaction(true);
4451
}
4552
}

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

+6-1
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,15 @@
188188
</argument>
189189
</arguments>
190190
</virtualType>
191+
<virtualType name="CloseCaptureTransactionHandler" type="Magento\AuthorizenetAcceptjs\Gateway\Response\CloseTransactionHandler">
192+
<arguments>
193+
<argument name="closeTransaction" xsi:type="boolean">false</argument>
194+
</arguments>
195+
</virtualType>
191196
<virtualType name="AuthorizenetAcceptjsCaptureTransactionHandler" type="Magento\Payment\Gateway\Response\HandlerChain">
192197
<arguments>
193198
<argument name="handlers" xsi:type="array">
194-
<item name="close_parent_transaction" xsi:type="string">Magento\AuthorizenetAcceptjs\Gateway\Response\CloseParentTransactionHandler</item>
199+
<item name="close_transaction" xsi:type="string">CloseCaptureTransactionHandler</item>
195200
</argument>
196201
</arguments>
197202
</virtualType>

app/code/Magento/AuthorizenetAcceptjs/view/adminhtml/templates/form/cc.phtml

+7-8
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
* See COPYING.txt for license details.
55
*/
66

7-
// @codingStandardsIgnoreFile
87
/**
98
* @var Magento\AuthorizenetAcceptjs\Block\Form $block
109
*/
@@ -23,8 +22,8 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
2322
<select id="<?= /* @noEscape */ $code ?>_cc_type" name="payment[cc_type]"
2423
class="required-entry validate-cc-type-select admin__control-select">
2524
<option value=""></option>
26-
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName): ?>
27-
<option value="<?= $block->escapeHtml($typeCode) ?>" <?php if ($typeCode == $ccType): ?>selected="selected"<?php endif ?>>
25+
<?php foreach ($block->getCcAvailableTypes() as $typeCode => $typeName) : ?>
26+
<option value="<?= $block->escapeHtml($typeCode) ?>" <?php if ($typeCode == $ccType) : ?>selected="selected"<?php endif ?>>
2827
<?= $block->escapeHtml($typeName) ?>
2928
</option>
3029
<?php endforeach ?>
@@ -48,26 +47,26 @@ $ccExpYear = $block->getInfoData('cc_exp_year');
4847
<div class="admin__field-control">
4948
<select id="<?= /* @noEscape */ $code ?>_cc_exp_month" name="payment[cc_exp_month]"
5049
class="admin__control-select admin__control-select-month validate-cc-exp required-entry">
51-
<?php foreach ($block->getCcMonths() as $k => $v): ?>
50+
<?php foreach ($block->getCcMonths() as $k => $v) : ?>
5251
<option value="<?= $block->escapeHtml($k) ?>"
53-
<?php if ($k == $ccExpMonth): ?>selected="selected"<?php endif ?>>
52+
<?php if ($k == $ccExpMonth) : ?>selected="selected"<?php endif ?>>
5453
<?= $block->escapeHtml($v) ?>
5554
</option>
5655
<?php endforeach; ?>
5756
</select>
5857
<select id="<?= /* @noEscape */ $code ?>_cc_exp_year" name="payment[cc_exp_year]"
5958
class="admin__control-select admin__control-select-year required-entry">
60-
<?php foreach ($block->getCcYears() as $k => $v): ?>
59+
<?php foreach ($block->getCcYears() as $k => $v) : ?>
6160
<option value="<?= /* @noEscape */ $k ? $block->escapeHtml($k) : '' ?>"
62-
<?php if ($k == $ccExpYear): ?>selected="selected"<?php endif ?>>
61+
<?php if ($k == $ccExpYear) : ?>selected="selected"<?php endif ?>>
6362
<?= $block->escapeHtml($v) ?>
6463
</option>
6564
<?php endforeach ?>
6665
</select>
6766
</div>
6867
</div>
6968

70-
<?php if ($block->isCvvEnabled()): ?>
69+
<?php if ($block->isCvvEnabled()) : ?>
7170
<div class="field-number required admin__field _required">
7271
<label class="admin__field-label" for="<?= /* @noEscape */ $code ?>_cc_cid">
7372
<span><?= $block->escapeHtml(__('Card Verification Number')) ?></span>

app/code/Magento/Backend/Test/Mftf/ActionGroup/SetAdminAccountActionGroup.xml

+5-4
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,16 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
1111
<actionGroup name="SetAdminAccountActionGroup">
1212
<arguments>
13-
<argument name="InterfaceLocaleByValue" type="string"/>
13+
<argument name="InterfaceLocaleByValue" defaultValue="en_US" type="string"/>
1414
</arguments>
1515
<!-- Navigate to admin System Account Page-->
1616
<amOnPage url="{{AdminSystemAccountPage.url}}" stepKey="openAdminSystemAccountPage" />
17-
<waitForPageLoad stepKey="loadAdminSystemAccountPage"/>
17+
<waitForElementVisible selector="{{AdminSystemAccountSection.interfaceLocale}}" stepKey="waitForInterfaceLocale"/>
1818
<!-- Change Admin locale to Français (France) / French (France) -->
1919
<selectOption userInput="{{InterfaceLocaleByValue}}" selector="{{AdminSystemAccountSection.interfaceLocale}}" stepKey="setInterfaceLocate"/>
2020
<fillField selector="{{AdminSystemAccountSection.currentPassword}}" userInput="{{_ENV.MAGENTO_ADMIN_PASSWORD}}" stepKey="fillPassword"/>
21-
<click selector="{{AdminCustomerMainActionsSection.saveButton}}" stepKey="clickSave"/>
22-
<waitForElement selector="{{AdminCustomerMessagesSection.successMessage}}" stepKey="waitSuccessMessage"/>
21+
<click selector="{{AdminMainActionsSection.save}}" stepKey="clickSave"/>
22+
<waitForElementVisible selector="{{AdminMessagesSection.success}}" stepKey="waitSuccessMessage"/>
23+
<see selector="{{AdminMessagesSection.success}}" userInput="You saved the account." stepKey="seeSuccessMessage"/>
2324
</actionGroup>
2425
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Section/AdminSystemAccountSection.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminSystemAccountSection">
12-
<element name="interfaceLocale" type="text" selector="#interface_locale"/>
12+
<element name="interfaceLocale" type="select" selector="#interface_locale"/>
1313
<element name="currentPassword" type="text" selector="#current_password"/>
1414
</section>
1515
</sections>

app/code/Magento/Backup/view/adminhtml/templates/backup/list.phtml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6-
7-
// @codingStandardsIgnoreFile
8-
96
?>
107
<?= $block->getChildHtml('grid') ?>
118
<?= $block->getGridHtml() ?>

app/code/Magento/Braintree/Model/LocaleResolver.php

+16-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
use Magento\Framework\Locale\ResolverInterface;
99
use Magento\Braintree\Gateway\Config\PayPal\Config;
1010

11+
/**
12+
* Resolves locale for PayPal Express.
13+
*/
1114
class LocaleResolver implements ResolverInterface
1215
{
1316
/**
@@ -20,6 +23,17 @@ class LocaleResolver implements ResolverInterface
2023
*/
2124
private $config;
2225

26+
/**
27+
* Mapping Magento locales on PayPal locales.
28+
*
29+
* @var array
30+
*/
31+
private $localeMap = [
32+
'zh_Hans_CN' => 'zh_CN',
33+
'zh_Hant_HK' => 'zh_HK',
34+
'zh_Hant_TW' => 'zh_TW'
35+
];
36+
2337
/**
2438
* @param ResolverInterface $resolver
2539
* @param Config $config
@@ -66,10 +80,11 @@ public function setLocale($locale = null)
6680
* Gets store's locale or the `en_US` locale if store's locale does not supported by PayPal.
6781
*
6882
* @return string
83+
* @see https://braintree.github.io/braintree-web/current/PayPalCheckout.html#createPayment
6984
*/
7085
public function getLocale()
7186
{
72-
$locale = $this->resolver->getLocale();
87+
$locale = $this->localeMap[$this->resolver->getLocale()] ?? $this->resolver->getLocale();
7388
$allowedLocales = $this->config->getValue('supported_locales');
7489

7590
return strpos($allowedLocales, $locale) !== false ? $locale : 'en_US';

app/code/Magento/Braintree/Test/Mftf/ActionGroup/ConfigureBraintreeActionGroup.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
-->
88
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
99
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
10-
10+
<!-- Skip by MQE-1576 -->
1111
<actionGroup name="ConfigureBraintree">
1212
<!-- GoTo ConfigureBraintree fields -->
1313
<click stepKey="clickOnSTORES" selector="{{AdminMenuSection.stores}}"/>
@@ -50,4 +50,4 @@
5050
<magentoCLI stepKey="disableBrainTree" command="config:set payment/braintree/active 0"/>
5151
<magentoCLI stepKey="disableBrainTreePaypal" command="config:set payment/braintree_paypal/active 0"/>
5252
</actionGroup>
53-
</actionGroups>
53+
</actionGroups>

0 commit comments

Comments
 (0)