Easily refine which payment methods are enabled or disabled in checkout depending on customer groups, store views and shipping methods selected by customers.
Offer your customers the best of both worlds: Buy Online, Pickup in Store
Define specific payment methods for each store pickup point.
Are you interested in Pickup@Store?
See More details
Check the demo
Content
How to use the Payment Method Rules extension for Magento?
The Payment Method Rules extension allows you to define which payment methods must be enabled in the checkout depending on simple rules. These rules can be defined according to the shipping methods, the customer groups, and the store views.
The extension is very simple to use and can be adapted to many cases. Thanks to a very intuitive interface, as well as to log files, you'll be able to quickly create and check your payment method rules.
Moreover, Payment Method Rules is fully compatible with Pickup@store. For example, you could define a different payment method for each point of sale.
STEP 1: Configure the extension
To enable the Payment Method Rules extension, go to: STORES › SETTINGS › Configuration › Wyomind › Payment Method Rules
Settings
When the Payment Method Rules extension is enabled, you can also activate the payment method rules journal.
STEP 2: Create your rules
To create your own rules, go to: STORES › Payment Method Rules › MANAGE RULES
All your payment method rules will be listed in the grid.
You can create a rule by clicking on Add a new rule.
Configuration
In the Configuration tab, configure:
Name Fill in a title for your rule. This is internal, for you to differentiate your methods.
Status You can enable or disable the rule whenever you want.
Position Define the position among other rules. Note that a rule with a low position will be checked first.
Payment Method Select one or more payment methods.
Conditions
In the Conditions tab, you have so many possibilities to create the rule you want.
Store View Select the store view(s) targeted for that rule.
Customer Group Select the customer group(s) targeted for that rule. You could select Wholesale and allow the Bank transfer payments only.
Shipping Method Select the shipping method(s) targeted for that rule. You could define a payment method rule for each point of sale if you're using Pickup@Store.
STEP 3: Test your rules
You can test your payment method rules in the checkout where will be displayed the allowed payment methods depending on the settings of the rule.
You can also use the Testing tool from: STORES › SETTINGS › Configuration › Wyomind › Payment Method Rules
Testing Tool
The testing tool will help you to check what payment method rules are allowed.
To test your Payment Method Rule:
Select: a store view a customer group a shipping method
Click on Go
The list of allowed Payment Methods is displayed.
For example:
Here is what is displayed when there is no payment rule allowed:
STEP 4: Check your rules
You can easily check your rules when creating an order from your Magento frontend or backend.
For example, 2 rules are defined, and both target all customer groups and store views:
Flat: for Fixed and Table Rate shipping methods The Check/Money order payment method is enabled.
Pickup method: for all pickup methods The Cash On Delivery payment method is enabled.
Frontend
When ordering and choosing the Fixed shipping method, the payment method will be Check/Money order.
Backend
When creating an order from the Magento backend and choosing the Store Pickup shipping method, the payment method will be Cash On Delivery.
FAQ
Pre-sales informations
Magento Open Source vs Magento Commerce vs Magento Commerce Cloud
Magento offers three variations of its product.
As their names have changed over the past few years, here is a recap:
Magento Open Source: previously Magento Community Edition (CE), is a free and non-hosted e-commerce platform.
Magento Commerce: previously Magento Enterprise (EE), is the paid version of Magento and offers support services.
Magento Commerce Cloud: is the paid version of Magento and offers support and hosting services.
License and domains
License validity
A license is valid for an unlimited period of time on one single installation
If you're using more than one installation, you will have to buy a separate license for each instance.
if you're running several domains on a same installation, you will need only one license for all of them.
Although your license doesn’t have a limited period of validity, your Support & Upgrade period does. By purchasing a module, you’ll be granted a 12-month support period for free. Passed this period, you will have to pay for a new one (see FAQ: Extend your Support period)
Domains pre-registration
You can pre-register your live domain to your license in advance.
Thanks to this option, you'll be able to get the module ready to use on your domain before it goes live.
To pre-register your production domain:
Go to: mY account › Licenses & DOwnloads
Click on the Settings icon next to the module you want your domain to pre-register on.
Click on the link at the bottom of the page saying: Do you want to pre-register your domain in order to be ready to go live?
Finally, enter your domain name and click on pre-register now .
Testing environments
One license is valid for an unlimited period of time on one installation only. However, it is possible to extend or transfer your license in 2 cases:
If you would like to add your testing environments to your license. In that case, it is possible to extend your license to an unlimited number of domains for free. For mywebsite-staging.com or mywebsite-dev.com
If you want to transfer your license to another live domain. In that case, the Support & Upgrade period for your license must still be active.
To be able to use Payment Method Rules on both your production and testing environments, follow the instructions below:
Install Payment Method Rules on your environment. (see FAQ: Modules installation in Magento or in WooCommerce)
Activate the license. (see FAQ: Licenses activation in Magento or in WooCommerce)
Also, if you are managing a large amount of domains, please contact us so that we can automatically whitelist these domains.
Modules versioning and download
Extensions download
In order to download Payment Method Rules, log into your Wyomind account:
Go to: my account › Licenses & downloads
Click on the settings icon next to Payment Method Rules.
A new window opens.
Click on the download icon.
Only the latest extension version released within your Support & Upgrade period is available. In order to get the very latest extension version make sure your Support & Upgrade plan is up to date.
Modules upgrade
When purchasing a module from wyomind.com, you benefit from 12 months of upgrade. Within this period you can at any time download the latest version of the module directly from your account.
To upgrade Payment Method Rules, follow the steps below:
Go to: my account › Licenses & Downloads
Click on the settings icon next to Payment Method Rules.
Click on the download icon.
Install the new version of Payment Method Rules in your Magento admin or your WooCommerce back-office.
Modules Installation/Uninstallation
Extensions manual installation
You can install Payment Method Rules manually.
Download Payment Method Rules (zip file) on: mY ACCOUNT › Licenses & Downloads Refer to the FAQ: Extensions download
Once Payment Method Rules is downloaded, open the folder and unzip it.
Copy the content of the unzipped folder and paste all files and directories in your Magento 2 root directory.
In your Command Line Interface, execute:
bin/magento setup:upgrade
If you are using a production mode, execute also:
bin/magento setup:static-content:deploy
bin/magento setup:di:compile
Extensions installation via Composer
You can install Payment Method Rules using Composer software in two cases:
if you purchased Payment Method Rules on Magento Marketplace.
if you purchased Payment Method Rules on Wyomind.com AND requested access to our repository: repo.wyomind.com
Add to your composer configuration our repository:
Extensions activation from the back-office of Magento
Once Payment Method Rules is installed, you have to activate the license. For previous versions, you can activate the license from your back-office:
Go to your Magento admin panel. A message pops up at the top of the page.
If the message doesn't appear then you must check that:
1. The Adminhtml_Notifications and Wyomind_Core modules are well enabled. 2. The HTML output of the Adminhtml_Notifications and Wyomind_Core modules are not disabled in: storesconfigurationadvanced advanced 3. The encryption key well exists in app/etc/env.php:
Copy your activation key in: Stores › Configuration › Wyomind › Your extension
You can find your activation key in 2 different places: - In the confirmation email that you received after purchasing Payment Method Rules. - In your Wyomind account: My account › Licenses & downloads Select Payment Method Rules and click on .
A new page opens where you'll find your activation key (see below).
In your Magento admin go to: Stores › Configuration › Wyomind › Your extension
Paste the activation key in the Activation Key field and choose between the automatic (yes) or the manual (no) activation method: - By choosing Yes, the connection to Wyomind license server will be automatic. - By choosing No, you will have to log on to Wyomind license server yourself.
Click on Save config .
A message appears at the top of your admin panel. Click on that link: Activate it now!
Copy and paste the license code in theLicense code field from your admin or simply click on Activate now!
Finally, refresh your cache, log out and log in back straight after, to complete the installation.
Add another domain to your license
To activate the license on another domain (test, staging...):
Once the extension is installed on the new domain, copy your activation key in: Stores › Configuration › Wyomind › Your extension
After having saved the configuration, a notification appears. Click on Add this domain to my license.
A transfer request will then be sent to our team within an hour. Once the request is taken care of, you will receive a confirmation email. If your transfer request is accepted, you can use Payment Method Rules on both environments at the same time.
Note that the order in which you activate your license on your domains does not matter. You can start with your staging/dev/local environment or with your live domain, the process will be the same.
Also, if you have loads of staging domains, or if you are an agency managing load of domains for your customers, please contact us so that we can automatically whitelist these domains.
Extensions activation from the CLI
Once Payment Method Rules is installed, you have to activate the license.
For this, you can use the below command line (change the Activation key with the corresponding value):
We are using this solution to manage our payment method between the online Store and the Storepickup in our Showroom. So we can be sure to have no orders with Methods we don't want to have it for each "Shipping Method". Very useful and easy configurable module!
P
Pawel
Merchant · Netherlands · User for 7 years
★★★★★
Great company and great service
Extension works super and support is more than helpfull
Magento 2 Compatibility
Supported by our master extension versions
2.4.8
2.4.7
2.4.6
2.4.5
2.4.4
2.4.3
2.4.2
2.4.1
2.4
2.3.7
2.3.6
2.3.5
2.3.4
2.3.3
2.3.2
2.3.1
2.3
Supported by our legacy extension versions
2.2.11
2.2.10
2.2.9
2.2.8
2.2.7
2.2.6
2.2.5
2.2.4
2.2.3
2.2.2
2.2.1
2.2
2.1.18
2.1.17
2.1.16
2.1.15
2.1.14
2.1.13
2.1.12
2.1.11
2.1.10
2.1.9
2.1.8
2.1.7
2.1.6
2.1.5
2.1.4
2.1.3
2.1.2
2.1.1
2.1
2.0.18
2.0.17
2.0.16
2.0.15
2.0.14
2.0.13
2.0.12
2.0.11
2.0.10
2.0.9
2.0.8
2.0.7
2.0.6
2.0.5
2.0.4
2.0.3
2.0.2
2.0.1
2.0
Changelog
4.0.3
Improvement
The store manager proxy is declared through the dependency injection configuration, as required by the Adobe Commerce Marketplace review.
4.0.2
4.0.1
Compatibility
PHP 8.1 compatibility
4.0.0
Initial release for the master version
3.0.0 legacy
Initial release for the legacy version
2.0.1
Compatibility
Compatibility with Magento v2.4.6 + PHP v8.2
1.5.0
Improvement
Apply database upgrade and database install from patches instead of the setup scripts
Remove drop table instruction in setup patches
1.4.6
Fix for applicating the rules when multi shipping
1.4.5
Fix not to filter the payment methods by the shipping method if the order contains only products that do not require delivery
1.4.4
Minor fix on code
1.4.3
Minor fix for using rules with virtual orders
1.4.2
Improvement
Rules are also applied on virtual orders
1.4.1
Improvement
Improved sample data
1.4.0
Improvement
Improved license management system (Clear code)
1.3.1
Scenario added for the demo
1.3.0
New method used to retrieve the payment methods
1.2.1
Compatibility with WebShopApps MatrixRate
1.2.0
Compatibility fix for Magento 2.3.3
1.1.0
Improvement
Use of rules when creating orders from Magento backend
Patch v1.1.0.2
Sample date available for the demo
Patch v1.1.0.1
Minor fix for Advanced Inventory compatibility
1.0.1
Improvement
Sample data available for the demo
1.0.0
First public release
Patch v1.0.0.7
Fix on the payment method rules in the checkout
New Payment method column in the grid
Code refresh
Patch v1.0.0.6
List of the payment methods according to all scopes
Patch v1.0.0.5
Update of the access control list
Patch v1.0.0.4
Fix for compatibility with Pickup@Store
Patch v1.0.0.3
Fix for the compilation
Patch v1.0.0.2
Minor fix
Patch v1.0.0.1
Fix when retrieving the quote in the checkout
Feature request
Specific needs or any ideas of enhancements and new features to add to the extension? Tell us more, we'll get back to you shortly!