gtxpoint/paymentpage-sdk
最新稳定版本:1.0.0
Composer 安装命令:
composer require gtxpoint/paymentpage-sdk
包简介
PHP SDK
README 文档
README
Please note that for correct SDK operating you must have at least PHP 7.0.
Payment flow
Installation
Install with composer
composer require gtxpoint/paymentpage-sdk
Get URL for payment
$gate = new gtxpoint\Gate('secret'); $payment = new gtxpoint\Payment('11', 'some payment id'); $payment->setPaymentAmount(1000)->setPaymentCurrency('RUB'); $url = $gate->getPurchasePaymentPageUrl($baseUrl, $payment);
Handle callback
You'll need to autoload this code in order to handle notifications:
$gate = new gtxpoint\Gate('secret'); $callback = $gate->handleCallback($data);
$data is the JSON data received from payment system;
$callback is the Callback object describing properties received from payment system;
$callback implements these methods:
Callback::getPaymentStatus();Get payment status.Callback::getPayment();Get all payment data.Callback::getPaymentId();Get payment ID in your system.
TODO
- Payment Page opening
- Notifications handling
- Direct Gate requests
- PHPDoc
统计信息
- 总下载量: 190
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-10
