os2forms/os2forms_payment

OS2Forms支付

安装: 68

依赖项: 0

建议者: 0

安全: 0

星标: 0

关注者: 3

分支: 0

公开问题: 0

类型:drupal-module

dev-develop 2023-10-13 06:57 UTC

This package is not auto-updated.

Last update: 2024-09-11 15:08:52 UTC


README

安装

composer require os2forms/payment
drush pm:enable os2forms_payment

settings.local.php 中定义设置

// CHECKOUT_KEY, both test and production, can be retrieved from Nets admin panel
$settings['os2forms_payment']['checkout_key'] = '';

// SECRET_KEY, both test and production, can be retrieved from Nets admin panel
$settings['os2forms_payment']['secret_key'] = '';

// Static page containing terms and conditions, e.g. /node/87
$settings['os2forms_payment']['terms_url'] = '';

// Boolean describing whether the module is operated in test mode
$settings['os2forms_payment']['test_mode'] = TRUE;

设置

确保设置值如上所述已设置。

  1. 创建一个新的表单
  2. 转到设置 -> 表单 -> 表单预览设置 -> 启用预览页面(必填)
  3. 在表单中添加支付元素
  4. 转到支付元素设置并选择包含应付金额的元素(字段类型:隐藏,选择)。
  5. 测试表单。Nets网关应在审查页面上出现。

编码规范

docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer install
docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer coding-standards-check

docker run --rm --interactive --tty --volume ${PWD}:/app node:18 yarn --cwd /app install
docker run --rm --interactive --tty --volume ${PWD}:/app node:18 yarn --cwd /app coding-standards-check

代码分析

docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer install
docker run --rm --interactive --tty --volume ${PWD}:/app itkdev/php8.1-fpm:latest composer code-analysis