简体   繁体   English

使用Sandbox的PayPal按钮未显示

[英]PayPal button using Sandbox not showing

I'm trying to get a simple "Buy Now" button to appear on my page, but I can't get it to appear, here's my code: 我试图在我的页面上显示一个简单的“立即购买”按钮,但我无法显示,这是我的代码:

<script>
    data-amount="3.00" 
    data-name="MyActivity" 
    data-button="buynow" src="paypal-button.min.js?merchant=MERCHANT_ID"
</script>
<form class="paypal-button" method="post" action="https://www.paypal.com/cgi-bin/webscr" target="_top" style="opacity: 1;">
<input type="button" value="buy">
</form>

In my code the merchant ID is there I've just taken out for this. 在我的代码中,商家ID就在那里,我刚刚拿出来。

Those should all be attributes of the script tag, not code within the tag... like so... 那些应该都是脚本标签的属性,而不是标签内的代码......就像这样......

<script src="paypal-button.min.js?merchant=MERCHANT_ID"
    data-amount="3.00" 
    data-name="MyActivity" 
    data-button="buynow">
</script>

You'll need to download the js file and have it on your server. 您需要下载js文件并将其放在服务器上。

Do you have a link to the page you have this set up on that you can provide? 您是否有指向您所设置的页面的链接? Verify, that have you save and post your code to your page that your editor is not stripping out some of the code. 验证,您是否已将代码保存并发布到页面中,导致编辑器没有删除某些代码。 Go to the web page and view the source of the page and make sure its the same as what you are entering in. I see a button, when I use your code on an HTML page. 转到网页并查看页面来源并确保其与您输入的内容相同。当我在HTML页面上使用您的代码时,我会看到一个按钮。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM