简体   繁体   中英

Adding FedEx to shopping cart with PHP

Will apologize if this has already been asked. Please post a link if it has been. I need to add shipping to a shopping cart I created. What I want to have is when someone views their shopping cart, there will be a drop down menu with different shipment options (ground, over night, etc) and the cost for each one. Then, after the customer finishes paying, a shipping label will be produced for the package(s).

I've looked at the FedEx developers site, and searched for help on this, but haven't had any luck.

Thanks in advance for the help

Mike

FedEx offers different web services that you can use. For displaying rates during the checkout process, you can use their Rate endpoint, see https://www.fedex.com/us/developer/web-services/process.html?tab=tab1 . For purchasing labels, you need to use the Ship Service, see https://www.fedex.com/us/developer/web-services/process.html?tab=tab1#app-tab2 .

If you're looking for a simpler solution, you can use Shippo ( https://goshippo.com ). It's a REST API for FedEx that offers a dedicated Rate and Label creation endpoint and has a convenient PHP api library. I'm happy to help if you have further questions.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM