Closed visualight closed 2 months ago
Hi @visualight ,
When I try your code, all work.
Did the same code works some in the past or the issue appears since an update of the lib?
As sender (in your bpost SHM settings), are you allowed to send to international, or your shop is well based on Belgium? Maybe you can contact esolutions@bpost.be, with your error message and your account ID, they can check with you your "business" settings and confirm all is good.
Little tips, you can remove the third argument of the constructor of Bpost because the new URL of the API is now https://shm-rest.bpost.cloud/services/shm (the default value):
- $bpost = new Bpost($transporter->api_key, $transporter->api_secret, $apiUrl);
+ $bpost = new Bpost($transporter->api_key, $transporter->api_secret);
I use "antidot-be/bpost-api-library": "^3.4" 3.4.11
Can you try the update to with composer update
? (not needed to update the composer.json).
The last version is 3.5.1 .
Composer says : Nothing to install, update or remove
"require": { "php": "^8.2", "antidot-be/bpost-api-library": "^3.4", "barryvdh/laravel-dompdf": "^2.0", "biscolab/laravel-recaptcha": "^6.0", "cba85/php-mondialrelay-webservice": "^1.0", "danielebarbaro/laravel-vat-eu-validator": "^1.1", "darryldecode/cart": "^4.2", "guzzlehttp/guzzle": "^7.2", "iio/libmergepdf": "^4.0", "intervention/image-laravel": "^1.1", "laravel/framework": "^10.10", "laravel/tinker": "^2.8", "league/flysystem-aws-s3-v3": "^3.24", "mailjet/laravel-mailjet": "^3.0", "mollie/laravel-mollie": "^3.0", "realrashid/sweet-alert": "^7.1", "spatie/laravel-honeypot": "^4.4", "spatie/laravel-html": "^3.5", "spatie/laravel-permission": "^6.3", "watson/sitemap": "^5.1", "yajra/laravel-datatables": "^10" },
You have to add all countries you're sending to in your SHM settings. I hope that will help you:
Merci Koinkoin 🎉
Last question: I'd like to send an international parcel to client home address.
What is the purpose of $customsInfo->setPrivateAddress();? I've currently set it to false. Correct? Thanks
true or false, that seems correct (depending you send to a private or "business" address).
https://bpost.freshdesk.com/helpdesk/attachments/4145363325:
I try to send a parcel from BE to FR (at client home).
I get always an error like : "The delivery method bpack BUSINESS with product group bpack World Express Pro is not valid for the country FR (receiver)"
Anyone could help me ?