Skip to content

Commit 25b50ec

Browse files
committed
MAGETWO-99736: Authorize.net - 3D Secure 2.0 Support for 2.3
- update composer hash and minor fixes
1 parent 6b01d4f commit 25b50ec

File tree

9 files changed

+15
-10
lines changed

9 files changed

+15
-10
lines changed

app/code/Magento/AuthorizenetCardinal/Gateway/Request/Authorize3DSecureBuilder.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ public function build(array $buildSubject): array
6565
if ($payment instanceof Payment) {
6666
$cardinalJwt = (string)$payment->getAdditionalInformation('cardinalJWT');
6767
$jwtPayload = $this->jwtParser->execute($cardinalJwt);
68-
$eciFlag = $jwtPayload['Payload']['Payment']['ExtendedData']['ECIFlag'];
69-
$cavv = $jwtPayload['Payload']['Payment']['ExtendedData']['CAVV'];
68+
$eciFlag = $jwtPayload['Payload']['Payment']['ExtendedData']['ECIFlag'] ?? '';
69+
$cavv = $jwtPayload['Payload']['Payment']['ExtendedData']['CAVV'] ?? '';
7070
$data = [
7171
'transactionRequest' => [
7272
'cardholderAuthentication' => [

app/code/Magento/AuthorizenetCardinal/Model/Config.php

Lines changed: 2 additions & 0 deletions
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\AuthorizenetCardinal\Model;
79

810
use Magento\Framework\App\Config\ScopeConfigInterface;

app/code/Magento/AuthorizenetCardinal/Test/Unit/Observer/DataAssignObserverTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public function testDoesntSetDataWhenEmpty()
8686
/**
8787
* Tests case when CardinalCommerce is disabled.
8888
*/
89-
public function testDoesnttDataWhenEmpty()
89+
public function testDoesntSetDataWhenDisabled()
9090
{
9191
$config = $this->createMock(Config::class);
9292
$config->method('isActive')

app/code/Magento/AuthorizenetCardinal/composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"require": {
88
"php": "~7.1.3||~7.2.0",
99
"magento/module-authorizenet-acceptjs": "*",
10+
"magento/framework": "*",
1011
"magento/module-cardinal-commerce": "*",
1112
"magento/module-payment": "*",
1213
"magento/module-sales": "*",

app/code/Magento/CardinalCommerce/Model/Config.php

Lines changed: 4 additions & 2 deletions
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\CardinalCommerce\Model;
79

810
use Magento\Framework\App\Config\ScopeConfigInterface;
@@ -92,12 +94,12 @@ public function getOrgUnitId(?int $storeId = null): string
9294
*/
9395
public function getEnvironment(?int $storeId = null): string
9496
{
95-
$orgUnitId = $this->scopeConfig->getValue(
97+
$environment = $this->scopeConfig->getValue(
9698
'three_d_secure/cardinal/environment',
9799
ScopeInterface::SCOPE_STORE,
98100
$storeId
99101
);
100-
return $orgUnitId;
102+
return $environment;
101103
}
102104

103105
/**

app/code/Magento/CardinalCommerce/Model/JwtManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public function decode(string $jwt, string $key): array
5353
throw new \InvalidArgumentException('Wrong number of segments in JWT');
5454
}
5555

56-
list($headB64, $payloadB64, $signatureB64) = $parts;
56+
[$headB64, $payloadB64, $signatureB64] = $parts;
5757

5858
$headerJson = $this->urlSafeB64Decode($headB64);
5959
$header = $this->json->unserialize($headerJson);

app/code/Magento/CardinalCommerce/etc/adminhtml/system.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<config_path>three_d_secure/cardinal/api_identifier</config_path>
3737
<backend_model>Magento\Config\Model\Config\Backend\Encrypted</backend_model>
3838
</field>
39-
<field id="debug" translate="label" type="select" sortOrder="40" showInDefault="1" showInWebsite="1" showInStore="0">
39+
<field id="debug" translate="label" type="select" sortOrder="60" showInDefault="1" showInWebsite="1" showInStore="0">
4040
<label>Debug</label>
4141
<source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
4242
<config_path>three_d_secure/cardinal/debug</config_path>

composer.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)