1. Go to this page and download the library: Download nalognl/megaplan-module 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/ */
public function getOffers(array $data): array
{
$uri = $this->getEnvOrThrow('NNND_OFFERS_LIST_URI');
$res = $this->request->post($uri, $data);
$this->throwIfError($res, 'API1: При попытке взять товары с мегаплана');
return $res->data->offers;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.