matico / paidjp
Paidjp PHP 库
dev-master
2019-03-15 16:20 UTC
Requires
- php: >=5.3.3
Requires (Dev)
- phpunit/phpunit: ~4.0
This package is auto-updated.
Last update: 2024-09-16 05:06:31 UTC
README
如何使用
- 将源代码拉取到您的项目中
- 在 /config.php 中有一些库的配置。查看并更新
const PAID_API_AUTH_CODE = 'put_your_auth_code_here';
const PAID_API_LOG_PATH = 'your log path, eg: /tmp/paidlib/';
- 将 autoloader.php 添加到您的源代码中
$userId='user_id_want_to_check_status';
$result = Account::checkStatus($userId);
API 格式将返回
print_r($result, true)
===>
Array
(
[status] => SUCCESS|CLIENT_ERROR|ERROR // success or error
[result] => array() // data will be returned in success cases
[error] => Array
(
[code] => REQUEST_ERROR|PARAM_INVALID // error when request or param is invalid
[detail] => C01|b2bCreditId // error_code_from_paidjp or invalid param name
)
)
示例和测试用例
一些示例和测试用例请查看 /tests/ 目录