【问题标题】:Using Google Pay api on Chrome Web Store Extension在 Chrome Web Store 扩展上使用 Google Pay api
【发布时间】:2020-03-05 09:57:01
【问题描述】:

我知道 Chrome 网上应用店有自己的内置支付系统,以及有关使用该支付系统的所有指南。

但 Google Pay API 也支持网络“The Google Pay API enables fast, simple checkout on your website.”。 Extension 实际上是一个 JavaScript 网页。那么我可以在扩展程序上使用 Google Pay API 吗?是否会违反网上应用店政策?

【问题讨论】:

    标签: google-chrome-extension google-pay


    【解决方案1】:

    我不知道这样做了。

    要直接与 Google Pay 集成,您需要sign up for a Merchant account with Google,其中一项要求是让 Google 能够审核您的网站/应用。假设您经历了这个过程,从技术上讲,它不应该工作没有任何理由(我认为)。

    我认为问题在于细节,例如实际用例、扩展的实现方式等等。

    【讨论】:

      【解决方案2】:

      目前这不起作用。 Google Pay 的pay.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://,而 Google Pay 只允许 https://

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-31
        • 2021-03-27
        • 2019-04-26
        • 1970-01-01
        • 2014-02-08
        • 1970-01-01
        • 2011-12-17
        • 2020-09-20
        相关资源
        最近更新 更多