setObfuscatedProfileId/setObfuscatedAccountId 后接收错误
Receiving error after setObfuscatedProfileId/setObfuscatedAccountId
对于我的 android 应用,我正在设置 subscription/in-app 购买。在启动计费流程之前,我使用 setObfuscatedProfileId/setObfuscatedAccountId 为购买指定一个特定的 ID。但是,当我这样做时,在用户尝试付款之前我收到以下错误 message/popup:
Error
Something went wrong on our end. Please try again.
当我删除 setObfuscatedProfileId/setObfuscatedAccountId 参数时,我没有收到错误。我还尝试从 google 播放服务和播放商店中清除 data/cache。
这是代码:
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
两次可能也不行。
如 documentation 所述:
If you pass this value, Google Play can use it to detect irregular activity, such as many devices making purchases on the same account in a short period of time. Do not use this field to store any Personally Identifiable Information (PII) such as emails in cleartext. Attempting to store PII in this field will result in purchases being blocked. Google Play recommends that you use either encryption or a one-way hash to generate an obfuscated identifier to send to Google Play.
我认为您还必须添加 setObfuscatedAccountId()
。为我工作。
对于我的 android 应用,我正在设置 subscription/in-app 购买。在启动计费流程之前,我使用 setObfuscatedProfileId/setObfuscatedAccountId 为购买指定一个特定的 ID。但是,当我这样做时,在用户尝试付款之前我收到以下错误 message/popup:
Error
Something went wrong on our end. Please try again.
当我删除 setObfuscatedProfileId/setObfuscatedAccountId 参数时,我没有收到错误。我还尝试从 google 播放服务和播放商店中清除 data/cache。
这是代码:
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
两次可能也不行。
如 documentation 所述:
If you pass this value, Google Play can use it to detect irregular activity, such as many devices making purchases on the same account in a short period of time. Do not use this field to store any Personally Identifiable Information (PII) such as emails in cleartext. Attempting to store PII in this field will result in purchases being blocked. Google Play recommends that you use either encryption or a one-way hash to generate an obfuscated identifier to send to Google Play.
我认为您还必须添加 setObfuscatedAccountId()
。为我工作。