将 Fedex 集成到您的 Web 应用程序中

发布于 2024-08-12 16:41:49 字数 871 浏览 8 评论 0原文

我意识到他们有一个 API,但其中一些 我的问题不会是 由它回答,那就太好了 接收其他人的反馈 之前已经集成过。

我基本上正在与一个网站合作,访问者可以选择将二手物品出售给网站所有者。

如果用户决定出售,他可以输入该商品的规格并获得报价。然后他将继续输入他的地址,我认为我必须在创建运输标签之前或期间使用 Fedex API 进行验证。

因此,假设地址已验证,看起来我必须与之交互的 API 中的脚本是 /Ship/Ground/Domestic/ShipGroundDomestic.php5 (因为我们不会集成任何其他类型的发货类型然而 )。

  • 这是实际创建货件并收取帐户设置费用的脚本吗?假设一切顺利,它会返回带有状态的 xml 响应?
  • 由于它是基于 SOAP 的 - 我意识到有 pdf 和 png 运输标签类型的选项,看起来它生成了标签,但它实际存储在哪里,它只是临时的吗?
  • 在脚本中,它指定了 API 密钥、密码、帐户 # 和计量 # 的选项 - 所以我必须真正知道网站所有者的凭据,因为它会收取创建货件/标签的费用,我无法使用不支持的普通帐户没有 CC 设置,可以吗?
  • 如果不联系他们并告诉他们让我的帐户进入测试模式,我实际上无法测试任何东西?或者测试模式有额外的参数吗?
  • 我应该将所有发货存储在本地数据库中以提取它们,对吧?或者我应该仅依靠 Fedex 来存储所有信息?如果我使用本地数据库,我可以将货件映射到用户,并使用联邦快递提供的脚本来查找交付状态,所以我认为我必须这样做。
  • 如果我有一个功能可以自动通过电子邮件向客户发送交付状态更新,我将不得不使用某种类型的 cron 作业来查看是否有任何更新,我不能以其他方式执行此操作吗?

I realize they have an API but some of
the questions I have wouldn't be
answered by it, and it would be great
to receive feedback from others who
have integrated it before.

I basically am working with a web site where visitors may choose to sell a used item to the site owner.

If the user decides to sell, he can enter in the specifications of the item and be given a quote. Then he'll proceed to enter in his address, which I assume I'll have to verify using the Fedex API before or during the part where it creates a shipping label.

So assuming the address is verified, it looks like the script in the API I have to interact with is /Ship/Ground/Domestic/ShipGroundDomestic.php5 ( since we will not integrate any other type of shipment type yet ).

  • Is this is the script that actually creates the shipment and charges the account setup, assuming all goes well it returns a xml response with the status?
  • Since it's SOAP based - I realize there are options for a pdf and png shipping label type, it looks like it generates the label but where is it actually stored, is it just temporary?
  • In the script it specifies options for a API Key, password, account #, and Meter # - so I would have to actually know the site owners credentials, since it charges for creating shipments/labels I can't use a normal account that doesn't have a CC setup, can I?
  • I can't actually test anything without contacting them and telling them to make my account go into test mode? Or is there an extra parameter for test mode?
  • I should store all shipments in a local database to pull them up, right? Or should I solely rely on Fedex for storing all the information? If I use a local database I can map shipments to users and use a Fedex provided script to look up the delivery status so I would think I have to do that.
  • If I were to have a feature that automatically emailed customers with status updates of a delivery, I would have to use some type of cron job to look and see if there were any updates made, I can't do this any other way?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

九八野马 2024-08-19 16:41:49

如果您使用的是 Fedex Web 服务 API,您可以通过访问 https 获取测试密钥: //www.fedex.com/wpor/wpor/editConsult.do
(您可能需要已经登录)。

它生成的标签只是转储到当前目录中。这对于生产代码来说显然是不可接受的,因为它甚至不会生成唯一的文件名,但 php 文件是示例代码。修改他们提供的代码以对返回的标签执行任何您想要的操作。

您需要一个本地数据库。

为什么要向用户发送更新?他们有什么理由不能只使用跟踪号码并自行查找吗?我的意思是可以定期调用跟踪 API 并生成电子邮件,但用户真的想要这些电子邮件吗?

If you are using the the Fedex Web Services API you get a test key by going to https://www.fedex.com/wpor/wpor/editConsult.do
(You may need to be already signed in).

The label it generates it just dumps into the current directory. That is obviously not acceptable for production code, since it does not even generate a unique file name, but the php file is example code. Modify the code they give to do whatever you want with the returned label.

You would want a local database.

Why would you want to send users updates? Is there any reason they cannot just use the tracking number and look it up themselves? I mean it would be possible to call the tracking API periodically and generate emails, but do users really want these emails?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文