贝宝弹出窗口在结帐时消失

发布于 2025-01-24 10:19:29 字数 177 浏览 1 评论 0 原文

我将在我的网站上创建一个PayPal付款网关,它可以与Sandbox帐户一起使用,但是当我转向实时模式时,它的结局并不好。 PayPal结帐窗口弹出并立即在现场模式下消失,甚至在该窗口中显示任何内容。我在实时模式下更改的唯一一件事是我替换“ API-M.Sandbox”的帖子URL。用“ API-M”。在这个“ paypal.com”背后

I'm about to create a PayPal payment gateway for donations on my website, it goes fine with the sandbox account, but when I turn to the live mode, it does not end well.
The PayPal check-out window pop and disappear immediately in a live mode before even showing anything in that window. The only thing I changed on the live mode is the post URL which I replaced "api-m.sandbox." with "api-m." behind this "paypal.com"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

咋地 2025-01-31 10:19:29

我在实时模式上更改的唯一一件事是我替换“ API-M.Sandbox”的帖子URL。用“ API-M”。在此“ paypal.com”

背后

您还需要使用开发人员仪表板 apps and recortentials ,并且JS SDK加载后必须具有其 src 的相同实时客户端ID。


顺便说一句(因为这是为了捐赠)考虑更简单的捐赠SDK 它不使用API​​呼叫,并为此量身定制付款经验。

如果由于某种原因确实坚持使用主JS SDK,则样式:{label:“ donate”} 可以在按钮初始化中使用,如果需要,可以将该文本添加到按钮中。

        paypal.Buttons({
            style: { label: "donate" },

The only thing I changed on the live mode is the post URL which I replaced "api-m.sandbox." with "api-m." behind this "paypal.com"

You also need to use a live client id an secret from the developer dashboard Apps and Credentials, and the JS SDK must have the same live client id for its src when loaded.


As an aside (since this is for donations) consider the simpler donate SDK which does not use API calls, and offers a payment experience more tailored for this.

If you do stick with the main JS SDK for some reason, style: { label: "donate" } can be used in the button initialization to add that text to the button, if desired.

        paypal.Buttons({
            style: { label: "donate" },
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文