whatwedo/sylius-datatrans-payment-plugin

为您的sylius电子商务项目提供Datatrans支付集成。


README

dde up
make exec
make install

然后在您的sylius项目中将其用作依赖项。

---- sylius样板 ----

插件骨架

开始Sylius插件的骨架。

文档

有关Sylius插件开发的全面指南,请访问Sylius文档,在那里您将找到插件开发指南,其中包含大量示例。

快速安装

  1. 运行composer create-project sylius/plugin-skeleton ProjectName

  2. 从插件骨架根目录,运行以下命令

    $ (cd tests/Application && yarn install)
    $ (cd tests/Application && yarn build)
    $ (cd tests/Application && bin/console assets:install public -e test)
    
    $ (cd tests/Application && bin/console doctrine:database:create -e test)
    $ (cd tests/Application && bin/console doctrine:schema:create -e test)

为了能够设置插件数据库,请记住在tests/Application/.envtests/Application/.env.test中配置您的数据库凭据。

用法

运行插件测试

  • PHPUnit

    $ vendor/bin/phpunit
  • PHPSpec

    $ vendor/bin/phpspec run
  • Behat(非JS场景)

    $ vendor/bin/behat --tags="~@javascript"
  • Behat(JS场景)

    1. 下载Chromedriver

    2. 下载Selenium Standalone Server

    3. 使用之前下载的Chromedriver运行Selenium服务器

      $ java -Dwebdriver.chrome.driver=chromedriver -jar selenium-server-standalone.jar
    4. localhost:8080上运行测试应用程序的web服务器

      $ (cd tests/Application && bin/console server:run localhost:8080 -d public -e test)
    5. 运行Behat

      $ vendor/bin/behat --tags="@javascript"

使用您的插件打开Sylius

  • 使用test环境

    $ (cd tests/Application && bin/console sylius:fixtures:load -e test)
    $ (cd tests/Application && bin/console server:run -d public -e test)
  • 使用dev环境

    $ (cd tests/Application && bin/console sylius:fixtures:load -e dev)
    $ (cd tests/Application && bin/console server:run -d public -e dev)