1. Go to this page and download the library: Download inkpro/smartweb-api 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/ */
inkpro / smartweb-api example snippets
$client = new \inkpro\smartwebapi\Client(["Username"=>"myuser", "Password"=>"mypassword"]);
$client = new \inkpro\smartwebapi\Client(
["Username"=>"myuser", "Password"=>"mypassword"],
"https://customwsdl.url"
);
* @param DateTime $start The first date to get orders from.
* @param DateTime $end The last date to get orders from.
* @param array $status The status codes of the orders you want to get.
$orders = $client->getOrders($start, $end, $status);
$orders = $client->getUsersOrders($userId);
* @param $order Order to update.
$status = $client->updateOrderComment($order, $comment);
* @param $order Order to update.
$status = $client->updateOrderStatus($order, $status);
* @param $order Order
* @param int $maturity_interval The amount of days from today's date to set the maturity date for the Invoice (0, 8, 14 or 30 days).
$status = $client->createInvoice($order, $maturity_interval);