jieyang/payssion-php
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jieyang/payssion-php
包简介
README 文档
README
Prerequisites
- PHP 5.3 or above
- curl, json & openssl extensions must be enabled
Usage
$payssion = new PayssionClient('your api key', 'your secretkey');
//please uncomment the following if you use sandbox api_key
//$payssion = new PayssionClient('your api key', 'your secretkey', false);
$response = null;
try {
$response = $payssion->create(array(
'amount' => 1,
'currency' => 'USD',
'pm_id' => 'alipay_cn',
'order_id' => 'your order id', //your order id
'return_url' => 'your return url' //optional, the return url after payments (for both of paid and non-paid)
));
} catch (Exception $e) {
//handle exception
echo "Exception: " . $e->getMessage();
}
if ($payssion->isSuccess()) {
//redirect the users to the payment URL
$payment_url = $response['redirect_url'];
} else {
//handle failure
}
PAYSSION PHP library
统计信息
- 总下载量: 19
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-06-11