具有多种服务类型的Fedex PHP soap API? [英] Fedex PHP soap api with multiple service types?

查看:106
本文介绍了具有多种服务类型的Fedex PHP soap API?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用fedex soap API来检索运费,但是在ServiceType中,我只能发送一种类型,即PRIORITY_OVERNIGHT,如何在一个请求中发送多个服务,例如GROUND_HOME_DELIVERY,INTERNATIONAL_ECONOMY,PRIORITY_OVERNIGHT,STANDARD_OVERNIGHT?

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?

推荐答案

您可以从请求中省略$request['RequestedShipment']['ServiceType'],FedEx将返回所有可用的送货方式.然后,您需要遍历$response->RateReplyDetails数组以提取每种运输方法.

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.

请记住,包裹类型(即$request['RequestedShipment']['PackagingType'])将限制返回的运输方式.值YOUR_PACKAGING应该返回所有方法,而其他值(例如FEDEX_BOX)仅返回隔夜和2天的选择(至少对我而言).但是,这有时也会影响价格.

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.

这篇关于具有多种服务类型的Fedex PHP soap API?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆