Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Payment Method is listed on checkout even when Enable config set to No #17

Open
mozok opened this issue Dec 14, 2021 · 0 comments
Open

Comments

@mozok
Copy link

mozok commented Dec 14, 2021

I have issue with multistore Magento 2.4.2-p1 setup. I need Payment Method to be available only for one website (now we have 3 websites in one M2 setup). But even so in admin configuration PayU and PayU Card set to "Enable - No" it still displayed on checkout page.

Steps to reproduce:

  1. Configure 2 Websites in Magento 2.4.* - website_1 and website_2
  2. Install module via composer
  3. In admin configuration set configs for PayU and PayU card for website_1: Enable Plugin - No. For website_2: Enable Plugin - Yes.

Expected result:

  • On website_1 checkout PayU is not available in payment methods list.
  • On website_2 checkout PayU is available in payment methods list.

Actual result:
PayU is available in payment method list for both websites.

Research:
This is caused by config active in etc/config.xml. During PayUPaymentGatewayFacade initialization only this config is checked.

Suggested solution:
Add validatorPool to payment facades as shown in documentation https://devdocs.magento.com/guides/v2.4/payments-integrations/base-integration/facade-configuration.html.
For example facade KPVirtual in vendor/klarna/module-kp/etc/di.xml and it's availability validator - \Klarna\Kp\Gateway\Validator\SessionValidator

@mozok mozok changed the title Payment Method shows on checkout even when Enable config set to No Payment Method is listed on checkout even when Enable config set to No Dec 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant