google-chrome-extension - 在 Chrome Web Store 扩展上使用 Google Pay api
问题描述
我知道 Chrome 网上应用店有自己的内置支付系统,以及有关使用该支付系统的所有指南。
但是 Google Pay API 也支持网络“ Google Pay API 可以在您的网站上实现快速、简单的结帐。 ”。Extension 实际上是一个 JavaScript 网页。那么我可以在扩展程序上使用 Google Pay API 吗?它会违反网上商店政策吗?
解决方案
这目前不起作用。Google Paypay.js
在控制台中显示以下错误:
Only localhost, file://, and cryptographic scheme origins allowed.
No UI will be shown. CanMakePayment and hasEnrolledInstrument will always return false. Show will be rejected with NotSupportedError.
看起来问题是,扩展协议是chrome-extension://
且仅https://
由 Google Pay 允许。
推荐阅读
- python - sum() 在 lambda 练习中需要详细说明
- java - 如何在android studio(java)中删除图像的元数据(exif)或上传没有元数据的图像
- java - 检测 CompletableFuture 链中的异常源
- go - 如何从 Apache Beam 将流写入 bigquery?
- gremlin - 遍历 100M 顶点和 350M 边的 janusGraph
- javascript - 在 Metro console.log 中突出显示对象属性
- html - 即使添加 -webkit 前缀,CSS 动画也无法在 chrome 上运行
- python - 替换字典中的值
- r - 在 Python 中加载 RS4 对象
- c - astyle:在成员中使用运算符时 C 结构初始化程序的错误缩进