Skip to content

Commit 48f1891

Browse files
committed
Merge branch '2.3-develop' into feature/271-Customer-Attributes-Validation
2 parents 4b7acdc + 93f21ca commit 48f1891

File tree

507 files changed

+12968
-5377
lines changed

Some content is hidden

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

507 files changed

+12968
-5377
lines changed

app/code/Magento/AdminNotification/view/adminhtml/templates/system/messages/popup.phtml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
}
2828
}
2929
}
30-
</script>
30+
</script>

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
// @codingStandardsIgnoreFile
77
?>
88
<button class="scalable" type="button" id="<?= $block->getHtmlId() ?>" data-mage-init='{"testConnection":{
9-
"url": "<?= /* @escapeNotVerified */ $block->getAjaxUrl() ?>",
9+
"url": "<?= $block->escapeUrl($block->getAjaxUrl()) ?>",
1010
"elementId": "<?= $block->getHtmlId() ?>",
11-
"successText": "<?= /* @escapeNotVerified */ __('Successful! Test again?') ?>",
12-
"failedText": "<?= /* @escapeNotVerified */ __('Connection failed! Test again?') ?>",
13-
"fieldMapping": "<?= /* @escapeNotVerified */ $block->getFieldMapping() ?>"}, "validation": {}}'>
11+
"successText": "<?= $block->escapeHtmlAttr(__('Successful! Test again?')) ?>",
12+
"failedText": "<?= $block->escapeHtmlAttr(__('Connection failed! Test again?')) ?>",
13+
"fieldMapping": "<?= /* @noEscape */ $block->getFieldMapping() ?>"}, "validation": {}}'>
1414
<span><span><span id="<?= $block->getHtmlId() ?>_result"><?= $block->escapeHtml($block->getButtonLabel()) ?></span></span></span>
1515
</button>

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

+3-3
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313
$data = $block->getItems();
1414
if (count($data)):?>
1515
<dl class="block">
16-
<dt class="title"><?= /* @escapeNotVerified */ __($block->getTitle()) ?></dt>
16+
<dt class="title"><?= $block->escapeHtml(__($block->getTitle())) ?></dt>
1717
<?php foreach ($data as $additionalInfo) : ?>
1818
<dd class="item">
19-
<a href="<?= /* @escapeNotVerified */ $block->getLink($additionalInfo->getQueryText()) ?>"
19+
<a href="<?= $block->escapeUrl($block->getLink($additionalInfo->getQueryText())) ?>"
2020
><?= $block->escapeHtml($additionalInfo->getQueryText()) ?></a>
2121
<?php if ($block->isShowResultsCount()): ?>
22-
<span class="count"><?= /* @escapeNotVerified */ $additionalInfo->getResultsCount() ?></span>
22+
<span class="count"><?= /* @noEscape */ (int)$additionalInfo->getResultsCount() ?></span>
2323
<?php endif; ?>
2424
</dd>
2525
<?php endforeach; ?>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
namespace Magento\AuthorizenetGraphQl\Model;
9+
10+
use Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderInterface;
11+
use Magento\Framework\Stdlib\ArrayManager;
12+
use Magento\Framework\GraphQL\DataObjectConverter;
13+
14+
/**
15+
* DataProvider Model for Authorizenet
16+
*/
17+
class AuthorizenetDataProvider implements AdditionalDataProviderInterface
18+
{
19+
private const PATH_ADDITIONAL_DATA = 'input/payment_method/additional_data/authorizenet_acceptjs';
20+
21+
/**
22+
* @var ArrayManager
23+
*/
24+
private $arrayManager;
25+
26+
/**
27+
* AuthorizenetDataProvider constructor.
28+
* @param ArrayManager $arrayManager
29+
*/
30+
public function __construct(
31+
ArrayManager $arrayManager
32+
) {
33+
$this->arrayManager = $arrayManager;
34+
}
35+
36+
/**
37+
* Return additional data
38+
*
39+
* @param array $args
40+
* @return array
41+
*/
42+
public function getData(array $args): array
43+
{
44+
$additionalData = $this->arrayManager->get(static::PATH_ADDITIONAL_DATA, $args) ?? [];
45+
foreach ($additionalData as $key => $value) {
46+
$additionalData[$this->snakeCaseToCamelCase($key)] = $value;
47+
unset($additionalData[$key]);
48+
}
49+
return $additionalData;
50+
}
51+
52+
/**
53+
* Converts an input string from snake_case to camelCase.
54+
*
55+
* @param string $input
56+
* @return string
57+
*/
58+
private function snakeCaseToCamelCase($input)
59+
{
60+
return lcfirst(str_replace('_', '', ucwords($input, '_')));
61+
}
62+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# AuthorizenetGraphQl
2+
3+
**AuthorizenetGraphQl** defines the data types needed to pass payment information data from the client to Magento.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"name": "magento/module-authorizenet-graph-ql",
3+
"description": "N/A",
4+
"type": "magento2-module",
5+
"require": {
6+
"php": "~7.1.3||~7.2.0",
7+
"magento/framework": "*",
8+
"magento/module-quote-graph-ql": "*"
9+
},
10+
"suggest": {
11+
"magento/module-graph-ql": "*"
12+
},
13+
"license": [
14+
"OSL-3.0",
15+
"AFL-3.0"
16+
],
17+
"autoload": {
18+
"files": [
19+
"registration.php"
20+
],
21+
"psr-4": {
22+
"Magento\\AuthorizenetGraphQl\\": ""
23+
}
24+
}
25+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
9+
<type name="Magento\QuoteGraphQl\Model\Cart\Payment\AdditionalDataProviderPool">
10+
<arguments>
11+
<argument name="dataProviders" xsi:type="array">
12+
<item name="authorizenet_acceptjs" xsi:type="object">Magento\AuthorizenetGraphQl\Model\AuthorizenetDataProvider</item>
13+
</argument>
14+
</arguments>
15+
</type>
16+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
/**
4+
* Copyright © Magento, Inc. All rights reserved.
5+
* See COPYING.txt for license details.
6+
*/
7+
-->
8+
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
9+
<module name="Magento_AuthorizenetGraphQl"/>
10+
</config>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright © Magento, Inc. All rights reserved.
2+
# See COPYING.txt for license details.
3+
4+
input PaymentMethodAdditionalDataInput {
5+
authorizenet_acceptjs: AuthorizenetInput @doc(description: "Defines the required attributes for Authorize.Net payments")
6+
}
7+
8+
input AuthorizenetInput {
9+
opaque_data_descriptor: String! @doc(description: "Authorize.Net's description of the transaction request")
10+
opaque_data_value: String! @doc(description: "The nonce returned by Authorize.Net")
11+
cc_last_4: Int! @doc(description: "The last four digits of the credit or debit card")
12+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
declare(strict_types=1);
7+
8+
use Magento\Framework\Component\ComponentRegistrar;
9+
10+
ComponentRegistrar::register(ComponentRegistrar::MODULE, 'Magento_AuthorizenetGraphQl', __DIR__);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
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+
<actionGroups xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
10+
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Test/etc/actionGroupSchema.xsd">
11+
<actionGroup name="AssertOrderGraphImageOnDashboardActionGroup">
12+
<click selector="{{AdminDashboardSection.ordersTab}}" stepKey="clickOrdersBtn"/>
13+
<seeElement selector="{{AdminDashboardSection.ordersChart}}" stepKey="seeGraphImage"/>
14+
</actionGroup>
15+
</actionGroups>

app/code/Magento/Backend/Test/Mftf/Page/AdminDashboardPage.xml

+1
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/PageObject.xsd">
1111
<page name="AdminDashboardPage" url="admin/dashboard/" area="admin" module="Magento_Backend">
1212
<section name="AdminMenuSection"/>
13+
<section name="AdminDashboardSection"/>
1314
</page>
1415
</pages>

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

+2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99
<sections xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1010
xsi:noNamespaceSchemaLocation="urn:magento:mftf:Page/etc/SectionObject.xsd">
1111
<section name="AdminDashboardSection">
12+
<element name="ordersTab" type="button" selector="#diagram_tab_orders"/>
13+
<element name="ordersChart" type="button" selector="#diagram_tab_orders_content .dashboard-diagram-image img"/>
1214
<element name="dashboardDiagramContent" type="button" selector="#diagram_tab_content"/>
1315
<element name="dashboardDiagramOrderContentTab" type="block" selector="#diagram_tab_orders_content"/>
1416
<element name="dashboardDiagramAmounts" type="button" selector="#diagram_tab_amounts"/>

app/code/Magento/Braintree/Block/Paypal/Button.php

+28-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
* Copyright © Magento, Inc. All rights reserved.
44
* See COPYING.txt for license details.
55
*/
6+
declare(strict_types=1);
7+
68
namespace Magento\Braintree\Block\Paypal;
79

810
use Magento\Braintree\Gateway\Config\PayPal\Config;
@@ -49,8 +51,6 @@ class Button extends Template implements ShortcutInterface
4951
private $payment;
5052

5153
/**
52-
* Constructor
53-
*
5454
* @param Context $context
5555
* @param ResolverInterface $localeResolver
5656
* @param Session $checkoutSession
@@ -98,6 +98,8 @@ public function getAlias()
9898
}
9999

100100
/**
101+
* Returns container id.
102+
*
101103
* @return string
102104
*/
103105
public function getContainerId()
@@ -106,6 +108,8 @@ public function getContainerId()
106108
}
107109

108110
/**
111+
* Returns locale.
112+
*
109113
* @return string
110114
*/
111115
public function getLocale()
@@ -114,6 +118,8 @@ public function getLocale()
114118
}
115119

116120
/**
121+
* Returns currency.
122+
*
117123
* @return string
118124
*/
119125
public function getCurrency()
@@ -122,6 +128,8 @@ public function getCurrency()
122128
}
123129

124130
/**
131+
* Returns amount.
132+
*
125133
* @return float
126134
*/
127135
public function getAmount()
@@ -130,6 +138,8 @@ public function getAmount()
130138
}
131139

132140
/**
141+
* Returns if is active.
142+
*
133143
* @return bool
134144
*/
135145
public function isActive()
@@ -139,6 +149,8 @@ public function isActive()
139149
}
140150

141151
/**
152+
* Returns merchant name.
153+
*
142154
* @return string
143155
*/
144156
public function getMerchantName()
@@ -147,6 +159,8 @@ public function getMerchantName()
147159
}
148160

149161
/**
162+
* Returns client token.
163+
*
150164
* @return string|null
151165
*/
152166
public function getClientToken()
@@ -155,10 +169,22 @@ public function getClientToken()
155169
}
156170

157171
/**
172+
* Returns action success.
173+
*
158174
* @return string
159175
*/
160176
public function getActionSuccess()
161177
{
162178
return $this->getUrl(ConfigProvider::CODE . '/paypal/review', ['_secure' => true]);
163179
}
180+
181+
/**
182+
* Gets environment value.
183+
*
184+
* @return string
185+
*/
186+
public function getEnvironment(): string
187+
{
188+
return $this->configProvider->getConfig()['payment'][ConfigProvider::CODE]['environment'];
189+
}
164190
}

app/code/Magento/Braintree/Gateway/Config/Config.php

+13-12
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ class Config extends \Magento\Payment\Gateway\Config\Config
3030
const KEY_VERIFY_SPECIFIC = 'verify_specific_countries';
3131
const VALUE_3DSECURE_ALL = 0;
3232
const CODE_3DSECURE = 'three_d_secure';
33-
const KEY_KOUNT_MERCHANT_ID = 'kount_id';
3433
const FRAUD_PROTECTION = 'fraudprotection';
3534

3635
/**
@@ -173,6 +172,7 @@ public function get3DSecureSpecificCountries($storeId = null)
173172

174173
/**
175174
* Gets value of configured environment.
175+
*
176176
* Possible values: production or sandbox.
177177
*
178178
* @param int|null $storeId
@@ -183,17 +183,6 @@ public function getEnvironment($storeId = null)
183183
return $this->getValue(Config::KEY_ENVIRONMENT, $storeId);
184184
}
185185

186-
/**
187-
* Gets Kount merchant ID.
188-
*
189-
* @param int|null $storeId
190-
* @return string
191-
*/
192-
public function getKountMerchantId($storeId = null)
193-
{
194-
return $this->getValue(Config::KEY_KOUNT_MERCHANT_ID, $storeId);
195-
}
196-
197186
/**
198187
* Gets merchant ID.
199188
*
@@ -217,13 +206,25 @@ public function getMerchantAccountId($storeId = null)
217206
}
218207

219208
/**
209+
* Returns SDK url.
210+
*
220211
* @return string
221212
*/
222213
public function getSdkUrl()
223214
{
224215
return $this->getValue(Config::KEY_SDK_URL);
225216
}
226217

218+
/**
219+
* Gets Hosted Fields SDK Url
220+
*
221+
* @return string
222+
*/
223+
public function getHostedFieldsSdkUrl(): string
224+
{
225+
return $this->getValue('hosted_fields_sdk_url');
226+
}
227+
227228
/**
228229
* Checks if fraud protection is enabled.
229230
*

0 commit comments

Comments
 (0)