Paypal按钮适用于Google Chrome扩展程序 [英] Paypal Button For Google Chrome Extension

查看:254
本文介绍了Paypal按钮适用于Google Chrome扩展程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图向我的Google Chrome扩展程序添加捐赠按钮(因为我喜欢钱)。我遇到了问题,因为Chrome扩展程序尝试在popup.html窗口中打开贝宝创建的捐赠按钮。当我点击按钮时,我的扩展只是重新启动,并没有捐赠窗口。

I'm attempting to add a donate button (because I like money) to my google chrome extension. I'm having trouble with it because the Chrome extension tries to open the paypal created donation button in the popup.html window. When I click the button, my extension just restarts and there is no donation window.

我尝试使用chrome.tab.create()尝试将其打开一个标签,但它似乎没有任何影响。

I have tried using chrome.tab.create() to try to make it open to a tab but it doesn't seem to have any effect.

捐款按钮的代码如下:

The code to the donation button is as follows:

<form action="chrome.tabs.create ({'url': 'https://www.paypal.com/cgi-bin/webscr'});" method="post">
<input type="hidden" name="cmd" value="_s-xclick">
<input type="hidden" name="hosted_button_id" value="XXXXXXXX">
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">

任何帮助都会很棒!

感谢

Thanks

推荐答案

尝试链接而不是表单: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=xxxxxxx < a>

Try a link instead of a form: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=xxxxxxx

这篇关于Paypal按钮适用于Google Chrome扩展程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆