PHP code example of seniorprogramming / postisgate
1. Go to this page and download the library: Download seniorprogramming/postisgate 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/ */
seniorprogramming / postisgate example snippets
'postisgate' => [
'driver' => 'local',
'root' => storage_path('postisgate'),
],
PostisGate::login()
PostisGate::createShipment()
PostisGate::getShipmentLabel()
PostisGate::login(['name'=>'your_username', 'password'=>'your_password'])
PostisGate::createShipment([
"clientId" => "your_client_id",
"clientOrderDate" => "2018-04-12 07:03:03",
"clientOrderId" => "0005",
"paymentType" => "CASH",
"productCategory" => "Standard Delivery",
"recipientLocation" => [
"addressText" => "Cal. Floreasca 40",
"contactPerson" => "Gheorghe Ion",
"country" => "Romania",
"county" => "Bucuresti",
"locality" => "Bucuresti",
"locationId" => "1",
"name" => "Georghe Ion",
"phoneNumber" => "0700000000",
"postalCode" => "123456",
],
"sendType" => "FORWARD",
"senderLocation" => [
"addressText" => "Calea Bucuresti 22, Tunari, Ilfov",
"buildingNumber" => "22",
"contactPerson" => "depozit",
"country" => "Romania",
"county" => "Ilfov",
"locality" => "Tunari",
"locationId" => "149",
"name" => "Depozit central",
"phoneNumber" => "0212210000",
"postalCode" => "012345",
"streetName" => "Calea Bucuresti",
],
"shipmentParcels" => [[
"itemCode" => "AB1564",
"itemDescription1" => "product_name",
"itemUOMCode" => "BUC",
"parcelBrutWeight" => 20,
"parcelDeclaredValue" => 0,
"parcelReferenceId" => "PRE0005",
"parcelType" => "PACKAGE",
]],
"shipmentPayer" => "SENDER",
"shipmentReference" => "SRE0005",
"sourceChannel" => "ONLINE",
])
PostisGate::getShipmentLabel([
'shipmentId' => '1234567890',
'filename' => '0005_1234567890.pdf'
])
PostisGate::the_name_of_the_class([parameters])