PHP code example of kerb / partner-sdk-php

1. Go to this page and download the library: Download kerb/partner-sdk-php 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/ */

    

kerb / partner-sdk-php example snippets




use Kerb\Partner\Partner;
use Kerb\Partner\Requests\Ping;

Partner::setApiKey($token);

$options = [
    'body' => [],
];
$response = Partner::send('ping', $options);


$request = new Ping($options);
/// this is same with above
// $request = Partner::makeRequest('ping', $options);

$request->setHeader('testing', 'ok');
$request->setHeader('not-used', null);

$response = Partner::request($request);