We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit 54a76efc authored by Attila Kiss's avatar Attila Kiss Committed by GitHub

Merge branch 'develop' into PW-2383

parents 94871263 e0b3f33a
<?php
/**
* ######
* ######
* ############ ####( ###### #####. ###### ############ ############
* ############# #####( ###### #####. ###### ############# #############
* ###### #####( ###### #####. ###### ##### ###### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ##### ######
* ###### ###### #####( ###### #####. ###### ##### ##### ######
* ############# ############# ############# ############# ##### ######
* ############ ############ ############# ############ ##### ######
* ######
* #############
* ############
*
* Adyen Payment module (https://www.adyen.com/)
*
* Copyright (c) 2020 Adyen NV (https://www.adyen.com/)
* See LICENSE.txt for license details.
*
* Author: Adyen <magento@adyen.com>
*/
namespace Adyen\Payment\Gateway\Data\Order;
use Magento\Sales\Api\Data\OrderAddressInterface;
class AddressAdapter extends \Magento\Payment\Gateway\Data\Order\AddressAdapter
{
/**
* @var OrderAddressInterface
*/
private $address;
public function __construct(OrderAddressInterface $address)
{
$this->address = $address;
parent::__construct($address);
}
/**
* Get street line 3
*
* @return string
*/
public function getStreetLine3()
{
$street = $this->address->getStreet();
return isset($street[2]) ? $street[2] : '';
}
/**
* Get street line 4
*
* @return string
*/
public function getStreetLine4()
{
$street = $this->address->getStreet();
return isset($street[3]) ? $street[3] : '';
}
}
......@@ -487,7 +487,13 @@ class Requests extends AbstractHelper
// Parse address into street and house number where possible
$address = $this->adyenHelper->getStreetFromString($address->getStreetFull());
} else {
$address = $this->adyenHelper->getStreetFromString(implode(' ', [$address->getStreetLine1(), $address->getStreetLine2()]));
$address = $this->adyenHelper->getStreetFromString(
implode(' ', [
$address->getStreetLine1(),
$address->getStreetLine2(),
$address->getStreetLine3(),
$address->getStreetLine4()
]));
}
return $address;
......
......@@ -914,6 +914,7 @@
</virtualType>
<preference for="Magento\Paypal\Model\Billing\Agreement" type="Adyen\Payment\Model\Billing\Agreement" />
<preference for="Magento\Payment\Gateway\Data\Order\AddressAdapter" type="Adyen\Payment\Gateway\Data\Order\AddressAdapter"/>
<type name="Adyen\Payment\Logger\Handler\AdyenDebug">
<arguments>
<argument name="filesystem" xsi:type="object">Magento\Framework\Filesystem\Driver\File</argument>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment