mollie-logeecom/sylius-plugin

适用于Sylius应用的Mollie支付插件。

安装: 2

依赖: 0

建议者: 0

安全: 0

星标: 0

关注者: 0

分支: 15

类型:sylius-plugin

1.0 2023-05-09 10:23 UTC

This package is not auto-updated.

Last update: 2024-09-25 14:54:16 UTC


README

Sylius的Mollie支付插件

目录

概述

Screenshot showing payment methods show in shop

Screenshot showing payment methods show in admin

Screenshot showing payment method config in admin

Mollie是Sylius最受欢迎和最先进的支付网关集成。此插件已由Mollie官方认证。该集成目前支持以下支付方式

  1. 信用卡(万事达卡、维萨卡、美国运通卡)
  2. PayPal
  3. ApplePay
  4. Klarna
  5. iDEAL
  6. SEPA
  7. SOFORT
  8. EPS
  9. Giropay
  10. KBC/CBC支付按钮
  11. Przelewy24
  12. ING Home'Pay
  13. Belfius支付按钮
  14. 礼品卡
  15. Apple Pay Direct

来自Mollie的一些话:我们的使命是为每个人创造一个更大的竞技场。通过提供方便、安全的全球支付解决方案,我们消除了障碍,让您能够专注于业务增长。真诚是我们的底线。

Mollie是欧洲增长最快的金融科技公司之一。我们提供了一个简单的支付API,使网店和应用程序构建者能够一次性实现二十多种不同的支付方式。我们的包和插件是完全开源的,免费提供,并且易于集成到您当前的项目中。

Mollie以创新为荣。当我们开始时,我们就引领了支付行业,推出了比僵化、笨拙的银行更容易、更便宜、更灵活的无缝支付产品。现在,十多年后,70,000多家企业信任Mollie,我们仍在构建创新产品,努力让支付变得更好。

我们在这里帮助

这个开源插件是为了帮助Sylius社区并将Mollie支付平台提供给任何Sylius商店。如果您有任何额外的问题,需要帮助安装或配置插件,或者需要任何Sylius项目的帮助 - 请通过发送电子邮件至support@mollie.com联系我们

安装

要求

我们致力于开发稳定、受支持且最新的包版本。我们建议您也这样做。

有关完整安装指南,请访问安装

用法

在配置过程中,首先将密钥保存到数据库中,然后点击“加载方法”

渲染Mollie信用卡表单

您可以使用SyliusMolliePlugin:DirectDebit:_form.html.twig@SyliusMolliePlugin/Grid/Action/cancelSubscriptionMollie.html.twig模板将表单添加到补充直接借记卡数据的Twig UI中,并取消订阅表单。

有关如何做到这一点的示例,请参阅这些源文件

自定义

您可以通过装饰现有服务和扩展当前表单。

运行以下命令以查看与该插件共享的Symfony服务

$ bin/console debug:container sylius_mollie_plugin

插件开发

安装

$ composer install
$ cd tests/Application
$ yarn install
$ yarn encore dev
$ bin/console assets:install -e test
$ bin/console doctrine:database:create -e test
$ bin/console doctrine:schema:create -e test
$ symfony server:start
$ open https://:8080 // or the port showed in your terminal while runing command with symfony server:start
  • 同样在tests/Application/config/packages/webpack_encore.yaml中,确保存在以下配置
webpack_encore:
    output_path: '%kernel.project_dir%/public/build/default'
    builds:
        mollie-admin: '%kernel.project_dir%/public/build/mollie-admin'
        mollie-shop: '%kernel.project_dir%/public/build/mollie-shop'
  • 同样确保您在商店和行政视图目录中具有此配置
in: src/Resources/views/Shop/_javascripts.html.twig:
<script src="https://js.mollie.com/v1/mollie.js"></script>
{{ encore_entry_script_tags('shop-entry', null, 'mollie-shop') }}
{{ encore_entry_script_tags('plugin-shop-entry', null, 'mollie-shop') }}

in: src/Resources/views/Shop/_stylesheets.html.twig:
{{ encore_entry_link_tags('shop-entry', null, 'mollie-shop') }}
{{ encore_entry_link_tags('plugin-shop-entry', null, 'mollie-shop') }}
in: src/Resources/views/Admin/_javascripts.html.twig:
{{ encore_entry_script_tags('admin-entry', null, 'mollie-admin') }}
{{ encore_entry_script_tags('plugin-admin-entry', null, 'mollie-admin') }}

in: src/Resources/views/Admin/_stylesheets.html.twig:
{{ encore_entry_link_tags('admin-entry', null, 'mollie-admin') }}
{{ encore_entry_link_tags('plugin-admin-entry', null, 'mollie-admin') }}

前端

启动服务器和构建资源

  • 进入 ./tests/Application/ 目录
  • 在终端中运行 symfony server:start。它将启动本地服务器。
  • 在终端中运行 yarn watch。它将监视您在管理员和商店目录中的更改:../../src/Resources/assets/admin/..../../src/Resources/assets/shop/..
  • 在终端中运行 yarn dev 以在开发模式下一次性构建您的资源。
  • 在终端中运行 yarn encore production 以在生产模式下一次性构建您的资源——在创建每个拉取请求之前需要这样做。
  • 所有资源(Mollie 资产 + Sylius 基础资产)将在
tests/application/public/build/mollie-admin/..
tests/application/public/build/mollie-shop/..

在根/SRC目录中重建资源

  • 运行 bin/console assets:install

您可以编辑和工作的 CSS & JS 文件目录

  • 管理员:进入 ./src/Resources/assets/admin/**/
  • 商店:进入 ./src/Resources/assets/shop/**/

测试

$ bin/behat
$ bin/phpspec run

社区

对于在线沟通,我们邀请您加入我们和其他用户在 Sylius Slack 上的聊天。

开发者的额外资源

要了解更多关于我们的贡献流程和其他信息,我们鼓励您使用以下资源

许可证

此插件的源代码完全免费,并按 MIT 许可证的条款发布。

联系

如果您想联系我们,最佳方式是在 我们的网站 上填写表格或通过 support@mollie.com 发送电子邮件给我们您的疑问。我们保证我们会在尽可能快的时间内回答您!