Fedex PHP soap api with multiple service types?

雨燕双飞 提交于 2019-12-07 06:45:01

问题


i am using fedex soap api for retrieving shipping rates, but in ServiceType i am able to send only one type i.e. PRIORITY_OVERNIGHT, how can i send multiple Services in one request like GROUND_HOME_DELIVERY, INTERNATIONAL_ECONOMY, PRIORITY_OVERNIGHT,STANDARD_OVERNIGHT?


回答1:


You can omit the $request['RequestedShipment']['ServiceType'] from the request and FedEx will return all available shipping methods. You'll then need to loop through the $response->RateReplyDetails array to extract each shipping method.

Keep in mind that the package type i.e. $request['RequestedShipment']['PackagingType'] will limit the shipping methods returned. The value YOUR_PACKAGING should return all of the methods, while others such as FEDEX_BOX only returns overnight and 2 day options (at least for me). However this may sometimes affect the price too.



来源:https://stackoverflow.com/questions/11563168/fedex-php-soap-api-with-multiple-service-types

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!