sbarbat/sylius-sagepay-plugin
Composer 安装命令:
composer require sbarbat/sylius-sagepay-plugin
包简介
The Payum Sagepay plugin
README 文档
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
统计信息
- 总下载量: 3.47k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-13
