贝宝捐赠按钮:添加“金额"和“货币" [英] PayPal Donation Button: Adding 'Amount' and 'Currency'

查看:67
本文介绍了贝宝捐赠按钮:添加“金额"和“货币"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个正常的"贝宝捐赠按钮.我想添加两个选择项字段:金额货币,如下图所示.因此,用户无需输入PayPal网站的金额:

I have the "normal" PayPal donation button. I want to add two multiple choice fields: Amount and Currency as the image below. So the user dont need to put the amount of the PayPal website:

这是正常的贝宝捐赠按钮代码":

This is the 'normal paypal donation button code':

<form action="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="XXXXXXXXXXXXX">
<input type="image" src="https://www.paypalobjects.com/es_ES/ES/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal.">
<img alt="" border="0" src="https://www.paypalobjects.com/es_ES/i/scr/pixel.gif" width="1" height="1">
</form>

我已阅读这篇文章,您必须添加以下几行,但我不知道在哪里或如何做.它不起作用.

I have read on this post that you have to add the following lines, but I dont know where or how to do it. It doesnt work.

<label for="amount">Select the amount you wish to donate:</label> 
<select name="amount" id="amount">
<option value="5.00">$5.00</option>
<option value="25.00">$25.00</option>
<option value="50.00">$50.00</option>
</select>

有人可以告诉我如何正确执行吗?谢谢!

Can anyone tell me how to do it correctly? Thanks!

推荐答案

托管的PayPal按钮允许您发送选项变量,但是当不用于捐赠按钮时,请确保选项值(用于下拉菜单/文本框)匹配确切地保存在您的PayPal帐户中的内容.即不要编辑PayPal为您创建的下拉框.

Hosted PayPal buttons allow you to send option variables, but when not for a donation button, be sure that the option values (for drop downs / text boxes) match exactly what is saved in your PayPal account. i.e. do not edit drop down boxes PayPal creates for you.

对于将下拉框/文本框添加到托管按钮中,只要不改变付款金额,就完全有可能.因此,为了创建允许您编辑金额的托管捐赠按钮,我建议以下几点:

As for adding drop down boxes / text boxes to a hosted button, perfectly possible, as long as they do not alter the payment amount. So, for creating a hosted donation button that allows you to edit the amount, I advise the following:

  1. 在PayPal上创建立即购买"按钮,并添加下拉框和/或您希望添加到捐赠按钮的文本框.就像创建捐赠按钮一样创建该按钮,因为正是我们将要做的,将其更改为捐赠按钮.
  2. 复制整个立即购买"按钮的HTML代码,粘贴到记事本中,或编辑器中,您可以在其中使用查找并替换".
  3. 将所有出现的"buynow"替换为"donate"(这通常只是更改图像).同样,将"_xclick"替换为"_donations". (告诉PayPal如何生成结帐页面)
  1. Create a buy now button on PayPal, adding the drop down boxes and/or text boxes you wish to add to your donation button. Create this button as if you were creating your donation button, because that is exactly what we will be doing, changing this button into a donation button.
  2. Copy the the whole buy now button HTML code, paste into notepad, or an editor where you can use 'find and replace'.
  3. Replace all occurances of 'buynow' with 'donate' (This usually just changes the image). Also, replace '_xclick' with '_donations'. (to tell PayPal how to generate the checkout page)

您现在有了一个捐赠按钮

这篇关于贝宝捐赠按钮:添加“金额"和“货币"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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