PHP code example of billbee / foreign-systems-sdk

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

    

billbee / foreign-systems-sdk example snippets




declare(strict_types=1);

hannel\Http\OrderRequestHandler;
use Billbee\ForeignSystemsSdk\Channel\Http\ProductRequestHandler;
use Billbee\ForeignSystemsSdk\Http\Abstraction\Request;
use Billbee\ForeignSystemsSdk\Http\RequestHandlerPool;
use Billbee\ForeignSystemsSdk\Provisioning\Http\ProvisioningRequestHandler;

$request = Request::createFromGlobals();

$pool = new RequestHandlerPool();
$pool->addHandler(new ProvisioningRequestHandler(new YourProvisioningDetailsRepository()));
$pool->addHandler(new OrderRequestHandler(new YourOrderRepository()));

$response = $pool->handle($request);

$response->send();