pledg/sylius-payment-plugin
Composer 安装命令:
composer require pledg/sylius-payment-plugin
包简介
Payment Gateway Plugin using PledgBySofinco (Sylius 2.x)
README 文档
README
Installation
- Install the package (beware of which version of our plugin supports your version of Sylius)
composer require pledg/sylius-payment-plugin
- Import routes in one of your routing file or create a new one (like
config/routes/pledg_sylius_payment.yaml)
pledg_sylius_payment: resource: "@PledgSyliusPaymentPlugin/Resources/config/routing.yml" prefix: /pledg
- Clear your cache in order to see translations
bin/console c:c
Create your payment method
Now you can use the plugin and create your first Pledg Payment method :
-
Select the PledgBySofinco Type
-
Fill all required fields (specially with your merchant id, secret and restricted countries). Don't forget to activate the method on your channel.
Pledg allows to use a payment method without a signature but the plugin does not allow it. So even in sandbox mode, the secret is required and exchanges will be signed.
How the plugin works ?
We use Payum and the Sylius payment workflow in order to redirect on the Pledg payment page. Pledg uses all the parameters already filled in order to avoid you to refill them again. If all mandatory parameters are filled, you just need to fill your banking information. Otherwise, you could potentially fill in your address and your phone number.
All parameters in this url are in a signature parameter corresponding to a JSON Web Token encoding with the HS256 algorithm.
The plugin reuses Payum in order to retrieve the result of the payment process.
We also have a webhook route for 2 types of Pledg notifications (Standard and Transfer mode). This 2 types are also signed : the first with a custom signature and the second with a JWT.
All the details (parameters, redirection url, pledg result, pledg errors, pledg notifications) are stored in the payment entity.
How to contribute ?
You just have to :
- Retrieve the package
- Launch
make env && make create-projectto create a new Sylius project - Launch
make installto install the database - Launch
make deploy_pledg_pluginto install the plugin in the container - Make a PR and check if the CI is green. Do not forget to upgrade the version number in the CHANGELOG.md and in the Pledg\SyliusPaymentPlugin\RedirectUrl\ParamBuilder.php file.
The plugin does not (yet) use behat. To compensate this, we wrote unit tests with PHPUnit in a classical way.
pledg/sylius-payment-plugin 适用场景与选型建议
pledg/sylius-payment-plugin 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.48k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2020 年 12 月 29 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「payment」 「sylius」 「sylius-plugin」 「pledg」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 pledg/sylius-payment-plugin 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 pledg/sylius-payment-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 pledg/sylius-payment-plugin 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Implementation of the Omnibus Directive for Sylius application.
Bulk export of sylius resources
Sylius plugin that integrates Addwish
Setono example plugin for Sylius.
Will translate fragments of text automatically
Use price tiers in your Sylius store.
统计信息
- 总下载量: 11.48k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-12-29