Skip to content

Commit

Permalink
Add country validator to check payment method backoffice configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
oriolauge committed Apr 10, 2022
1 parent e776d22 commit d39f6d5
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@
<argument name="infoBlockType" xsi:type="string">OAG\Redsys\Block\Info</argument>
<argument name="valueHandlerPool" xsi:type="object">RedsysValueHandlerPool</argument>
<argument name="commandPool" xsi:type="object">RedsysCommandPool</argument>
<argument name="validatorPool" xsi:type="object">RedsysValidatorPool</argument>
</arguments>
</virtualType>

<!-- Redsys validators infrastructure -->
<virtualType name="RedsysValidatorPool" type="Magento\Payment\Gateway\Validator\ValidatorPool">
<arguments>
<argument name="validators" xsi:type="array">
<item name="country" xsi:type="string">RedsysCountryValidator</item>
</argument>
</arguments>
</virtualType>
<virtualType name="RedsysCountryValidator" type="Magento\Payment\Gateway\Validator\CountryValidator">
<arguments>
<argument name="config" xsi:type="object">OAG\Redsys\Gateway\Config\Redsys</argument>
</arguments>
</virtualType>

Expand Down

0 comments on commit d39f6d5

Please sign in to comment.