将应用程序计费库更新为 实现'com.android.billingclient:billing:2.0.1' 即使三天后,我也开始看到退款。那怎么可能? Google仅提及here,如果用户在购买后不久就卸载了该应用程序,则该购买款项将被退还。我想3天不是短时间。
答案 0 :(得分:1)
用户必须在3天内确认购买,否则订阅将被退款:
https://developer.android.com/google/play/billing/billing_library_overview#acknowledge
答案 1 :(得分:1)
在 PurchasesUpdatedListener 中执行以下操作
private val purchaseUpdateListener = PurchasesUpdatedListener { billingResult, purchases ->
for (purchase in purchases) {
if (purchase.purchaseState == Purchase.PurchaseState.PURCHASED) {
if (!purchase.isAcknowledged) {
val acknowledgePurchaseParams =
AcknowledgePurchaseParams.newBuilder()
.setPurchaseToken(purchase.purchaseToken).build()
billingClient?.acknowledgePurchase(acknowledgePurchaseParams) {
billingResult ->
val billingResponseCode = billingResult.responseCode
val billingDebugMessage = billingResult.debugMessage
Log.v("TAG_INAPP", "response code: $billingResponseCode")
Log.v("TAG_INAPP", "debugMessage : $billingDebugMessage")
}
}
}