是否有多种格式的 In App Billing 交易? [英] Are there multiple formats of In App Billing transactions?

查看:33
本文介绍了是否有多种格式的 In App Billing 交易?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在验证某些付款交易(Google In App Billing V3)时遇到问题.看起来繁琐交易的数据与我们在验证没有问题的交易中看到的格式不同.

We're having problems verifying some of payment transactions (Google In App Billing V3). It looks like data of cumbersome transactions follows a different format than what we can see in transactions we have no problems verifying.

  • OrderId:用点分隔的两个数字:92299713162054702728.1224255970239541
  • 签名:始终在末尾包含 base64 填充,长度为 345 个字符
  • OrderId: Two numbers separated with a dot: 92299713162054702728.1224255970239541
  • Signature: Always includes base64 padding at the end, 345 characters long
  • OrderId:一个号码:5643493869375537013
  • 签名:缺少 base64 填充,长度为 343 个字符
  • OrderId: One number: 5643493869375537013
  • Signature: Is missing base64 padding, 343 characters long

(这些不是实际的 ID)

(those are not actual ids)

在缺少填充时手动添加填充无助于验证签名.

Adding padding manually when it's missing does not help to verify signatures.

为什么我们会收到不同格式的数据?为什么我们无法验证它们,即使我们在验证普通"交易时没有问题?为了解决这个问题,我们应该做什么/调查?

Why are we receiving data in different format? Why are we unable to verify them, even though we have no problems verifying "ordinary" transactions? What should we do / investigate in order to solve this issue?

推荐答案

查看此链接:

http://developer.android.com/google/play/billing/billing_admin.html#orderId

For transactions dated 5 December 2012 or later, Google Wallet assigns a Merchant Order Number (rather than a Google Order Number) and reports the Merchant Order Number as the value of orderID. Here's an example:

"orderId" : "12999556515565155651.5565135565155651"
For transactions dated previous to 5 December 2012, Google checkout assigned a Google Order Number and reported that number as the value of orderID. Here's an example of an orderID holding a Google Order Number:

"orderId" : "556515565155651"

所以我认为您可以通过将日期明智的交易存储在您的数据库中并检查日期是否给定日期是 12 月 5 日或更晚然后检查第一个其他第二个来解决它.

So I think you can solved it by storing date wise transaction in your database and check the date whether given date is 5 Dec or later then check 1st one else 2nd one.

您还可以检查开发人员有效负载以检查我们的交易是否安全完成.Google Play 商店将为您提供与购买应用内产品时相同的有效负载.

you can also check the developer payload to check whether our transaction is securely done or not. Google play store will give you the same payload that you gave while purchasing the in app product.

有关更多信息,请查看此链接以获取开发人员有效负载 链接

For more information check this link for the developer payload link

希望它能解决你的问题.

Hope it will solve your problem.

这篇关于是否有多种格式的 In App Billing 交易?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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