Google Checkout:将网站订单 ID 映射到 Google 的订单 ID

发布于 2024-12-21 10:13:58 字数 618 浏览 7 评论 0原文

我正在致力于将 Google Checkout 与我们的内部电子商务平台集成。 我已进入接收 Google 发回的有关已成功完成订单的通知的阶段。

当有人将商品添加到购物篮时,我们会立即创建订单来处理订单。因此,在将信息发送给 Google 之前,我们的系统中已经拥有有关订单的所有信息。

我想要做的是将内部订单 ID 包含到 Google Checkout 请求中,以便可以将其返回。到目前为止这似乎不可能。它看起来更像是 Google 向您发送包含所有购物车信息的订单,然后期望您创建订单并使用他们提供的 google-order-number 来进行映射。如果是这种情况,则意味着我们网站上仍有处于“购物篮”状态的订单,我们需要找到该订单以使用 Google 的信息进行更新。

到目前为止我还没有想出任何好的方法来处理这个问题。
我知道有一个 add-merchant-order-number api 调用,但这需要 google-order-number,这仍然意味着我需要某种方法将 google-order-number 映射到我们的内部订单 ID。

是否有一个我缺少的标签,或者可能是一个用于添加有关购物车的附加信息的标签,这些信息可用于在最初的 checkout-shopping-cart api 帖子中存储我们的内部订单 id。

I'm working on integrating Google Checkout with our in-house e-commerce platform.
I've gotten to the stage of receiving notifications back from Google for successfully completed orders.

We handle orders by creating an order as soon as someone adds an item to the basket. So prior to sending the information to Google we already have all the information about the order in our system.

What I would like to do is include out internal order id, into the Google Checkout request so that it can be returned. So far this doesn't seem possible. It looks more like Google sends you the order with all the shopping cart information and then expects you to create the order and use their provided google-order-number to do the mapping. If this is the case it would mean there is an order still in the 'Basket' state on our site that we need to locate to update with the information from Google.

So far I haven't come up with any good method of handling this.
I know there is a add-merchant-order-number api call, but this requires the google-order-number, which still means I need some method of mapping the google-order-number to our internal order id.

Is there a tag that I'm missing or maybe one that is used for adding additional information about the shopping-cart that could be used to store our internal order id in the initial checkout-shopping-cart api post.

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

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

发布评论

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

评论(1

淤浪 2024-12-28 10:13:58

看来您已经正确使用通知 API 来获取订单处理各个阶段的更新。

接下来,要将您的内部订单 ID 添加到提交给 Google 的订单中,请使用商家私有数据字段传递有关您订单的所有自定义数据。

当您收到通知时,您还将获得内部订单 ID 以及商家私人数据字段中的任何其他自定义信息。

请参阅答案获取解决方案到类似的问题。

It looks like you are already properly using the Notification API to get updates on various stages of order processing.

Next, to add your internal order id to the order submitted to Google, use the merchant-private-data field to pass any custom data about your order.

When you get back the notification, you'll also get the internal order id plus any other custom info from the merchant-private-data field.

See this answer for a solution to a similar issue.

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