Skip to content

Commit 2122209

Browse files
committed
Merge branch '2.3-develop' into project_pepe
2 parents 13038fc + 5a6deee commit 2122209

File tree

1,310 files changed

+32025
-9435
lines changed

Some content is hidden

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

1,310 files changed

+32025
-9435
lines changed

CHANGELOG.md

Lines changed: 612 additions & 0 deletions
Large diffs are not rendered by default.

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

Lines changed: 0 additions & 1 deletion
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 0 additions & 1 deletion
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/Authorization/Model/Role.php

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ class Role extends \Magento\Framework\Model\AbstractModel
4040
* @param \Magento\Authorization\Model\ResourceModel\Role\Collection $resourceCollection
4141
* @param array $data
4242
*/
43-
public function __construct(
43+
public function __construct( //phpcs:ignore Generic.CodeAnalysis.UselessOverridingMethod
4444
\Magento\Framework\Model\Context $context,
4545
\Magento\Framework\Registry $registry,
4646
\Magento\Authorization\Model\ResourceModel\Role $resource,
@@ -52,28 +52,18 @@ public function __construct(
5252

5353
/**
5454
* @inheritDoc
55-
*
56-
* @SuppressWarnings(PHPMD.SerializationAware)
57-
* @deprecated Do not use PHP serialization.
5855
*/
5956
public function __sleep()
6057
{
61-
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
62-
6358
$properties = parent::__sleep();
6459
return array_diff($properties, ['_resource', '_resourceCollection']);
6560
}
6661

6762
/**
6863
* @inheritDoc
69-
*
70-
* @SuppressWarnings(PHPMD.SerializationAware)
71-
* @deprecated Do not use PHP serialization.
7264
*/
7365
public function __wakeup()
7466
{
75-
trigger_error('Using PHP serialization is deprecated', E_USER_DEPRECATED);
76-
7767
parent::__wakeup();
7868
$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
7969
$this->_resource = $objectManager->get(\Magento\Authorization\Model\ResourceModel\Role::class);
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
9+
<tests xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/testSchema.xsd">
11+
<test name="StorefrontVerifySecureURLRedirectAuthorizenet">
12+
<annotations>
13+
<features value="Authorizenet"/>
14+
<stories value="Storefront Secure URLs"/>
15+
<title value="Verify Secure URLs For Storefront Authorizenet Pages"/>
16+
<description value="Verify that the Secure URL configuration applies to the Authorizenet pages on the Storefront"/>
17+
<severity value="MAJOR"/>
18+
<testCaseId value="MC-15610"/>
19+
<group value="authorizenet"/>
20+
<group value="configuration"/>
21+
<group value="secure_storefront_url"/>
22+
</annotations>
23+
<before>
24+
<createData entity="Simple_US_Customer" stepKey="customer"/>
25+
<actionGroup ref="LoginToStorefrontActionGroup" stepKey="loginToStorefront">
26+
<argument name="Customer" value="$$customer$$"/>
27+
</actionGroup>
28+
<executeJS function="return window.location.host" stepKey="hostname"/>
29+
<magentoCLI command="config:set web/secure/base_url https://{$hostname}/" stepKey="setSecureBaseURL"/>
30+
<magentoCLI command="config:set web/secure/use_in_frontend 1" stepKey="useSecureURLsOnStorefront"/>
31+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
32+
</before>
33+
<after>
34+
<magentoCLI command="config:set web/secure/use_in_frontend 0" stepKey="dontUseSecureURLsOnStorefront"/>
35+
<magentoCLI command="cache:flush" stepKey="flushCache"/>
36+
<deleteData createDataKey="customer" stepKey="deleteCustomer"/>
37+
</after>
38+
<executeJS function="return window.location.host" stepKey="hostname"/>
39+
<amOnUrl url="http://{$hostname}/authorizenet" stepKey="goToUnsecureAuthorizenetURL"/>
40+
<seeCurrentUrlEquals url="https://{$hostname}/authorizenet" stepKey="seeSecureAuthorizenetURL"/>
41+
</test>
42+
</tests>

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

Lines changed: 4 additions & 6 deletions
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

Lines changed: 8 additions & 9 deletions
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

Lines changed: 7 additions & 8 deletions
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

Lines changed: 9 additions & 2 deletions
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/adminhtml/di.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,9 @@
3131
</argument>
3232
</arguments>
3333
</virtualType>
34+
<virtualType name="AuthorizenetAcceptjsAuthorizeCommand" type="Magento\Payment\Gateway\Command\GatewayCommand">
35+
<arguments>
36+
<argument name="validator" xsi:type="object">AuthorizenetAcceptjsTransactionValidator</argument>
37+
</arguments>
38+
</virtualType>
3439
</config>

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@
134134
<arguments>
135135
<argument name="requestBuilder" xsi:type="object">AuthorizenetAcceptjsRefundRequest</argument>
136136
<argument name="handler" xsi:type="object">AuthorizenetAcceptjsRefundSettledHandler</argument>
137+
<argument name="validator" xsi:type="object">AuthorizenetAcceptjsTransactionValidator</argument>
137138
</arguments>
138139
</virtualType>
139140
<virtualType name="AuthorizenetAcceptjsCaptureCommand" type="Magento\AuthorizenetAcceptjs\Gateway\Command\CaptureStrategyCommand">
@@ -145,6 +146,7 @@
145146
<arguments>
146147
<argument name="requestBuilder" xsi:type="object">AuthorizenetAcceptjsCaptureRequest</argument>
147148
<argument name="handler" xsi:type="object">AuthorizenetAcceptjsCaptureTransactionHandler</argument>
149+
<argument name="validator" xsi:type="object">AuthorizenetAcceptjsTransactionValidator</argument>
148150
</arguments>
149151
</virtualType>
150152
<virtualType name="AuthorizenetAcceptjsVoidCommand" type="Magento\Payment\Gateway\Command\GatewayCommand">
@@ -188,10 +190,15 @@
188190
</argument>
189191
</arguments>
190192
</virtualType>
193+
<virtualType name="CloseCaptureTransactionHandler" type="Magento\AuthorizenetAcceptjs\Gateway\Response\CloseTransactionHandler">
194+
<arguments>
195+
<argument name="closeTransaction" xsi:type="boolean">false</argument>
196+
</arguments>
197+
</virtualType>
191198
<virtualType name="AuthorizenetAcceptjsCaptureTransactionHandler" type="Magento\Payment\Gateway\Response\HandlerChain">
192199
<arguments>
193200
<argument name="handlers" xsi:type="array">
194-
<item name="close_parent_transaction" xsi:type="string">Magento\AuthorizenetAcceptjs\Gateway\Response\CloseParentTransactionHandler</item>
201+
<item name="close_transaction" xsi:type="string">CloseCaptureTransactionHandler</item>
195202
</argument>
196203
</arguments>
197204
</virtualType>

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

Lines changed: 7 additions & 8 deletions
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>

0 commit comments

Comments
 (0)