setono / sylius-quickpay-plugin
Quickpay payment plugin for Sylius
Installs: 47 291
Dependents: 1
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 2
Open Issues: 3
Type:sylius-plugin
pkg:composer/setono/sylius-quickpay-plugin
Requires
- php: >=8.1
- ext-json: *
- ext-mbstring: *
- doctrine/collections: ^1.6
- doctrine/orm: ^2.7
- fakerphp/faker: ^1.21
- payum/payum: ^1.6
- setono/payum-quickpay: ^1.3
- symfony/config: ^5.4 || ^6.0
- symfony/dependency-injection: ^5.4 || ^6.0
- symfony/form: ^5.4 || ^6.0
- symfony/http-foundation: ^5.4 || ^6.0
- symfony/http-kernel: ^5.4 || ^6.0
- symfony/intl: ^5.4 || ^6.0
- symfony/validator: ^5.4 || ^6.0
- viison/address-splitter: ^0.3.4
- webmozart/assert: ^1.11
- winzou/state-machine: ^0.3 || ^0.4
Requires (Dev)
- api-platform/core: ^2.7
- behat/behat: ^3.12
- lexik/jwt-authentication-bundle: ^2.16
- matthiasnoback/symfony-config-test: ^4.3
- matthiasnoback/symfony-dependency-injection-test: ^4.3
- phpspec/phpspec: ^7.3
- phpunit/phpunit: ^9.5
- psalm/plugin-phpunit: ^0.18
- psalm/plugin-symfony: ^5.0
- setono/code-quality-pack: ^2.4
- sylius/sylius: ~1.12.3
- symfony/debug-bundle: ^5.4 || ^6.0
- symfony/dotenv: ^5.4 || ^6.0
- symfony/property-info: ^5.4 || ^6.0
- symfony/serializer: ^5.4 || ^6.0
- symfony/web-profiler-bundle: ^5.4 || ^6.0
- symfony/webpack-encore-bundle: ^1.16
This package is auto-updated.
Last update: 2025-10-15 12:39:05 UTC
README
Quickpay Payment plugin for Sylius
This plugin adds Quickpay as a payment option to Sylius.
Installation
1. Install plugin
composer require setono/sylius-quickpay-plugin
2. Make sure the plugin is added to bundles.php:
# config/bundles.php Setono\SyliusQuickpayPlugin\SetonoSyliusQuickpayPlugin::class => ['all' => true],
3. Import the config file
# config/packages/_sylius.yaml imports: - { resource: "@SetonoSyliusQuickpayPlugin/Resources/config/app/config.yaml" }
4. (Optional) Import fixtures to play in your app
# config/packages/_sylius.yaml imports: - { resource: "@SetonoSyliusQuickpayPlugin/Resources/config/app/fixtures.yaml" }
5: Add validator constraint (optional)
Add this constraint if you are planning on using Klarna.
Create config/validator/Address.xml:
<?xml version="1.0" encoding="UTF-8"?> <constraint-mapping xmlns="http://symfony.com/schema/dic/constraint-mapping" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://symfony.com/schema/dic/constraint-mapping http://symfony.com/schema/dic/services/constraint-mapping-1.0.xsd"> <class name="Sylius\Component\Addressing\Model\Address"> <constraint name="Setono\SyliusQuickpayPlugin\Validator\Constraints\AddressStreetEligibility"> <option name="message">setono_sylius_quickpay.address.street_eligibility</option> <option name="groups"> <value>sylius_shipping_address_update</value> <value>sylius_checkout_complete</value> <value>sylius</value> </option> </constraint> </class> </constraint-mapping>
Like it configured at example application.
Configuration
Create a new Payment method of the type Quickpay and fill out the required form fields.
Testing
Automated tests
Run composer tests
Manual testing
- Use credit card numbers from https://learn.quickpay.net/tech-talk/appendixes/test/#test-data
Troubleshooting
-
Validation error: Transaction in wrong state for this operationafter upgrading to Sylius v1.6After this commit,
use_authorizeconfig option should be strictlybooleantyped. Update yourpayment_methodfixtures like done at this commit.At live app - open each quickpay payment method at admin and click save so hidden
use_authorizeform field will be stored in database in new format. -
Not authorized: Not authorized to PUT /payments/:id/linkat/payment/authorize/...url:You should check at
https://manage.quickpay.net/account/{QUICKPAY_MERCHANT_ID}/settings/usersthatSystem users>API User>User permissions>Create or update payment linkhavePUTcheckbox checked. Also checkQUICKPAY_API_KEYandQUICKPAY_AGREEMENT_IDis filled withAPI User's api key and agreement id rather thanPayment Window's. -
Validation error: order_id already exists on another paymentMake sure you changed your
QUICKPAY_ORDER_PREFIXat.env.*to some unique string likeqp_<projectname>_<date>_(whendateshould be updated to actual every time you recreate dev database) whenever you:- Recreating your database on dev environment and your order IDs become same as they was before
- Use
SetonoSyliusQuickpayPluginat two different projects but with same QuickPay (developer) account credentials
-
Validation error: order_id must have length between 4 and 20You should cut your
QUICKPAY_ORDER_PREFIXto 11 chars or less.