Google Play 中的测试订单会在五分钟后自动退款

Pab*_*nso 4 testing android in-app-purchase in-app-billing google-play-console

我今天从以下位置升级了 billingclient 库:

//implementation 'com.android.billingclient:billing:1.2.1'
//to 
implementation 'com.android.billingclient:billing:2.0.3'
Run Code Online (Sandbox Code Playgroud)

我还完成了所需的代码更改,例如使用 setSkuDetails 代替 setSku,定义了 SkuDetailsResponseListener 等。

一切似乎都运行良好。但是,在测试期间,我注意到我的测试订单会在五分钟后自动退款。显然,这不会发生在我的代码中,因为即使关闭我的设备,退款也会发生。

以下是在 Google Play 控制台的“订单管理”页面中针对其中一项测试观察到的序列:

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.
Run Code Online (Sandbox Code Playgroud)

此外,我没有使用保留的产品 ID 来测试静态 Google Play 结算响应(“android.test.purchased”)。我正在使用在 Google Play 控制台中注册的许可证测试人员的测试设备中使用我的真实产品 ID。

它给了我足够的时间来测试一切,但这笔退款是故意的吗?

Car*_*ren 5

如果您使用 Google Play Billing Library 2.0 或更新版本,您必须在三天内确认所有购买。未能正确确认购买会导致这些购买被退款。您可以在官方文档中阅读有关如何在您的应用中实现确认购买的更多信息:https : //developer.android.com/google/play/billing/billing_library_overview#acknowledge

通常在 3 天内未确认的购买会退款,但由于这些是测试订单,因此该时间缩短为 5 分钟。