PHP code example of mobuygmbh / mobuy-api-client-php

1. Go to this page and download the library: Download mobuygmbh/mobuy-api-client-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/ */

    

mobuygmbh / mobuy-api-client-php example snippets


    


onfigure API key authorization: apiKey
Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// Swagger\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');

$api_instance = new Swagger\Client\Api\OrderApi();
$order_payload = new \Swagger\Client\Model\OrderPayload(); // \Swagger\Client\Model\OrderPayload | Order payload

try {
    $result = $api_instance->createOrder($order_payload);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling OrderApi->createOrder: ', $e->getMessage(), PHP_EOL;
}