renat-magadiev / comgate-client
Comgate客户端封装
2.0
2024-07-31 08:24 UTC
Requires
- php: >=7.0
- guzzlehttp/guzzle: ^6.3
Requires (Dev)
- phpunit/phpunit: 6.5.*
This package is not auto-updated.
Last update: 2024-09-25 09:06:29 UTC
README
Comgate API客户端
Comgate API客户端封装
此包允许您使用Comgate API创建支付并获取重定向URL发送给客户
要求
- PHP 7.0 或更高版本
- guzzlehttp/guzzle
安装
$ composer require renat-magadiev/comgate-client
基本用法
use Comgate\Client; use Comgate\Request\CreatePayment; $client = new Client('merchant', true, 'secret'); $createPayment = new CreatePayment(1000, 'orderId', 'test@test.cz', 'Product name'); $createPaymentResponse = $client->send($createPayment); $redirectUrl = $createPaymentResponse->getRedirectUrl();
CreatePayment
类具有与Comgate 文档中描述相同的属性