PHP code example of businessprocess / payhub-sdk

1. Go to this page and download the library: Download businessprocess/payhub-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/ */

    

businessprocess / payhub-sdk example snippets




$client = new \Payhub\Service\Payhub([
    'url' => '', # Project url  
    'token' => Oidc::serviceToken(), # Api token
]);
$order = \Payhub\Models\Order::make([
    'type' => 1,
    'callback_url' => 'https://your-callback.url',
    ...
]);
$response = $client->create($order);

echo $response->all(); # '[{"link": ...}'

$order = \Payhub\Models\Order::make([
    'type' => 1,
    'callback_url' => 'https://your-callback.url',
    ...
]);
$response = \Payhub\Facade\Payhub::create($order);

echo $response->all(); # '[{"link": ...}'
bash
# Install Composer
curl -sS https://getcomposer.org/installer | php