Download the PHP package webgriffe/sylius-pausepay-plugin without Composer
On this page you can find all versions of the php package webgriffe/sylius-pausepay-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webgriffe/sylius-pausepay-plugin
More information about webgriffe/sylius-pausepay-plugin
Files in webgriffe/sylius-pausepay-plugin
Package sylius-pausepay-plugin
Short Description Sylius plugin for PausePay payment gateway
License proprietary
Informations about the package sylius-pausepay-plugin
Sylius PausePay Plugin
Sylius plugin for PausePay payment method.
Installation
-
Run:
-
Add
Webgriffe\SyliusPausePayPlugin\WebgriffeSyliusPausePayPlugin::class => ['all' => true]
to yourconfig/bundles.php
.Normally, the plugin is automatically added to the
config/bundles.php
file by thecomposer require
command. If it is not, you have to add it manually. -
Create a new file config/packages/webgriffe_sylius_pausepay_plugin.yaml:
-
Create a new file config/routes/webgriffe_sylius_pausepay_plugin.yaml:
-
Add the PaymentOrder entity. Create a new file
src/Entity/Payment/PaymentOrder.php
with the following content: -
Add a new CompanyInfoResolver service that decorates the dummy service
webgriffe_sylius_pausepay.resolver.company_info
of the plugin. This service is used to resolve the company info "of the order" and will be passed to PausePay system upon payment creation.Create a new file
src/Resolver/PausePay/CompanyInfoResolver.php
with the following content:and define it as the decoration/replacement of the service with alias
webgriffe_sylius_pausepay.resolver.company_info
. For example create the fileconfig/services/resolver.yaml
with content:TODO: Add sandbox logic
-
If you have a custom implementation of the Sylius service
PaymentMethodResolver
, you must add the logic to check the availability of PausePay payment method by using the servicePausePayAvailabilityChecker
.TODO: Add example
-
Run:
-
Run:
Or, you can add the entry to your webpack.config.js file:
And then override the template
WebgriffeSyliusPausePayPlugin/after_pay.html.twig
to include the entry:
Usage
Access to the admin panel and go to the Payment methods
section. Create a new payment method and select PausePay
as gateway. Then, configure the payment method with the required parameters.
Contributing
For a comprehensive guide on Sylius Plugins development please go to Sylius documentation, there you will find the Plugin Development Guide, that is full of examples.
Quickstart Installation
Traditional
-
Run
composer create-project sylius/plugin-skeleton ProjectName
. - From the plugin skeleton root directory, run the following commands:
To be able to set up a plugin's database, remember to configure you database credentials in tests/Application/.env
and tests/Application/.env.test
.
Docker
-
Execute
docker compose up -d
-
Initialize plugin
docker compose exec app make init
- See your browser
open localhost
Usage
Running plugin tests
-
PHPUnit
-
PHPSpec
-
Behat (non-JS scenarios)
-
Behat (JS scenarios)
-
Start Headless Chrome:
-
Install SSL certificates (only once needed) and run test application's webserver on
127.0.0.1:8080
: - Run Behat:
-
Static Analysis
-
Psalm
- PHPStan
-
- Coding Standard
Opening Sylius with your plugin
-
Using
test
environment: - Using
dev
environment:
All versions of sylius-pausepay-plugin with dependencies
guzzlehttp/psr7 Version ^1.8 || ^2.5
nesbot/carbon Version ^2.72
php-http/discovery Version ^1.19
psr/http-factory Version ^1.0
sylius/sylius Version ^1.11
symfony/webpack-encore-bundle Version ^1.17