我一直在努力实施应用内计费,基于此处的 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