pledg/sylius-payment-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

pledg/sylius-payment-plugin

Composer 安装命令:

composer require pledg/sylius-payment-plugin

包简介

Payment Gateway Plugin using PledgBySofinco (Sylius 2.x)

README 文档

README

Installation

  1. Install the package (beware of which version of our plugin supports your version of Sylius)
    composer require pledg/sylius-payment-plugin
  1. 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
  1. 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 :

  1. Select the PledgBySofinco Type

  2. 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 :

  1. Retrieve the package
  2. Launch make env && make create-project to create a new Sylius project
  3. Launch make install to install the database
  4. Launch make deploy_pledg_plugin to install the plugin in the container
  5. 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 我们能提供哪些服务?
定制开发 / 二次开发

基于 pledg/sylius-payment-plugin 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 11.48k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 9
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 11
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-12-29