sbarbat / sylius-sagepay-plugin
The Payum Sagepay plugin
Installs: 3 406
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 8
Open Issues: 4
Type:sylius-plugin
Requires
- php: ^7.1
- ext-curl: *
- ext-json: *
- sylius/sylius: ^1.1
Requires (Dev)
- behat/behat: ^3.8
- php-http/guzzle6-adapter: ^2.0
- phpspec/phpspec: ^7.1
- phpstan/phpstan: ^0.12.94
- phpunit/phpunit: ^9.5
- sylius-labs/coding-standard: ^4.1
- symplify/easy-coding-standard: ^9.4
This package is auto-updated.
Last update: 2024-12-11 17:36:29 UTC
README
This plugins provides integration for Direct (server) Sagepay integrations. It supports 3D Secure.
This plugin is been used at least on one production website with over 10,000 successfully processed transactions.
Installation
$ composer require sbarbat/sylius-sagepay-plugin
Add plugin dependencies to your AppKernel.php file:
public function registerBundles() { return array_merge(parent::registerBundles(), [ ... new \Sbarbat\SyliusSagepayPlugin\SbarbatSyliusSagepayPlugin(), ]); }
Optional Installation steps
Money Amount Conversion
By default sylius stores prices as integer values representing the amount in cents/pence or smallest unit.
If you have modified sylius to store money amounts in a different format, or with a different precision, then you will need to override.
Example, if your copy of sylius stores 4 decimals instead of 2, then you will need to override the class like this:
<?php declare(strict_types = 1); namespace App\Provider\Sagepay; use Sbarbat\SyliusSagepayPlugin\Provider\AmountProvider as BaseAmountProvider; use Sylius\Component\Core\Model\PaymentInterface; class AmountProvider extends BaseAmountProvider { public function getAmount(PaymentInterface $payment): string { return (string) ($payment->getAmount() / 10000); } }
and add an entry to your service config to point to it:
Sbarbat\SyliusSagepayPlugin\Provider\AmountProvider: class: App\Provider\Sagepay\AmountProvider
Test Cards
Sagepay Direct Integration Protocol and Guidelines
Sagepay Form Integration Protocol and Guidelines
Support
Do you want us to customize this plugin for your specific needs? Write us an email on barbatsan@gmail.com