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 13dd003d authored by Rik ter Beek's avatar Rik ter Beek

#67 fix country validation for all payment methods and do not include config...

#67 fix country validation for all payment methods and do not include config model into Sepa validation because it is not needed
parent 19429e72
...@@ -43,10 +43,8 @@ class SepaValidator extends AbstractValidator ...@@ -43,10 +43,8 @@ class SepaValidator extends AbstractValidator
* @param \Magento\Payment\Gateway\ConfigInterface $config * @param \Magento\Payment\Gateway\ConfigInterface $config
*/ */
public function __construct( public function __construct(
ResultInterfaceFactory $resultFactory, ResultInterfaceFactory $resultFactory
ConfigInterface $config
) { ) {
$this->config = $config;
parent::__construct($resultFactory); parent::__construct($resultFactory);
} }
......
...@@ -468,14 +468,6 @@ ...@@ -468,14 +468,6 @@
</arguments> </arguments>
</virtualType> </virtualType>
<!--not used right this one below never loaded in looks like-->
<!--<type name="Adyen\Payment\Gateway\Request\SepaAuthorizationDataBuilder">-->
<!--<arguments>-->
<!--<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\SepaConfig</argument>-->
<!--</arguments>-->
<!--</type>-->
<!-- Capture Request --> <!-- Capture Request -->
<virtualType name="AdyenPaymentCaptureRequest" type="Magento\Payment\Gateway\Request\BuilderComposite"> <virtualType name="AdyenPaymentCaptureRequest" type="Magento\Payment\Gateway\Request\BuilderComposite">
<arguments> <arguments>
...@@ -555,7 +547,6 @@ ...@@ -555,7 +547,6 @@
</virtualType> </virtualType>
<!-- Value validators infrastructure --> <!-- Value validators infrastructure -->
<!--TODO: country validators not working because config model does not exists-->
<virtualType name="AdyenPaymentCcValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool"> <virtualType name="AdyenPaymentCcValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
<arguments> <arguments>
<argument name="validators" xsi:type="array"> <argument name="validators" xsi:type="array">
...@@ -563,10 +554,9 @@ ...@@ -563,10 +554,9 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenCcCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenCcCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\CcConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentCcConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
...@@ -577,10 +567,9 @@ ...@@ -577,10 +567,9 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenOneclickCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenOneclickCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\OneclickConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentOneClickConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
...@@ -591,31 +580,23 @@ ...@@ -591,31 +580,23 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenHppCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenHppCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\HppConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentHppConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
<virtualType name="AdyenPaymentSepaValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool"> <virtualType name="AdyenPaymentSepaValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
<arguments> <arguments>
<argument name="validators" xsi:type="array"> <argument name="validators" xsi:type="array">
<item name="global" xsi:type="string">AdyenSepaValidator</item> <item name="global" xsi:type="string">Adyen\Payment\Gateway\Validator\SepaValidator</item>
<item name="country" xsi:type="string">AdyenSepaCountryValidator</item> <item name="country" xsi:type="string">AdyenSepaCountryValidator</item>
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenSepaValidator" type="Adyen\Payment\Gateway\Validator\SepaValidator">
<arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\SepaConfig</argument>
</arguments>
</virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenSepaCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenSepaCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\SepaConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentSepaConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
...@@ -626,10 +607,9 @@ ...@@ -626,10 +607,9 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenBoletoCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenBoletoCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\BoletoConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentBoletoConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
...@@ -640,10 +620,9 @@ ...@@ -640,10 +620,9 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenPosCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenPosCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\PosConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentPosConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
...@@ -654,10 +633,9 @@ ...@@ -654,10 +633,9 @@
</argument> </argument>
</arguments> </arguments>
</virtualType> </virtualType>
<!--FIXME: Config does not exists-->
<virtualType name="AdyenPayByMailCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator"> <virtualType name="AdyenPayByMailCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments> <arguments>
<argument name="config" xsi:type="object">Adyen\Payment\Gateway\Config\PayByMailConfig</argument> <argument name="config" xsi:type="object">AdyenPaymentPayByMailConfig</argument>
</arguments> </arguments>
</virtualType> </virtualType>
......
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