3brs/sylius-gpwebpay-payment-gateway-plugin

GPWebpay plugin for Sylius

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 0

Open Issues: 0

Language:JavaScript

Type:sylius-plugin

v2.0.1 2024-11-10 12:40 UTC

This package is auto-updated.

Last update: 2024-11-10 12:41:09 UTC


README

GP webpay Payment Gateway Plugin

Features

  • Card payments as supported by GP webpay
  • Fully integrated as Sylius payment method
  • Using more different gateways at once or per channel

Installation

  1. Run $ composer require 3brs/sylius-gpwebpay-payment-gateway-plugin.

  2. Add plugin classes to your config/bundles.php:

    return [
       ...
       ThreeBRS\SyliusGPWebpayPaymentGatewayPlugin\ThreeBRSSyliusGPWebpayPaymentGatewayPlugin::class => ['all' => true],
    ];

Usage

  • Create GP webpay payment type
    in Sylius admin panel, Configuration -> Payment methods

Development

Usage

  • Develop your plugin in /src
  • See bin/ for useful commands

Testing

After your changes you must ensure that the tests are still passing.

docker compose run -u application app composer install
docker compose run -u application app bin/console doctrine:database:create --env=test
docker compose run -u application app bin/console doctrine:schema:update --complete --force --env=test
docker compose run -u node frontend yarn --cwd tests/Application install
docker compose run -u node frontend yarn --cwd tests/Application build

docker compose run -u application -e XDEBUG_MODE=off app bin/behat
docker compose run -u application app bin/phpstan.sh
docker compose run -u application app bin/ecs.sh

Opening Sylius with your plugin

  1. Install symfony CLI command: https://symfony.com/download
    • hint: for Docker (with Ubuntu) use Debian/Ubuntu — APT based Linux installation steps as root user and without sudo command
      • you may need to install curl first apt-get update && apt-get install curl --yes
  2. Run app sylius-g-p-webpay-payment-gateway-plugin
docker compose run -u application app bash
(cd tests/Application && APP_ENV=dev bin/console doctrine:database:create)
(cd tests/Application && APP_ENV=dev bin/console doctrine:schema:update --complete --force)
(cd tests/Application && APP_ENV=dev bin/console sylius:fixtures:load)
curl -sS https://get.symfony.com/cli/installer | bash
export PATH="$HOME/.symfony5/bin:$PATH"
(cd tests/Application && APP_ENV=dev symfony server:start --dir=public --port=8081)

open http://127.0.0.1:8081/admin/login, use sylius, sylius to login

  • change APP_ENV to test if you need it

License

This library is under the MIT license.

Credits

Developed by 3BRS
Forked from manGoweb.