GoPayWin API Bindings for PHP
, (*1)
Installation
The GoPayWin API Client can be installed via Composer by requiring the
gopaywin/api-client package in your project's composer.json., (*2)
{
"require": {
"gopaywin/api-client": "0.2.*@dev"
}
}
Then run a composer update, (*3)
php composer.phar update
Configuration
$configuration = new \GoPayWin\ApiClient\Configuration();
$configuration->load_from_array(array(
'endpoint' => \GoPayWin\ApiClient\Configuration::SANDBOX_ENDPOINT,
'private_key' => '...',
'publishable_key' => '...'
));
You can create custom configuration loaders by extending the \GoPayWin\ApiClient\Configuration class., (*4)
Usage
$request = new \GoPayWin\ApiClient\Request('/orders', $configuration);
$response = $request->get();
Links