heidelpay / php-payment-api
Requires
- php: >=7.1
- ext-json: *
- ext-simplexml: *
- lib-curl: *
- lib-openssl: *
Requires (Dev)
- codeception/aspect-mock: ^3.1
- codeception/codeception: ^4.1
- codeception/module-asserts: ^1.2
- friendsofphp/php-cs-fixer: ^2.16
- heidelpay/php-basket-api: ^1.0
- monolog/monolog: ^1.25
- phpunit/phpunit: ^7.5
Suggests
- heidelpay/php-basket-api: Use this package to transmit basket information.
- heidelpay/php-message-code-mapper: You can use this package to provide user-friendly messages instead of error codes.
Conflicts
Replaces
README
欢迎来到heidelpay支付php API
这是heidelpay的php支付API。该库可以帮助您轻松将heidelpay集成到您的应用中。
当前支持的支付方式
- 信用卡
- 借记卡
- 预付款
- Sofort
- PayPal
- 直接借记
- iDeal
- Giropay
- Przelewy24
- PostFinance Card
- PostFinance EFinance
- EPS
- 发票
- 保障B2C发票
- 保障B2B发票
- 保障B2C直接借记
- Santander发票
- Santander分期付款
- easyCredit
- Payolution发票
系统要求
php-payment-api需要PHP 7.1或更高版本;我们建议尽可能使用最新稳定版本的PHP。
安全建议
如果您想将此库的输出存储到数据库中,例如,请确保您的应用程序处理SQL注入、跨站脚本(xss)等。目前没有内置的保护措施。
许可证
您可以在LICENSE.txt中找到此许可证的副本。
支持
对于任何问题或疑问,请联系我们的支持团队。
网页
电子邮件
电话
+49 (0)6221/6471-100
@devHeidelpay
文档
请访问http://dev.heidelpay.com/heidelpay-php-payment-api/获取开发者文档。
单元测试和集成测试
此库附带了一套单元测试和集成测试。请不要在每个构建上运行集成测试。
在测试之前运行:vendor/bin/codecept build
运行单元测试:vendor/bin/codecept run unit
运行单元测试并生成覆盖率报告:vendor/bin/codecept run unit --coverage --coverage-html
运行集成测试:vendor/bin/codecept run integration
使用调试输出运行集成测试: vendor/bin/codecept run integration --debug
运行特定类的所有集成测试: vendor/bin/codecept run tests/integration/PaymentMethods/EasyCreditPaymentMethodTest
运行特定的集成测试: vendor/bin/codecept run tests/integration/PaymentMethods/EasyCreditPaymentMethodTest:initialRequest
查看覆盖率分析结果请见: ./tests/_output/coverage/index.html
示例
集成示例可以在示例文件夹中找到。只需打开
_enableExamples.php
并更改
define('HEIDELPAY_PHP_PAYMENT_API_EXAMPLES', FALSE);
为
define('HEIDELPAY_PHP_PAYMENT_API_EXAMPLES', TRUE);
请确保在启动您的应用程序后再次将其关闭。
要启用easyCredit示例,您可能需要更改文件“example/EasyCredit/EasyCreditResponseParams.txt”的文件权限。
它将用于存储支付异步发送的post参数,否则这些参数在客户端会话中将无法访问。