From d377c979b910e36d14fe01b1608b245ad19e62d0 Mon Sep 17 00:00:00 2001 From: Vinod Sowdagar <53818758+vinodsowdagar@users.noreply.github.com> Date: Fri, 10 May 2024 12:09:49 +0200 Subject: [PATCH] DAVAMS-764: Add IN3B2B (#687) --- .../PaymentComponentRequest.php | 4 +- Model/Ui/Gateway/In3B2bConfigProvider.php | 42 ++++++ Test/Integration/EventsTest.php | 5 + etc/config.xml | 26 ++++ etc/di.xml | 130 ++++++++++++++++++ etc/events.xml | 3 + etc/payment.xml | 3 + view/base/web/images/multisafepay_in3b2b.png | Bin 0 -> 7603 bytes 8 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 Model/Ui/Gateway/In3B2bConfigProvider.php create mode 100644 view/base/web/images/multisafepay_in3b2b.png diff --git a/CustomerData/PaymentRequest/PaymentComponentRequest.php b/CustomerData/PaymentRequest/PaymentComponentRequest.php index ea44d87a..42707300 100644 --- a/CustomerData/PaymentRequest/PaymentComponentRequest.php +++ b/CustomerData/PaymentRequest/PaymentComponentRequest.php @@ -25,6 +25,7 @@ use MultiSafepay\ConnectCore\Model\Ui\Gateway\VisaConfigProvider; use MultiSafepay\ConnectCore\Util\RecurringTokensUtil; use MultiSafepay\ConnectCore\Model\Ui\Gateway\ZiniaConfigProvider; +use MultiSafepay\ConnectCore\Model\Ui\Gateway\In3B2bConfigProvider; class PaymentComponentRequest { @@ -36,7 +37,8 @@ class PaymentComponentRequest CreditCardConfigProvider::CODE, BnplinstmConfigProvider::CODE, ZiniaConfigProvider::CODE, - BnplmfConfigProvider::CODE + BnplmfConfigProvider::CODE, + In3B2bConfigProvider::CODE, ]; /** diff --git a/Model/Ui/Gateway/In3B2bConfigProvider.php b/Model/Ui/Gateway/In3B2bConfigProvider.php new file mode 100644 index 00000000..b9252ebd --- /dev/null +++ b/Model/Ui/Gateway/In3B2bConfigProvider.php @@ -0,0 +1,42 @@ + [ + $this->getCode() => [ + 'image' => $this->getImage(), + 'is_preselected' => $this->isPreselected(), + 'payment_type' => $this->getPaymentType() + ] + ] + ]; + } +} diff --git a/Test/Integration/EventsTest.php b/Test/Integration/EventsTest.php index 80cd1fe0..20f1ba06 100644 --- a/Test/Integration/EventsTest.php +++ b/Test/Integration/EventsTest.php @@ -69,5 +69,10 @@ public function testForAdminObservers() PaymentComponentDataAssignObserver::class, 'payment_method_assign_data_multisafepay_zinia' ); + + $this->findObserverForEvent( + PaymentComponentDataAssignObserver::class, + 'payment_method_assign_data_multisafepay_in3b2b' + ); } } diff --git a/etc/config.xml b/etc/config.xml index 0a616c30..3e3f7ff0 100755 --- a/etc/config.xml +++ b/etc/config.xml @@ -1373,6 +1373,32 @@ 1 IN3 + + 0 + MultiSafepayIn3B2bFacade + pending + initialize + in3: Betaal in 3 delen (0% rente) + redirect + EUR + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + 0 + 0 + redirect + 1 + IN3B2B + 0 MultiSafepayWeChatPayFacade diff --git a/etc/di.xml b/etc/di.xml index b5795c3e..6bd4b211 100755 --- a/etc/di.xml +++ b/etc/di.xml @@ -6003,6 +6003,130 @@ + + + + MultiSafepay\ConnectCore\Model\Ui\Gateway\In3B2bConfigProvider::CODE + Magento\Payment\Block\Form + Magento\Payment\Block\ConfigurableInfo + MultiSafepayIn3B2bValidatorPool + MultiSafepayIn3B2bValueHandlerPool + MultiSafepayIn3B2bCommandPool + + + + + + + MultiSafepay\ConnectCore\Model\Ui\Gateway\In3B2bConfigProvider::CODE + + + + + + + + MultiSafepayIn3B2bConfigValueHandler + + + + + + + + MultiSafepayIn3B2bConfig + + + + + + + MultiSafepayIn3B2bConfig + + + + + + MultiSafepayIn3B2bLogger + + + + + + + + MultiSafepayIn3B2bInitializeCommand + MultiSafepayIn3B2bRefundCommand + MultiSafepay\ConnectCore\Gateway\Command\FetchTransactionInfo + + + + + + + + MultiSafepayIn3B2bInitializeRequestBuilder + MultiSafepay\ConnectCore\Gateway\Http\TransferFactory + MultiSafepay\ConnectCore\Gateway\Http\Client\RedirectClient + + + + + + + MultiSafepayIn3B2bRefundRequestBuilder + MultiSafepay\ConnectCore\Gateway\Http\TransferFactory + MultiSafepay\ConnectCore\Gateway\Http\Client\ShoppingCartRefundClient + MultiSafepay\ConnectCore\Gateway\Response\RefundResponseHandler + + + + + + + + MultiSafepay\ConnectCore\Gateway\Request\Builder\RedirectTransactionBuilder + + + + + + + + + MultiSafepay\ConnectCore\Gateway\Request\Builder\ShoppingCartRefundRequestBuilder + + + + + + + + + MultiSafepayIn3B2bCountryValidator + + + + + + MultiSafepayIn3B2bConfig + + + + + + + + MultiSafepayIn3B2bConfigValueHandler + + + + + + MultiSafepayIn3B2bConfig + + + @@ -9083,6 +9207,11 @@ MultiSafepay\ConnectCore\Model\Api\Builder\OrderRequestBuilder\AdditionalDataBuilder\PaymentComponentAdditionalDataBuilder + + + MultiSafepay\ConnectCore\Model\Api\Builder\OrderRequestBuilder\AdditionalDataBuilder\PaymentComponentAdditionalDataBuilder + + @@ -9172,6 +9301,7 @@ MultiSafepay\ConnectCore\Model\Ui\Gateway\PaypalConfigProvider MultiSafepay\ConnectCore\Model\Ui\Gateway\TrustlyConfigProvider MultiSafepay\ConnectCore\Model\Ui\Gateway\In3ConfigProvider + MultiSafepay\ConnectCore\Model\Ui\Gateway\In3B2bConfigProvider MultiSafepay\ConnectCore\Model\Ui\Gateway\GenericGatewayConfigProvider MultiSafepay\ConnectCore\Model\Ui\Gateway\WeChatPayConfigProvider MultiSafepay\ConnectCore\Model\Ui\Gateway\ZiniaConfigProvider diff --git a/etc/events.xml b/etc/events.xml index 866e05a7..aa73cc86 100644 --- a/etc/events.xml +++ b/etc/events.xml @@ -23,6 +23,9 @@ + + + diff --git a/etc/payment.xml b/etc/payment.xml index 22012407..8c826dc7 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -97,6 +97,9 @@ 1 + + 1 + 1 diff --git a/view/base/web/images/multisafepay_in3b2b.png b/view/base/web/images/multisafepay_in3b2b.png new file mode 100644 index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