在谷歌C​​heckout的通知中,应用程序开发人员的有效载荷 [英] In-app developer payload in Google Checkout notifications

查看:162
本文介绍了在谷歌C​​heckout的通知中,应用程序开发人员的有效载荷的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当你做应用内购买,有一个名为开发者有效载荷字段。这个想法是,你把它与订单相关联,谷歌将围绕通过它,给它回给你,每当。

When you do in-app purchases, there's a field called "Developer Payload". The idea is that you associate it with an order and Google will pass it around, giving it back to you whenever.

当您通过的Notification API检索来自谷歌Checkout的秩序,是开发有效载荷吗?我搜索了XML,我已经发现了两个有前途的元素:

When you retrieve the order from Google Checkout via the Notification API, is Developer Payload there? I've searched the XML and I've found two promising elements:


  • <商户和私营部门的项目 - 数据GT; <项目>

  • <商户专用数据> <购物推车>

  • <merchant-private-item-data> under <item>
  • <merchant-private-data> under <shopping-cart>

还有&LT;代理专用数据方式&gt; ,但该结构是相当明确的。

There's also <agent-private-data>, but the structure of that is fairly clear.

似乎都为Base64恩codeD二进制文件。解码提供没有明显的结构的二进制块 - 可能是的Base64下面编码的另一层。没有人有任何想法是什么做的那些意思,如果开发者有效载荷是有什么地方?

Both seem to be Base64-encoded binary. Decoding provides a binary chunk of no discernible structure - could be another layer of encoding below that Base64. Does anyone have any idea what do those mean, and if developer payload is in there somewhere?

推荐答案

您会回来的developerPayload信息与某个PURCHASE_STATE_CHANGED意图返回的JSON的领域之一:

You will get back the developerPayload information as one of the JSON fields that are returned with a PURCHASE_STATE_CHANGED intent:

http://developer.android.com/guide/market/billing/billing_reference.html#billing-interface

另请参阅<一个href=\"http://stackoverflow.com/questions/8947015/what-is-the-purpose-of-the-developer-payload-what-can-it-be-used-for\">this回答更多细节和讨论。

Also see this answer for more details and discussions.

您指的是通知API场都是经典结帐API的一部分,developerPayload不会在那里。透过Google Checkout API发布的XML购物车,当他们是有用的:

The Notification API fields you are referring to are part of the classic Checkout API and the developerPayload will not be there. They are useful when posting an XML shopping cart using the Checkout API:

http://$c$c.google.com/apis/checkout/developer/Google_Checkout_XML_API.html#checkout_api

这篇关于在谷歌C​​heckout的通知中,应用程序开发人员的有效载荷的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆