We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I don't understand what's missing for an international delivery. The API returns: "Atleast one item data is required" and refuses to create the label.
Here's my code :
$delivery_costs = $transporter->delivery_costs; switch ($carrierData['weight']) { case 2000: $delivery_price = 'cost_1'; break; default: $delivery_price = 'cost_2'; break; } if (is_numeric($delivery_costs[$carrierData['country']][$delivery_price])) { $temp_price = (float)$delivery_costs[$carrierData['country']][$delivery_price]; if ($temp_price >= 0.00 && $temp_price <= 999.99) { $formatted_price = number_format($temp_price, 2); } else { // La valeur est en dehors des limites autorisées $formatted_price = "0.00"; } } else { // La valeur n'est pas numérique $formatted_price = "0.00"; } $customsInfo = new Box\CustomsInfo\CustomsInfo(); $customsInfo->setParcelValue($carrierData['total']); // INT $customsInfo->setCurrency(Bpost\Order\Box\CustomsInfo\CustomsInfo::CUSTOM_INFO_CURRENCY_EUR); $customsInfo->setAmtPostagePaidByAddresse($formatted_price); //FLOAT : String $customsInfo->setContentDescription('FASHION'); $customsInfo->setShipmentType(Bpost\Order\Box\CustomsInfo\CustomsInfo::CUSTOM_INFO_SHIPMENT_TYPE_GOODS); $customsInfo->setParcelReturnInstructions(Bpost\Order\Box\CustomsInfo\CustomsInfo::CUSTOM_INFO_PARCEL_RETURN_INSTRUCTION_RTS); $customsInfo->setPrivateAddress(true); $international = new Box\International(); $international->setProduct(Bpost\ProductConfiguration\Product::PRODUCT_NAME_BPACK_WORLD_BUSINESS); $international->setReceiver($receiver); $international->setParcelWeight($carrierData['weight']); $international->setCustomsInfo($customsInfo); $box->setInternationalBox($international);
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I don't understand what's missing for an international delivery. The API returns: "Atleast one item data is required" and refuses to create the label.
Here's my code :
The text was updated successfully, but these errors were encountered: