Download the PHP package pledg/sylius-payment-plugin without Composer

On this page you can find all versions of the php package pledg/sylius-payment-plugin. 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 sylius-payment-plugin

Sylius Payment Gateway Plugin using Pledg

Installation

  1. Install the package (beware of which version of our plugin supports your version of Sylius)

  2. Import routes in one of your routing file or create a new one (like config/routes/pledg_sylius_payment.yaml)

  3. Clear your cache in order to see translations

Sandbox and production environment

By default, plugin uses sandbox mode. You can configure it by specify the mode in your configuration files. For example if you only want to disable the sandbox mode for the production environment you just have to create a config/packages/prod/pledg_sylius_payment_plugin.yaml file with :

Create your payment method

Now you can use the plugin and create your first Pledg Payment method :

  1. Select the Pledg Type

  1. Fill all required fields (specially with your merchant id, secret and restricted countries). Don't forget to activate the method on your channel.

Pledg allow to use a payment method without a signature but the plugin does not allow it. So even in sandbox mode, the secret is required and exchanges will be signed.

Add assets

Add state machine configuration

Import the configuration in _sylius.yaml or your pledg_sylius_payment_plugin.yaml file : `

How the plugin works ?

We use Payum and the Sylius payment workflow in order to redirect on the Pledg payment page. Pledg uses all the parameters already filled in order to avoid you to refill them again. If all mandatory parameters are filled, you just need to fill your banking information. Otherwise, you could potentially fill in your address and your phone number.

All parameters in this url are in a signature parameter corresponding to a JSON Web Token encoding with the HS256 algorithm.

The plugin reuses Payum in order to retrieve the result of the payment process.

We also have a webhook route for 2 types of Pledg notifications (Standard and Transfer mode). This 2 types are also signed : the first with a custom signature and the second with a JWT.

All the details (parameters, redirection url, pledg result, pledg errors, pledg notifications) are stored in the payment entity.

How to contribute ?

You just have to :

  1. Retrieve the package
  2. Launch make install to install the database
  3. Launch make up-d in order to install the plugin in a dockerized environment with a test application
  4. Launch make ci if you want to check if everything works fine
  5. Make a PR and check if the CI is green. Do not forget to upgrade the version number in the CHANGELOG.md and in the Pledg\SyliusPaymentPlugin\RedirectUrl\ParamBuilder.php file.

The plugin does not (yet) use behat. To compensate this, we wrote unit tests with PHPUnit in a classical way.


All versions of sylius-payment-plugin with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4 | ^8.0
ext-json Version *
sylius/sylius Version ~1.9.0 | ~1.10.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 pledg/sylius-payment-plugin contains the following files

Loading the files please wait ....