【问题标题】:Stripe checkout working on localhost, but not with live heroku nodejsStripe checkout 在 localhost 上工作,但不适用于 live heroku nodejs
【发布时间】:2021-01-17 15:02:39
【问题描述】:

我正在使用 nodejs 从头开始​​构建电子商务网站。我已经实现了条带支付,并且在 localhost 上工作,但是当我将代码推送到 heroku 时,它不需要我去条带支付页面。

我是否可能需要在 heroku 上升级我的计划(目前在免费层),或者它可能与运行 http 而不是 https 有关?

http://floralfashionboutique.com/index

【问题讨论】:

    标签: html node.js heroku stripe-payments


    【解决方案1】:

    我还注意到结帐功能仅适用于floralfashionboutique.herokuapp.com。 Heroku 对于这种事情是不可靠的吗?

    【讨论】:

      【解决方案2】:

      快速查看您的网站并确认这是因为您没有使用 HTTPS。这是控制台日志中的错误:

      Uncaught IntegrationError: Live Stripe.js integrations must use HTTPS. 
      

      您可以查看https://stripe.com/docs/security/guide#tls 了解更多信息。如果您想利用 Heroku 的自动证书管理 (https://devcenter.heroku.com/articles/automated-certificate-management),您需要升级到付费测功机。如果您想继续使用 Heroku 的免费套餐,您可以手动上传自己的证书 (https://devcenter.heroku.com/articles/ssl#manually-uploading-certificates-and-intermediaries)。

      【讨论】:

        猜你喜欢
        • 2019-03-30
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2016-10-10
        • 2014-02-26
        • 1970-01-01
        • 2018-10-10
        • 2022-09-30
        相关资源
        最近更新 更多