Google Chrome 扩展程序的 Paypal 按钮 [英] Paypal Button For Google Chrome Extension

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

问题描述

我正在尝试向我的 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.

捐赠按钮代码如下:

<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">

对此的任何帮助都会很棒!

Any help with this would be great!

谢谢

推荐答案

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

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

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