PHP code example of lukashron / zbozicz-request-conversion
1. Go to this page and download the library: Download lukashron/zbozicz-request-conversion 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/ */
lukashron / zbozicz-request-conversion example snippets
try {
$order = new Order();
$order->setOrderId('exampleTestOrderId');
$order->setEmail('[email protected]');
$order->setDeliveryPrice(100);
$order->setDeliveryType('own-hands');
$order->setPaymentType('cash');
$order->setOtherCosts(-20);
$order->addItem(
(new Item())
->setItemId('123')
->setProductName('Example product')
->setQuantity(1)
->setUnitPrice(200)
);
} catch (InvalidValueException $exception) {
...
}
$requestFactory = new RequestFactory(123, 'secretKeys', false);
$request = $requestFactory->make($order);