Android 应用内购买将重新取消

发布于 2024-11-14 12:19:18 字数 1443 浏览 2 评论 0 原文

我一直致力于实现应用内计费,以 blundell 的教程为基础:http://www.anddev.org/advanced-tutorials-f21/simple-inapp-billing- payment-t52060.html

当我去购买时,一切似乎都已检查完毕很好,但是几分钟后我收到一条通知,表明购买失败并被取消。我收到的消息如下:

我们无法及时完成您的订单。请在 Google Checkout 中验证您的付款信息,然后重试。

所以我使用 LogCat 看了一下,看起来当我收到 IN_APP_NOTIFY 操作时,它只是被取消了。我完全被难住了,我已经让其他人在他们的设备上尝试过同样的问题。

下面没有列出,但在我返回的 JSON 字符串中,purchaseState 设置为 1(已取消)。

日志转储!

    06-05 17:39:03.175: INFO/BillingService(7694): Received action: com.android.vending.billing.IN_APP_NOTIFY
    06-05 17:39:03.175: INFO/BillingService(7694): getPurchaseInformation()
    06-05 17:39:03.183: INFO/BillingService(7694): current request is:1874091953267766809
    06-05 17:39:03.183: INFO/BillingService(7694): GET_PURCHASE_INFORMATION Sync Response code: RESULT_OK
    06-05 17:39:03.714: INFO/BillingService(7694): Received action: com.android.vending.billing.PURCHASE_STATE_CHANGED
    06-05 17:39:03.714: INFO/BillingService(7694): got signedData
    06-05 17:39:03.757: INFO/BillingService(7694): confirmTransaction()
    06-05 17:39:03.765: INFO/BillingService(7694): CONFIRM_NOTIFICATIONS Sync Response code: RESULT_OK
    06-05 17:39:03.768: INFO/ConcertView(7694): Transaction complete
    06-05 17:39:03.768: INFO/ConcertView(7694): Transaction status: CANCELED

I've been working on implementing in-app billing, basing it off of blundell's tutorial here: http://www.anddev.org/advanced-tutorials-f21/simple-inapp-billing-payment-t52060.html

When I go to make a purchase, everything seems to check out fine, however after a few minutes I get a notification that the purchase failed and is cancelled. The message I get back looks like this:

We could not complete your order in a timely fashion. Please verify your payment information in Google Checkout and try again later.

So I took a look using LogCat, and it looks like when I get the IN_APP_NOTIFY action, it's simply coming back cancelled. I am totally stumped, and I've had other people try on their devices with the same issue.

It's not listed below, but in the JSON string I get back, purchaseState is set to 1 (cancelled).

Log dump!

    06-05 17:39:03.175: INFO/BillingService(7694): Received action: com.android.vending.billing.IN_APP_NOTIFY
    06-05 17:39:03.175: INFO/BillingService(7694): getPurchaseInformation()
    06-05 17:39:03.183: INFO/BillingService(7694): current request is:1874091953267766809
    06-05 17:39:03.183: INFO/BillingService(7694): GET_PURCHASE_INFORMATION Sync Response code: RESULT_OK
    06-05 17:39:03.714: INFO/BillingService(7694): Received action: com.android.vending.billing.PURCHASE_STATE_CHANGED
    06-05 17:39:03.714: INFO/BillingService(7694): got signedData
    06-05 17:39:03.757: INFO/BillingService(7694): confirmTransaction()
    06-05 17:39:03.765: INFO/BillingService(7694): CONFIRM_NOTIFICATIONS Sync Response code: RESULT_OK
    06-05 17:39:03.768: INFO/ConcertView(7694): Transaction complete
    06-05 17:39:03.768: INFO/ConcertView(7694): Transaction status: CANCELED

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

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

发布评论

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

评论(1

半葬歌 2024-11-21 12:19:19

解决了我自己的问题 - 看起来提到的教程使用 android 1.6 版本从购买请求发送 PendingIntent。我不得不将其切换到2.0版本。

当然,它在评论中说了这一点,但显然我直接忽略了它。捂脸。

Figured out my own issue - it looks like the tutorial mentioned uses the android 1.6 version of sending the PendingIntent from a purchase request. I had to switch it to the 2.0 version.

It of course says this in the comments, but apparently I blew right past it. Facepalm.

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