PHP code example of forgie1 / gls-soap-api

1. Go to this page and download the library: Download forgie1/gls-soap-api 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/ */

    

forgie1 / gls-soap-api example snippets


$client = new \GlsSoapApi\GlsClient('endPoint', 'userName', 'password', 'senderId', 'testMode');

$requestData = new \GlsSoapApi\Requests\Entities\PrintLabelRequestData();
$requestData
    ->set ....;

$request = new \GlsSoapApi\Requests\PrintLabelRequest($requestData)

$response = $client->send($request);