gpt4 book ai didi

google-checkout - Google Checkout - XML API 将回调序列号与原始订单相关联

转载 作者:行者123 更新时间:2023-12-04 04:08:25 28 4
gpt4 key购买 nike

通过 XML API,如何将 Google Checkout 回调序列号与原始订单相关联?

在同一行 - XML API doc 的“选项 B - 提交服务器到服务器结帐 API 请求”部分中的序列号是什么?对应(格式:serial-number="981283ea-c324-44bb-a10c-fc3b2eba5707")?它是否与回调 URL ( numeric-only ) 发送的序列有关?

最佳答案

我过去的做法是使用 <merchanrt-private-data>在原始购物车中添加标签,例如:

<checkout-shopping-cart xmlns='http://checkout.google.com/schema/2'>
<shopping-cart>
<merchant-private-data>
<merchant-note>[some secret about the cart on my system]</merchant-note>
</merchant-private-data>
<items>
...
</items>
</shopping-cart>
</checkout-shopping-cart>

然后,在 Google 用序列号回电后,我使用 Notification History API检索订单详细信息,其中包括我的私有(private)数据,例如:
<new-order-notification xmlns="http://checkout.google.com/schema/2" serial-number="[serial number from google]">
<buyer-billing-address>
...
</buyer-billing-address>
<timestamp>...</timestamp>
<google-order-number>...</google-order-number>
<order-summary>
<total-chargeback-amount currency="GBP">...</total-chargeback-amount>
<google-order-number>...</google-order-number>
<total-charge-amount currency="GBP">...</total-charge-amount>
<total-refund-amount currency="GBP">...</total-refund-amount>
<purchase-date>...</purchase-date>
<archived>false</archived>
<shopping-cart>
<merchant-private-data>
<merchant-note>[the secret about the cart from my system]</merchant-note>
</merchant-private-data>
<items>
</items>
</shopping-cart>
<order-adjustment>
...
</order-adjustment>
<promotions />
<buyer-id>...</buyer-id>
<buyer-marketing-preferences>
<email-allowed>false</email-allowed>
</buyer-marketing-preferences>
<buyer-shipping-address>
...
</buyer-shipping-address>
<order-total currency="GBP">...</order-total>
<fulfillment-order-state>NEW</fulfillment-order-state>
<financial-order-state>REVIEWING</financial-order-state>
</order-summary>
<shopping-cart>
<merchant-private-data>
<merchant-note>[the secret about the cart from my system]</merchant-note>
</merchant-private-data>
<items>
</items>
</shopping-cart>
<order-adjustment>
...
</order-adjustment>
<promotions />
<buyer-id>...</buyer-id>
<buyer-marketing-preferences>
<email-allowed>false</email-allowed>
</buyer-marketing-preferences>
<buyer-shipping-address>
...
</buyer-shipping-address>
<order-total currency="GBP">...</order-total>
<fulfillment-order-state>NEW</fulfillment-order-state>
<financial-order-state>REVIEWING</financial-order-state>
</new-order-notification>

然后,我可以使用该 key 将订单与我之前存储在数据库中的详细信息进行匹配。

关于google-checkout - Google Checkout - XML API 将回调序列号与原始订单相关联,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3333835/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com