diff --git a/Gateway/Request/CheckoutDataBuilder.php b/Gateway/Request/CheckoutDataBuilder.php index 538ceebf1..ce29dcd1a 100644 --- a/Gateway/Request/CheckoutDataBuilder.php +++ b/Gateway/Request/CheckoutDataBuilder.php @@ -126,18 +126,6 @@ public function build(array $buildSubject): array } //Boleto data - if ($payment->getAdditionalInformation("social_security_number")) { - $requestBody['socialSecurityNumber'] = $payment->getAdditionalInformation("social_security_number"); - } - - if ($payment->getAdditionalInformation("firstname")) { - $requestBody['shopperName']['firstName'] = $payment->getAdditionalInformation("firstname"); - } - - if ($payment->getAdditionalInformation("lastname")) { - $requestBody['shopperName']['lastName'] = $payment->getAdditionalInformation("lastname"); - } - if ($payment->getMethod() == self::ADYEN_BOLETO) { $deliveryDays = (int)$this->configHelper->getAdyenBoletoConfigData("delivery_days", $storeId); $deliveryDays = (!empty($deliveryDays)) ? $deliveryDays : 5; diff --git a/Observer/AdyenBoletoDataAssignObserver.php b/Observer/AdyenBoletoDataAssignObserver.php deleted file mode 100644 index eca6d20e7..000000000 --- a/Observer/AdyenBoletoDataAssignObserver.php +++ /dev/null @@ -1,73 +0,0 @@ - - */ - -namespace Adyen\Payment\Observer; - -use Adyen\Payment\Helper\Config; -use Magento\Framework\Event\Observer; -use Magento\Payment\Observer\AbstractDataAssignObserver; -use Magento\Quote\Api\Data\PaymentInterface; - -class AdyenBoletoDataAssignObserver extends AbstractDataAssignObserver -{ - const SOCIAL_SECURITY_NUMBER = 'social_security_number'; - const BOLETO_TYPE = 'boleto_type'; - const FIRSTNAME = 'firstname'; - const LASTNAME = 'lastname'; - - protected array $additionalInformationList = [ - self::SOCIAL_SECURITY_NUMBER, - self::BOLETO_TYPE, - self::FIRSTNAME, - self::LASTNAME - ]; - - private Config $configHelper; - - public function __construct( - Config $configHelper - ) { - $this->configHelper = $configHelper; - } - - public function execute(Observer $observer) - { - $data = $this->readDataArgument($observer); - - $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA); - if (!is_array($additionalData)) { - return; - } - - $paymentInfo = $this->readPaymentModelArgument($observer); - - // Remove cc_type information from the previous payment - $paymentInfo->unsAdditionalInformation('cc_type'); - - // Remove remaining brand_code information from the previous payment - $paymentInfo->unsAdditionalInformation('brand_code'); - - if (!empty($additionalData[self::BOLETO_TYPE])) { - $paymentInfo->setCcType($additionalData[self::BOLETO_TYPE]); - } else { - $paymentInfo->setCcType($this->configHelper->getAdyenBoletoConfigData('boletotypes')); - } - - foreach ($this->additionalInformationList as $additionalInformationKey) { - if (isset($additionalData[$additionalInformationKey])) { - $paymentInfo->setAdditionalInformation( - $additionalInformationKey, - $additionalData[$additionalInformationKey] - ); - } - } - } -} diff --git a/etc/config.xml b/etc/config.xml index 9e13c3856..1c1b5d982 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -462,19 +462,23 @@ AdyenPaymentBoletoFacade Boleto 0 - 8 + 0 authorize 5 1 + 1 1 - 1 1 - 1 + 0 0 1 1 1 1 + 0 + 0 + 1 + 0 adyen-alternative-payment-method diff --git a/etc/di.xml b/etc/di.xml index 7f7dc2329..c078079d3 100755 --- a/etc/di.xml +++ b/etc/di.xml @@ -193,8 +193,8 @@ Magento\Payment\Block\Form Adyen\Payment\Block\Info\Boleto AdyenPaymentBoletoValueHandlerPool - AdyenPaymentBoletoValidatorPool - AdyenPaymentBoletoCommandPool + AdyenPaymentValidatorPool + AdyenPaymentCommandPool @@ -890,17 +890,6 @@ AdyenPaymentVaultResponseHandlerComposite - - - - AdyenPaymentBoletoAuthorizeCommand - AdyenPaymentCaptureCommand - AdyenPaymentCancelCommand - AdyenPaymentRefundCommand - AdyenPaymentCancelCommand - - - @@ -978,15 +967,6 @@ AdyenPaymentResponseHandlerComposite - - - AdyenPaymentBoletoAuthorizeRequest - Adyen\Payment\Gateway\Http\TransferFactory - Adyen\Payment\Gateway\Http\Client\TransactionPayment - CheckoutResponseValidator - AdyenPaymentBoletoResponseHandlerComposite - - AdyenPaymentPosCloudAuthorizeRequest @@ -1246,28 +1226,6 @@ - - - - Adyen\Payment\Gateway\Request\MerchantAccountDataBuilder - Adyen\Payment\Gateway\Request\CustomerDataBuilder - Adyen\Payment\Gateway\Request\CustomerIpDataBuilder - Adyen\Payment\Gateway\Request\AddressDataBuilder - Adyen\Payment\Gateway\Request\PaymentDataBuilder - Adyen\Payment\Gateway\Request\RiskDataBuilder - Adyen\Payment\Gateway\Request\BrowserInfoDataBuilder - Adyen\Payment\Gateway\Request\RecurringDataBuilder - Adyen\Payment\Gateway\Request\ShopperInteractionDataBuilder - Adyen\Payment\Gateway\Request\CheckoutDataBuilder - Adyen\Payment\Gateway\Request\Header\HeaderDataBuilder - Adyen\Payment\Gateway\Request\ReturnUrlDataBuilder - Adyen\Payment\Gateway\Request\ChannelDataBuilder - Adyen\Payment\Gateway\Request\OriginDataBuilder - Adyen\Payment\Gateway\Request\GiftcardDataBuilder - Adyen\Payment\Gateway\Request\CompanyDataBuilder - - - @@ -1339,15 +1297,6 @@ - - - - Adyen\Payment\Gateway\Response\CheckoutPaymentsDetailsHandler - Adyen\Payment\Gateway\Response\VaultDetailsHandler - Adyen\Payment\Gateway\Response\CheckoutPaymentCommentHistoryHandler - - - @@ -1426,18 +1375,6 @@ AdyenPaymentHppConfig - - - - AdyenBoletoCountryValidator - - - - - - AdyenPaymentBoletoConfig - -