Skip to content

Commit 96b8192

Browse files
author
Magento Team
committed
Merge branch '2.2-develop' of https://github.com/magento/magento2ce into 2.2.4-preview
2 parents a827f3b + 36bfa58 commit 96b8192

File tree

19 files changed

+1064
-626
lines changed

19 files changed

+1064
-626
lines changed

app/code/Magento/Braintree/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"magento/module-quote": "101.0.*",
1919
"magento/module-paypal": "100.2.*",
2020
"magento/module-ui": "101.0.*",
21-
"braintree/braintree_php": "3.27.0"
21+
"braintree/braintree_php": "3.28.0"
2222
},
2323
"suggest": {
2424
"magento/module-checkout-agreements": "100.2.*",

app/code/Magento/Dhl/Model/Carrier.php

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1409,7 +1409,9 @@ protected function _doRequest()
14091409
if (!$originRegion) {
14101410
$xml->addChild('RequestedPickupTime', 'N', '');
14111411
}
1412-
$xml->addChild('NewShipper', 'N', '');
1412+
if ($originRegion !== 'AP') {
1413+
$xml->addChild('NewShipper', 'N', '');
1414+
}
14131415
$xml->addChild('LanguageCode', 'EN', '');
14141416
$xml->addChild('PiecesEnabled', 'Y', '');
14151417

@@ -1451,7 +1453,9 @@ protected function _doRequest()
14511453
}
14521454

14531455
$nodeConsignee->addChild('City', $rawRequest->getRecipientAddressCity());
1454-
$nodeConsignee->addChild('Division', $rawRequest->getRecipientAddressStateOrProvinceCode());
1456+
if ($originRegion !== 'AP') {
1457+
$nodeConsignee->addChild('Division', $rawRequest->getRecipientAddressStateOrProvinceCode());
1458+
}
14551459
$nodeConsignee->addChild('PostalCode', $rawRequest->getRecipientAddressPostalCode());
14561460
$nodeConsignee->addChild('CountryCode', $rawRequest->getRecipientAddressCountryCode());
14571461
$nodeConsignee->addChild(
@@ -1500,7 +1504,9 @@ protected function _doRequest()
15001504
$nodeShipper = $xml->addChild('Shipper', '', '');
15011505
$nodeShipper->addChild('ShipperID', (string)$this->getConfigData('account'));
15021506
$nodeShipper->addChild('CompanyName', $rawRequest->getShipperContactCompanyName());
1503-
$nodeShipper->addChild('RegisteredAccount', (string)$this->getConfigData('account'));
1507+
if ($originRegion !== 'AP') {
1508+
$nodeShipper->addChild('RegisteredAccount', (string)$this->getConfigData('account'));
1509+
}
15041510

15051511
$address = $rawRequest->getShipperAddressStreet1() . ' ' . $rawRequest->getShipperAddressStreet2();
15061512
$address = $this->string->split($address, 35, false, true);
@@ -1513,7 +1519,9 @@ protected function _doRequest()
15131519
}
15141520

15151521
$nodeShipper->addChild('City', $rawRequest->getShipperAddressCity());
1516-
$nodeShipper->addChild('Division', $rawRequest->getShipperAddressStateOrProvinceCode());
1522+
if ($originRegion !== 'AP') {
1523+
$nodeShipper->addChild('Division', $rawRequest->getShipperAddressStateOrProvinceCode());
1524+
}
15171525
$nodeShipper->addChild('PostalCode', $rawRequest->getShipperAddressPostalCode());
15181526
$nodeShipper->addChild('CountryCode', $rawRequest->getShipperAddressCountryCode());
15191527
$nodeShipper->addChild(
@@ -1533,7 +1541,7 @@ protected function _doRequest()
15331541

15341542
$responseBody = $this->_getCachedQuotes($request);
15351543
if ($responseBody === null) {
1536-
$debugData = ['request' => $request];
1544+
$debugData = ['request' => $this->filterDebugData($request)];
15371545
try {
15381546
/** @var \Magento\Framework\HTTP\ZendClient $client */
15391547
$client = $this->_httpClientFactory->create();
@@ -1542,7 +1550,7 @@ protected function _doRequest()
15421550
$client->setRawData($request);
15431551
$responseBody = $client->request(\Magento\Framework\HTTP\ZendClient::POST)->getBody();
15441552
$responseBody = utf8_decode($responseBody);
1545-
$debugData['result'] = $responseBody;
1553+
$debugData['result'] = $this->filterDebugData($responseBody);
15461554
$this->_setCachedQuotes($request, $responseBody);
15471555
} catch (\Exception $e) {
15481556
$this->_errors[$e->getCode()] = $e->getMessage();
@@ -1727,15 +1735,15 @@ protected function _getXMLTracking($trackings)
17271735

17281736
$responseBody = $this->_getCachedQuotes($request);
17291737
if ($responseBody === null) {
1730-
$debugData = ['request' => $request];
1738+
$debugData = ['request' => $this->filterDebugData($request)];
17311739
try {
17321740
/** @var \Magento\Framework\HTTP\ZendClient $client */
17331741
$client = $this->_httpClientFactory->create();
17341742
$client->setUri((string)$this->getConfigData('gateway_url'));
17351743
$client->setConfig(['maxredirects' => 0, 'timeout' => 30]);
17361744
$client->setRawData($request);
17371745
$responseBody = $client->request(\Magento\Framework\HTTP\ZendClient::POST)->getBody();
1738-
$debugData['result'] = $responseBody;
1746+
$debugData['result'] = $this->filterDebugData($responseBody);
17391747
$this->_setCachedQuotes($request, $responseBody);
17401748
} catch (\Exception $e) {
17411749
$this->_errors[$e->getCode()] = $e->getMessage();

0 commit comments

Comments
 (0)