Использование dhl ecommerce перевозчика easypost. Использование их официального php sdk. Невозможно создать манифест, так как я не могу купить груз без ставки.
Тип: EasyPost \ Сообщение об ошибке: Нормы не найдены.
Имя файла: G: \ xampp56 \ htdocs \ shoppina \ application \библиотеки \ easypost-php-master \ lib \ EasyPost \ Shipment.php Номер строки: 287 Backtrace: Файл: G: \ xampp56 \ htdocs \ shoppina \ application \ controllers \ Home.php Строка: 5896 Функция: наименьшая_скорость
Файл: G: \ xampp56 \ htdocs \ shoppina \ index.php Строка: 309 Функция: require_once
<code>function easy_dummy()
{
$api_key = $this->crud_model->get_easypost_api_key("production");
$carrier_account_id = $this->crud_model->get_easypost_dhl_ecommerce_carrier_account_id();
/*$carrier_account = \EasyPost\CarrierAccount::retrieve($carrier_account_id);
echo "<pre>";
print_r($carrier_account);
echo "
"; * / \ EasyPost \ EasyPost :: setApiKey ($ api_key); / * $ my_carrier_accounts = \ EasyPost\ CarrierAccount :: all (); echo "
";
print_r($my_carrier_accounts);
echo "
"; die (); * / $ to_address = \ EasyPost \ Address :: create (array ("name" => "Доктор Стив Брюль", "street1" => "179 N Harbour Dr", "city" => "Redondo Beach", "state" => "CA", "zip" => "90277", "phone" => "310-808-5243")); $ from_address = \ EasyPost \ Address :: create (array ("company" => "EasyPost", "street1" => "118 2nd Street", "street2" => "4-й этаж", "city" => "Сан-Франциско "," штат "=>" CA "," zip "=>" 94105 "," phодин "=>" 415-456-7890 "));$ parcel = \ EasyPost \ Parcel :: create (array ("предопределенный_пакет" => "LargeFlatRateBox", "weight" => 1.0));$ shipment = \ EasyPost \ Shipment :: create (array ("to_address" => $ to_address, "from_address" => $ from_address, "parcel" => $ parcel));// $ shipment-> buy (array ('rate' => 100));// $ shipment-> insure (array ('amount' => 100));$ rate = $ shipment-> get_rates ();/ * echo "
";
print_r($rates);
echo "
";echo "
"; * / / * $ shipment-> buy (array ('rate' => $ shipment-> lower_rate (), 'insurance' => 249.99)); * / /* echo "
";
print_r($shipment);
echo "
";echo "
"; * / $ my_carrier_accounts = \ EasyPost \ CarrierAccount :: all ();echo "
";
print_r($my_carrier_accounts);
echo "
";echo "
";$ shipment-> buy (array ("rate" => $ shipment-> lower_rate ('dhlecommerce')));if ($ shipment) {$ batch = \ EasyPost \ Batch :: create (массив ('отгрузки' => массив ($ shipment-> values)));/ * echo "
";
print_r($batch);
echo "
";echo "
"; * / $ batch-> label (array ('file_format' => 'png'));$ Batch-> create_scan_form ();} // $ shipment-> postage_label-> label_url;}