3brs/sylius-gpwebpay-payment-gateway-plugin

Sylius 的 GPWebpay 插件

安装: 4

依赖: 0

建议: 0

安全: 0

星标: 0

关注者: 2

分支: 0

公开问题: 0

语言:JavaScript

类型:sylius-plugin

v2.0.0 2024-07-24 08:52 UTC

This package is auto-updated.

Last update: 2024-09-26 08:21:10 UTC


README

GP webpay 支付网关插件

特性

  • 支持通过 GP webpay 进行卡支付
  • 作为 Sylius 支付方式完全集成
  • 一次性或按渠道使用更多不同的网关

安装

  1. 运行 $ composer require 3brs/sylius-gpwebpay-payment-gateway-plugin.

  2. 将插件类添加到您的 config/bundles.php

    return [
       ...
       ThreeBRS\SyliusGPWebpayPaymentGatewayPlugin\ThreeBRSSyliusGPWebpayPaymentGatewayPlugin::class => ['all' => true],
    ];

使用

  • 在 Sylius 管理面板中创建 GP webpay 支付类型
    配置 -> 支付方式

开发

使用

  • /src 中开发您的插件
  • 查看 bin/ 获取有用的命令

测试

在您的更改后,您必须确保测试仍然通过。

docker compose run -u application app composer install
docker compose run -u application app bin/console doctrine:database:create --env=test
docker compose run -u application app bin/console doctrine:schema:update --complete --force --env=test
docker compose run -u node frontend yarn --cwd tests/Application install
docker compose run -u node frontend yarn --cwd tests/Application build

docker compose run -u application -e XDEBUG_MODE=off app bin/behat
docker compose run -u application app bin/phpstan.sh
docker compose run -u application app bin/ecs.sh

使用您的插件打开 Sylius

  1. 安装 symfony CLI 命令: https://symfony.com.cn/download
    • 提示:对于 Docker(使用 Ubuntu),使用 Debian/Ubuntu — 基于 APT 的 Linux 安装步骤作为 root 用户,无需 sudo 命令
      • 您可能需要先安装 curl apt-get update && apt-get install curl --yes
  2. 运行 app sylius-g-p-webpay-payment-gateway-plugin
docker compose run -u application app bash
(cd tests/Application && APP_ENV=dev bin/console doctrine:database:create)
(cd tests/Application && APP_ENV=dev bin/console doctrine:schema:update --complete --force)
(cd tests/Application && APP_ENV=dev bin/console sylius:fixtures:load)
curl -sS https://get.symfony.com/cli/installer | bash
export PATH="$HOME/.symfony5/bin:$PATH"
(cd tests/Application && APP_ENV=dev symfony server:start --dir=public --port=8081)

打开 http://127.0.0.1:8081/admin/login,使用 syliussylius 登录

  • 如果需要,将 APP_ENV 更改为 test

许可证

此库位于 MIT 许可证下。

致谢

3BRS 开发
manGoweb 分支。