android - Google Play订阅的付款方式?

标签 android google-play google-pay

我正在为我的应用程序使用Google Play订阅服务。但是,当任何使用或客户尝试以任何给定的付款方式为我的订阅付款时,它显示-

 Unavailable for this purchase.


只有我可以使用Google Play帐户付款。enter image description here

我在不同的手机上尝试了所有方法。但是问题是一样的。

我正在使用Google开发人员网站上提供的标准代码。

private BillingClient billingClient=BillingClient.newBuilder(activity)
.setListener(this).build();

billingClient.startConnection(new BillingClientStateListener() {
    @Override
    public void onBillingSetupFinished(BillingResult billingResult) {
        if (billingResult.getResponseCode() == BillingResponse.OK) {
        }
    }
    @Override
    public void onBillingServiceDisconnected() {

    }
});



我想为我的应用启用所有付款方式。

最佳答案

尝试添加enablePendingPurchases(),因此

private BillingClient billing_client = BillingClient.newBuilder( this ).enablePendingPurchases().setListener(...

关于android - Google Play订阅的付款方式?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58739001/

相关文章:

java - 约束布局 : How to add several views programmatically?

java - Android Canvas 上的弹出窗口

android - Google Play 推荐流程仍然是空的

android - 什么会导致已发布的 Android 应用程序自发地停止为大量用户工作?

php - Google Pay API for Passes

android - 无法在 VideoView 中播放视频 - 为什么?

android - 按钮-声音-onHoverListener-老虎

android - 我可以强制用户在 Android 和 iOS 中升级我的应用程序吗?

google-chrome - 在没有第三方处理器的情况下使用 PaymentRequest 接收付款

android - 通过 Google Play 服务 API 将成员(member)卡添加到 Google Pay