First of all, you need to register an account, after register, open https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/develop.html to obtain test key.

And I strongly recommend you goto https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/getstarted.html and download some resources, include code archive and documentation.

After decompress the archive, you may find the wsdl file named RateService_v10.wsdl
for development env, you should edit this file, find a line contains https, it maybe

https://gateway.fedex.com:443/web-services/rate

change [gateway] to [wsbeta]!

https://wsbeta.fedex.com:443/web-services/rate

set your test account information in: library/fedex-common.php5, some [xxx] should be changed to meaningful values:
meter, key, password, xxxxxaccount (I set shipaccount/billaccount/dutyaccount/trackaccount/account/freightaccount all to one account number)
Notice:

meter/password/account are in the mail FedEx sent to you, but the key is in the page when you finished [obtain key] process and not in the mail.

and then you can successfully run [RateWebServiceClient/Rate/RateWebServiceClient.php]

FedEx provides several services, each service may has different limit, maybe weight, maybe size, read the documentation!
here’s a weight limit of 6 services:

$service_weight_map = array (
    "FEDEX_GROUND" => 150,
    "GROUND_HOME_DELIVERY" => 70,
    "FEDEX_2_DAY" => 150,
    "PRIORITY_OVERNIGHT" => 150,
    "STANDARD_OVERNIGHT" => 150,
    "FIRST_OVERNIGHT" => 150,
    "FEDEX_EXPRESS_SAVER" => 150
);

if you need to ship between different countries, you must use international service.

More information is in the <Fedex Web Services Developer Guide>

To migrate to production, goto this page https://www.fedex.com/wpor/web/jsp/drclinks.jsp?links=wss/production.html
I didn’t succeed in this action… :(

anyShare分享到:
          

没准儿您会对以下内容感兴趣:

  • No Related Posts