简体   繁体   中英

Test Orders in Google Play are automatically refunded after five minutes

I have upgraded the billingclient library today from:

//implementation 'com.android.billingclient:billing:1.2.1'
//to 
implementation 'com.android.billingclient:billing:2.0.3'

I have also completed the required code changes, such as using setSkuDetails instead of setSku, defining a SkuDetailsResponseListener, etc.

Everything seems to be working fine. However, during testings I have noted that my test orders are automatically refunded exactly after five minutes. Clearly this is not happening from my code, because the refunds happen even after turning off my device.

The following is the observed sequence in "Order Management" page of the Google Play Console for one of the testings:

Nov 25 2019 21:10:21, Payment pending, You received a new order.
Nov 25 2019 21:10:21, Chargeable, The customer's form of payment was authorized for $0.00.
Nov 25 2019 21:15:22, Refunding, A refund of $0.99 was initiated on this order.
Nov 25 2019 21:20:22, Charged, The customer's form of payment was successfully charged for $0.00.
Nov 25 2019 21:20:22, Refunded, Google processed your request and applied a refund of $0.99.

Also, I'm not using the reserved product ID for testing static Google Play Billing responses ("android.test.purchased"). I'm using my real Product Id in a testing device using license testers registered in the Google Play Console.

It is giving me enough time to test everything, but is this refund intentional ?

If you use the Google Play Billing Library version 2.0 or newer, you must acknowledge all purchases within three days. Failure to properly acknowledge purchases results in those purchases being refunded. You can read more about how to implement acknowledging purchases in your app in the official documentation: https://developer.android.com/google/play/billing/billing_library_overview#acknowledge

Typically purchases that are not acknowledged within 3 days are refunded, but since these are test orders, that period is shortened to 5 minutes.

You have to Acknowledge a purchase . So you must add some code.

the correct answer is here https://stackoverflow.com/a/66316354/7767664

shortly: it will do it 6 times, so it's normal behavior for a test card

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM