Git Product home page Git Product logo

payplug-sylius's Introduction

Overview

This plugin allows you to integrate PayPlug payment with Sylius platform app.

Installation

Add a package to your private repository and add the repository to composer.json:

{
    "minimum-stability": "dev",
    "repositories": [
        {
          "type": "vcs",
          "url": "<your URL to private repository>"
        }
    ]
}
  1. Require plugin with composer:

    composer require payplug/payplug-sylius
  2. Import configuration in your config/packages/_sylius.yaml file:

    imports:
        - { resource: "@PayPlugSyliusPayPlugPlugin/Resources/config/config.yml" }
  3. Add plugin class to your config/bundles.php file:

    $bundles = [
        PayPlug\SyliusPayPlugPlugin\PayPlugSyliusPayPlugPlugin::class => ['all' => true],
    ];
  4. Clear cache:

    bin/console cache:clear

Requirements

In the channel settings, the base currency must be set to EUR because the payment gateway only works in this currency. The plugin in the local environment will not work properly because you will not be notified of the status of payments from the payment gateway

Cron job

In the case when the IPN is blocked, you can set cron job every minute that updates the payment status.

For example:

* * * * * bin/console payplug:update-payment-state

Logs

If you want to follow the logs in the production environment, you need to add the configuration in config/packages/prod/monolog.yaml, logs should be in var/log/prod.log which can be searched after the phrase [Payum] or [PayPlug]:

  monolog:
      handlers:
         ...
         
         payum:
             level: debug
             type: stream
             path: "%kernel.logs_dir%/%kernel.environment%.log"

IPN testing on the local machine

In the configuration of the payment gateway in the admin panel, set your url (eg from ngrok) to notifications in the field Notification url for environment dev. This url will only work in the dev environment.

Customization

Available services you can decorate and forms you can extend

Run the below command to see what Symfony services are shared with this plugin:

$ bin/console debug:container payplug_sylius_payplug_plugin

Testing

$ composer install
$ cd tests/Application
$ yarn install
$ yarn run gulp
$ bin/console assets:install web -e test
$ bin/console doctrine:database:create -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -d web -e test
$ open http://localhost:8080
$ bin/behat
$ bin/phpspec run

Contribution

Learn more about our contribution workflow on http://docs.sylius.org/en/latest/contributing/.

payplug-sylius's People

Contributors

aphy avatar bitbager avatar splanquart avatar mrorgues-payplug avatar alopez-pp avatar hdelaforce-payplug avatar ronan-jaffre avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.