This package is PHP API client for Bliskapaczka.pl API.
Client has support for API actions:
- order
- save
- get waybill
- pricing
- get
For more information pleas see Bliskapaczka API documentation
$apiKey = 'xxxxx-xxxxx-xxxxx-xxxxx-xxxxx';
$apiClient = new Bliskapaczka\ApiClient\Bliskapaczka\Order($apiKey, 'test');
$orderData = [
"senderFirstName" => "string",
"senderLastName" => "string",
"senderPhoneNumber" => "606555433",
"senderEmail" => "[email protected]",
"senderStreet" => "string",
"senderBuildingNumber" => "string",
"senderFlatNumber" => "string",
"senderPostCode" => "54-130",
"senderCity" => "string",
"receiverFirstName" => "string",
"receiverLastName" => "string",
"receiverPhoneNumber" => "600555432",
"receiverEmail" => "[email protected]",
"operatorName" => "INPOST",
"destinationCode" => "KRA010",
"postingCode" => "KOS01L",
"codValue" => 0,
"insuranceValue" => 0,
"additionalInformation" => "string",
"parcel" => [
"dimensions" => [
"height" => 20,
"length" => 20,
"width" => 20,
"weight" => 2
]
]
];
var_dump($apiClient->create($orderData));
php vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/unit
php vendor/bin/phpcs --standard=PSR2 src/ tests/
php vendor/bin/phpmd src/ text codesize
php vendor/bin/phpcpd src/
php vendor/bin/phpdoccheck --directory=src/
php vendor/bin/phploc src/
php vendor/bin/phpunit --bootstrap tests/bootstrap.php tests/pact/
Via gem
gem install pact-mock_service
pact-mock-service --port 1234
or use docker
docker run -p 1234:1234 -v /tmp/log:/var/log/pacto -v /tmp/contracts:/opt/contracts madkom/pact-mock-service
docker build -t bliskapaczka_docker_php5 .
docker run -v $(pwd):/app --rm bliskapaczka_docker_php5 --bootstrap tests/bootstrap.php tests/unit