gopaywin / api-client
GoPayWin API PHP 客户端绑定
dev-master
2016-07-22 13:54 UTC
Requires
- php: >=5.3
This package is not auto-updated.
Last update: 2024-09-26 01:00:08 UTC
README
安装
GoPayWin API 客户端可以通过Composer安装,在项目的 composer.json
中添加 gopaywin/api-client
包。
{ "require": { "gopaywin/api-client": "0.2.*@dev" } }
然后运行 composer update
php composer.phar update
配置
$configuration = new \GoPayWin\ApiClient\Configuration(); $configuration->load_from_array(array( 'endpoint' => \GoPayWin\ApiClient\Configuration::SANDBOX_ENDPOINT, 'private_key' => '...', 'publishable_key' => '...' ));
您可以通过扩展 \GoPayWin\ApiClient\Configuration
类来创建自定义配置加载器。
用法
$request = new \GoPayWin\ApiClient\Request('/orders', $configuration); $response = $request->get();