Skip to content
master
Switch branches/tags
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
bin
 
 
doc
 
 
 
 
 
 
 
 
src
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


Overview

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

For Merchants

Are you using Sylius with QuadPay? Ask for a special pricing here!

Support

We work on amazing eCommerce projects on top of Sylius and Pimcore. Need some help or additional resources for a project? Write us an email on mikolaj.krol@bitbag.pl or visit our website! 🚀

Demo

We created a demo app with some useful use-cases of the plugin! Visit demo.bitbag.shop to take a look at it. The admin can be accessed under demo.bitbag.shop/admin link and sylius: sylius credentials.

Installation

  1. Require plugin with composer:

    composer require bitbag/quadpay-plugin
  2. Import configuration:

    imports:
        - { resource: "@BitBagSyliusQuadPayPlugin/Resources/config/config.yml" }
  3. Add parameters to config.yml:

    parameters:
        sylius.form.type.checkout_select_payment.validation_groups: ['sylius', 'checkout_select_payment']
  4. Add plugin class to your AppKernel:

    $bundles = [
        new \BitBag\SyliusQuadPayPlugin\BitBagSyliusQuadPayPlugin(),
    ];
  5. Copy templates from vendor/bitbag/quadpay-plugin/src/Resources/views/SyliusShopBundle/ to app/Resources/SyliusShopBundle/views/.

  6. Install assets:

    bin/console assets:install --symlink web
  7. Clear cache:

    bin/console cache:clear

Required merchant configuration in QuadPay

Merchant configuration must have captureFundsOnOrderCreation set to true.

Cron job

Integrations should keep track of what orders have been sent to QuadPay for payment and have a scheduled job that runs every 10 minutes or so that checks the status of these orders.

For example:

*/10 * * * * bin/console bitbag:quadpay:update-payment-state

QuadPay Widget

QuadPay Widget could be rendered in your twig templates using bitbag_quadpay_render_widget([amount], [channel]) helper extension.

For example:

<link rel="stylesheet" href="{{ asset('bundles/bitbagsyliusquadpayplugin/css/style.css') }}">

{{ bitbag_quadpay_render_widget(cart.total, sylius.channel) }}

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 bitbag_sylius_quadpay_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/.