PHP code example of proclame / mikropakket-php
1. Go to this page and download the library: Download proclame/mikropakket-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/ */
proclame / mikropakket-php example snippets
// Create a parcel
$request = new Mikropakket\ParcelRequest();
$request->setApiKey((string) API_KEY, (bool) $isProduction);
$request->setAttributes($attributes = ["attribute_key" => "attribute_value"]);
$labelResponse = $request->request();
$labelResponse->shipmentParcel->stream("optional-filename.pdf"); // ->download() can be used as well
bash
composer