Android In-App Billing: Purchase state stays “purchased” after order cancelation

前端 未结 9 2369
余生分开走
余生分开走 2020-12-23 19:36

I\'m currently testing my InApp billing mechanism (using the InApp Billing version 3 API, therefore taking the TrivialDrive example as reference).

I have one managed

9条回答
  •  有刺的猬
    2020-12-23 19:56

    if I see correctly the reference code in the trivialdrivesample is wrong, which would be a shame for the official reference project for in app billing.

    if purchase == null it just means it has never been purchased. To get the real information you have to call

    purchase.getPurchaseState()
    

    according to here

    purchaseState The purchase state of the order. Possible values are 0 (purchased), 1 (canceled), 2 (refunded), or 3 (expired, for subscription purchases only).

提交回复
热议问题