javascript - 谷歌钱包错误 : The frame requesting access has a protocol of "https", 正在访问的框架具有 "http"的协议(protocol)

标签 javascript in-app-purchase android-pay

我正在尝试启动并运行 Google 钱包,并且正在关注 "get started" tutorial .当我调用 javascript 库时

<script src="https://sandbox.google.com/checkout/inapp/lib/buy.js"></script>

我的控制台出现以下错误:

Blocked a frame with origin "https://sandbox.google.com" from accessing a frame with origin "http://localhost:12098".  The frame requesting access has a protocol of "https", the frame being accessed has a protocol of "http". Protocols must match.
 inject.js:211
(anonymous function) inject.js:211

我尝试过使用

<script src="https://sandbox.google.com/checkout/inapp/lib/buy.js"></script>

但是我得到了同样的错误。我什至将我的应用程序放在 https 地址上,但仍然出现错误。是否有我缺少的技巧来加载它?

最佳答案

我很确定您可以使用 http 而不是 https 来解决这个问题。

还要确保清空缓存。在 chrome 中按 ctrl++++

关于javascript - 谷歌钱包错误 : The frame requesting access has a protocol of "https", 正在访问的框架具有 "http"的协议(protocol),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17157243/

相关文章:

javascript - 选择后禁用下拉列表后如何从下拉列表中获取所选值

javascript - 为什么我的 View 在 Backbone 中的数组长度不正确?

java - 特定 Gmail ID 的 Android 应用内沙盒设置错误

ssl - 用于数字商品的 Google Wallet API 是否需要 SSL 证书?

javascript - 日期获取自定义周开始日的周数

javascript - this.setState React Native

iphone - 如果更新了包含应用内购买产品的应用,会发生什么情况?

iphone - StoreKit 对等待审核的产品的响应

android - 我可以为两个不同的 Google Play 商店开发者帐户使用同一个商家帐户吗?

android - 使用 Google 示例代码在测试环境中尝试 Android Pay 时出现 ERROR_CODE_MERCHANT_ACCOUNT_ERROR (405)