Open jochensengier opened 5 years ago
Hello, I start today to work on this problem. I can set the data required for the sender, international box product|options|receiver|parcel weight and customsInfo.
The problem come from the pugo data insertion, when I do a fetchOrder, there is no information dumped about the pugo. May be it can be come from there, or the Order->createFromXML
I will check further tomorrow and try to get pugo's information from bpost.
If I found something, I will place details here
Awesome, thanks a lot!
Working on it since this morning and found some errors/missing files 1) The pugo international take a box with the class "AtIntlPugo" but no such class exist. But I think it will not be too complicated to create it from a Box/AtBpost duplication + modification.
2) The problem about the pugo data insertion still remains, I dump the function $this->getApiCaller()->getResponseBody() from the src/Bpost file and the xml I receive is like :
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<orderInfo xmlns="http://schema.post.be/shm/deepintegration/v3/" xmlns:ns2="http://schema.post.be/shm/deepintegration/v3/common" xmlns:ns3="http://schema.post.be/shm/deepintegration/v3/national" xmlns:ns4="http://schema.post.be/shm/deepintegration/v3/international">
<accountId>000000</accountId>
<reference>shipment_ref</reference>
<costCenter>Cost center</costCenter>
<box>
<sender>
<ns2:name/>
<ns2:company>sender</ns2:company>
<ns2:address>
<ns2:streetName>sender_street</ns2:streetName>
<ns2:number>sender_street</ns2:number>
<ns2:postalCode>sender_postalCode</ns2:postalCode>
<ns2:locality>sender_locality</ns2:locality>
<ns2:countryCode>BE</ns2:countryCode>
</ns2:address>
<ns2:emailAddress>sender_email</ns2:emailAddress>
<ns2:phoneNumber>sender_phoneNumber</ns2:phoneNumber>
</sender>
<internationalBox>
<ns4:international>
<ns4:product>bpack@bpost international</ns4:product>
<ns4:options>
<ns2:keepMeInformed language="FR">
<ns2:emailAddress>client_email</ns2:emailAddress>
</ns2:keepMeInformed>
</ns4:options>
<ns4:receiver>
<ns2:name>client_name</ns2:name>
<ns2:address>
<ns2:streetName>pugo_address</ns2:streetName>
<ns2:number>pugo_number</ns2:number>
<ns2:postalCode>pugo_postalCode</ns2:postalCode>
<ns2:locality>pugo_locality</ns2:locality>
<ns2:countryCode>FR</ns2:countryCode>
</ns2:address>
<ns2:emailAddress>client_email</ns2:emailAddress>
<ns2:phoneNumber>client_phoneNumber</ns2:phoneNumber>
</ns4:receiver>
<ns4:parcelWeight>800</ns4:parcelWeight>
</ns4:international>
</internationalBox>
<status>OPEN</status>
</box>
</orderInfo>
There is no pugo details present (for exemple the id and name)... So something is wrong with the doCall and don't get all data (but it's weird, it's work perfectly for the belgium pugo) or Bpost don't allow to get the pugo information from the shipping manager
Technical support of Bpost Shipping Manager can be reached at SMB_TXP_SHIPPINGMANAGER@bpost.be
I also had to ask them to activate the PUGO service for my customer's account.
Maybe this can help:
http://taxipost.geo6.be/Locator?Service=search
Got this partnerID 999010
once for testing from support
The initial creation from the Bpost interface is ok, the label is correctly set and all the data are correct (for us)
The problem appear when we call a fetchOrder with the API to retrieve this datas. I will send them an email ;)
I've contact them, the only way is to work with the pudo locator and parse the XML returned by the API Not very cool but ... have to work with that
Thanks for the update, here's some (simplified/reduced) code from one of my projects for reference...
use GuzzleHttp\Client;
$client = new Client([
'base_uri' => 'http://taxipost.geo6.be/',
'verify' => false,
]);
$query = http_build_query([
'Function' => 'search',
'Partner' => '',
'Language' => '',
'Street' => '',
'Number' => '',
'Zone' => '',
'Country' => '',
'Type' => '',
'Limit' => '',
'DD' => '',
'CheckDate' => '0',
'CheckList' => '0',
'CheckOpen' => '0',
'Info' => '0',
]);
$response = $client->request('GET', 'Locator?' . $query);
if ($response->getStatusCode() === 200) {
$points = json_decode(json_encode(simplexml_load_string($response->getBody(), 'SimpleXMLElement', LIBXML_NOCDATA)), true);
}
@zangra-dev did you manage to get this working? Thx!
@jochensengier sorry for the long delay before the answer
Yes, we have a working solution with the locator http://pudo.bpost.be/Locator (you have to request the access to the shipping manager) you can see in our project in the international_pugo branch https://github.com/zangra-dev/bpost-api-library/tree/international_pugo But there is a huge problem in france... The pugo availability change every day : shop stop work with bpost or bpost stop referencing them, don't know and don't have an answer about it when I asked them. So the solution is totally disastrous and we stopped to work with international pugo at the start on the year
First of all a big thanks to the creators and maintainers of this package 👏
So far I’ve used this package to create thousands of shipping labels for national and international deliveries, including pugo addresses in Belgium. But now I’m stuck on how to create a shipping label for an international pick-up point such as the Netherlands or France.
I noticed AtBpost extends National and there is no international alternative, setting or switch. Can anyone point me into the right direction or is this feature not (yet) implemented?
According to Shipping Manager support, this is the required API call:
Thanks!