Android应用内购买正在取消

时间:2011-06-05 22:04:01

标签: android in-app-purchase in-app-billing

我一直致力于实施应用内结算,基于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

1 个答案:

答案 0 :(得分:0)

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

它当然在评论中这样说,但显然我已经吹过了它。捂脸。