INVALID_RESPONSE_ERROR from google.payments.inapp.getSkuDetails [英] INVALID_RESPONSE_ERROR from google.payments.inapp.getSkuDetails

查看:345
本文介绍了INVALID_RESPONSE_ERROR from google.payments.inapp.getSkuDetails的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




  • 我已连接到Google应用程式购买功能,但我一直收到错误消息。

    我的Google电子钱包商家帐户添加到我的Chrome网上应用店开发人员信息中心。

  • 在我的信息中心的扩展程序编辑页面中,我已将这些项目添加到应用内商品并确保它们处于活动状态)。

  • 我已将buy.js JS文件包含在您的应用程序/ ext包中。


但是,当我尝试通过调用getSkuDetails方法获取扩展中的项目列表时,我总是得到INVALID_RESPONSE_ERROR



以下是我正在运行的代码:

  google.payments.inapp.getSkuDetails(
{
'参数' :{'env':'prod'},
'success':function(response)
{
console.log('Success',response);
},
'failure':函数(响应)
{
console.log('Failure',r esponse);
}
});

正如您所看到的,我已经根据



此外,当我尝试谷歌提供的示例扩展,我得到同样的错误。
https:// github .com / GoogleChrome / chrome-app-samples / tree / master / samples / managed-in-app-payments


任何人都可以解释为什么我无法获得我的代码或谷歌示例代码工作?



有趣的是,getPurchases方法完美工作,并返回一组用户许可证,所以Google服务器至少工作。

解决方案

我们的团队遇到了类似的问题。 Google扩展程序中的inapp购买失败消息根本不明确。



对我来说,看起来您不在商店支持的国家/地区,因为您可以请参阅许可证,但无法检索购买许可证列表。您是否曾尝试将您的测试环境代理到其中一个受支持的区域,然后尝试脚本?
$ b Chrome网上应用店支持的区域
https://developer.chrome.com/webstore/pricing


I am trying to get my Google browser extension in-app purchase working, but I keep getting an error.

  • I have connected my Google Wallet Merchant account to my Chrome Web Store Developer Dashboard.
  • In the edit page of my extension in my Dashboard, I have added the items to the "In-app products" tab (and made sure they are active).
  • I have included the buy.js JS file in your app/ext package.

But when I try to get a list of the items within my extension by calling getSkuDetails method, I always get the INVALID_RESPONSE_ERROR

Here is the code I'm running:

google.payments.inapp.getSkuDetails(
{
    'parameters': {'env':'prod'},
    'success': function(response)
    {
        console.log('Success', response);
    },
    'failure': function(response)
    {
        console.log('Failure', response);
    }
});

As you can see, I have included the necessary parameters according to https://developer.chrome.com/webstore/payments-iap

Furthermore, when I try the sample extension provided by google, I get the same error. https://github.com/GoogleChrome/chrome-app-samples/tree/master/samples/managed-in-app-payments

Can anyone explain why I cannot get my code or the sample code from Google to work?

The interesting thing is that getPurchases method works perfectly and returns an array of the user licenses, so Google servers are at least working.

解决方案

Our team has run into a similar problem. Google extension inapp purchases failure messages are not clear at all.

What it looks like to me is that you are not in a country supported by the store because you are able to see licenses, but cannot retrieve a list of licenses for purchase. Have you tried proxying your test environment to one of the supported regions and trying the script then?

Regions supported by Chrome Web Store Payments https://developer.chrome.com/webstore/pricing

这篇关于INVALID_RESPONSE_ERROR from google.payments.inapp.getSkuDetails的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆