1. Go to this page and download the library: Download chainside/webpos-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
use Chainside\SDK\WebPos\Client;
$config = [
'mode' => 'live',
'client_id' => 'CLIENT_ID',
'secret' => 'SECRET'
];
$client = new Client($config);
// Using the IoC
$client = app('chaniside.sdk.webpos');
// Using the Facade, you can directly instantiate run an action
$response = \ChainsideWebPosClient::clientCredentialsLogin(...);
$receivedCallback = \ChainsideWebPosCallbackHandler::parse($headers, $request);
// Or using the IoC
// $receivedCallback = app('chainside.sdk.webpos.callback.handler')->parse($headers, $request);
$context = new ApiContext($config);
$handler = new ChainsideCallbacksHandler($context);
$receivedCallback = $handler->parseFromGlobals();
// Or, using Laravel
$receivedCallback = \ChainsideWebPosCallbackHandler::parseFromGlobals();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.