Download the PHP package smaex/customer-group-payments without Composer

On this page you can find all versions of the php package smaex/customer-group-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package customer-group-payments

Magento 2: Customer Group Payments

Restricts payment methods to specific customer groups in Magento 2.

Intro

Adding additional checks to payment methods – to decide if a certain payment method is applicable to a certain customer or not – is pretty easy and straight forward in Magento 2.

Magento provides a rather simplistic interface for custom payment method checks, and uses a composite check to process these individual checks. Adding a custom check is therefore just a matter of injecting it into Magento’s composite check via dependency injection.

This extension implements such a custom check to decide if a certain payment method is applicable to a customer based on the customer group, along with a corresponding system configuration field for payment methods.

Screenshot: Magento system configuration field for payment methods that restricts a payment method to selected customer groups.

Prerequisite

Unfortunately, there’s currently a limitation in Magento’s code regarding this mechanism that requires us to use a small workaround, so this extension depends on another extension providing this workaround. See smaex/additional-payment-checks for more information.

How to install

Simply require the extension via Composer.

Finally, enable the module via Magento’s CLI.

How to use

While the extension provides you with all the tools you need to restrict payment methods to specific customer groups, it doesn’t do anything without some custom configuration on your part. That’s because adding system configuration fields is done via XML configuration in Magento.

To properly configure your payment methods, the best way going forward is probably to set up your own custom module (e.g., Acme_Payment) under app/code.

Declaring a dependency on Magento_Payment and Smaex_CustomerGroupPayments in your module.xml is kinda mandatory, dependencies on other modules like Magento_OfflinePayments depend on the payment methods actually used in your project.

The next and already final step is then to provide your own system.xml under etc/adminhtml in your custom module and extend the existing configuration for each payment method used in your project.

Alternative

If you’re a lazy sloth this looks like too much work (i.e., XML configuration), there’s also another extension tackling the same problem from a very different angle.

We’re hiring!

Wanna work for one of Germany’s leading Magento partners? With agile methods, small teams and big clients? We’re currently looking for experienced masochists PHP & Magento developers in Munich. Sounds interesting? Just drop me a line via [email protected]


All versions of customer-group-payments with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1
magento/framework Version ^102.0
magento/module-customer Version ^102.0
magento/module-payment Version ^100.2
magento/module-quote Version ^101.0
smaex/additional-payment-checks Version ^1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package smaex/customer-group-payments contains the following files

Loading the files please wait ....