Java setObfuscatedProfileId/setObfuscatedAccountId后接收错误

Java setObfuscatedProfileId/setObfuscatedAccountId后接收错误,java,android,google-api,google-pay,in-app-subscription,Java,Android,Google Api,Google Pay,In App Subscription,对于我的android应用程序,我正在设置订阅/应用内购买。在启动计费流之前,我使用setObfuscatedProfileId/setObfuscatedAccountId为购买指定一个特定的id。但是,当我这样做时,我会在用户尝试付款之前收到以下错误消息/弹出窗口: Error Something went wrong on our end. Please try again. 删除setObfuscatedProfileId/setObfuscatedAccountId参数时,不会出现错

对于我的android应用程序,我正在设置订阅/应用内购买。在启动计费流之前,我使用setObfuscatedProfileId/setObfuscatedAccountId为购买指定一个特定的id。但是,当我这样做时,我会在用户尝试付款之前收到以下错误消息/弹出窗口:

Error
Something went wrong on our end. Please try again.
删除setObfuscatedProfileId/setObfuscatedAccountId参数时,不会出现错误。我还尝试从google play服务和play store中清除数据/缓存

代码如下:

BillingFlowParams billingFlowParams = BillingFlowParams.newBuilder()
                .setSkuDetails(sku)
                .setObfuscatedProfileId(profileId) // when this is removed, there is no error
                .build();
        BillingResult result = billingClient.launchBillingFlow(this.activity, billingFlowParams);

简而言之,为什么setObfuscatedProfileId/setObfuscatedAccountId会导致错误?

您的问题不清楚,因为不知道profileId的值是多少

尝试两次设置相同的(唯一的)
profileId
也可能行不通

作为缔约国:

如果你传递了这个值,Google Play可以用它来检测不规则的活动,比如许多设备在短时间内用同一个帐户进行购买。请勿使用此字段存储任何个人身份信息(PII),如明文形式的电子邮件。尝试在此字段中存储PII将导致购买被阻止。Google Play建议您使用加密或单向散列来生成一个模糊的标识符以发送到Google Play


我认为您还必须添加
setObfuscatedAccountId()
。为我工作