Google wallet error: The frame requesting access has a protocol of “https”, the frame being accessed has a protocol of “http”

依然范特西╮ 提交于 2020-01-15 11:22:50

问题


I'm trying to get up and running with google wallet and am following the "get started" tutorial. When I put in the call for the javascript library

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

I get the following error in my console:

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

I have attempted to use

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

but I get the same error. I have even put my app online at an https address and still get the error. Is there a trick I'm missing to get this to load?


回答1:


I'm pretty sure that you can solve this by using http instead of https.

Also make sure to empty your cache. In chrome press ctrl++ or ++



来源:https://stackoverflow.com/questions/17157243/google-wallet-error-the-frame-requesting-access-has-a-protocol-of-https-the

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!