Paypal的“立即捐赠"自定义金额按钮 [英] Paypal custom amount for "Donate Now" button

查看:94
本文介绍了Paypal的“立即捐赠"自定义金额按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统已要求我在网站上实现Paypal立即捐赠"功能,类似于

I've been asked to implement Paypal "Donate Now" functionality on a web site, similar to Wikipedia's site.

我知道如何生成固定金额和可变金额的立即购买/捐赠"按钮, 但我看不到Wikipedia如何让用户在其网站上指定金额,然后结转到Paypal ,以便该金额预填 >一旦他们到达那里.

I know how to generate "Buy/Donate Now" buttons with fixed amounts, and with variable amounts, but I don't see how Wikipedia is able to have the user specify the amount on their site and then have it carry over to Paypal, so that the amount is pre-filled once they get there.

Paypal自己的文档似乎不支持金额"字段(或者我错过了).我实际上打电话给Paypal支持,并被告知要使用此功能,必须使用第三方购物车,但是如果购物车支持此功能,那不就是表单参数吗?

Paypal's own documentation does not seem to support an "amount" field (or I've missed it). I actually called Paypal support and was told that I'd have to use a 3rd-party shopping cart for this functionality, but if the carts support this, isn't it just a form param?

推荐答案

是的,为此有一个HTML输入参数.简称为金额".
请参见
https://cms.paypal.com/us/cgi- bin/?cmd = _render-content& content_ID = developer/e_howto_html_Appx_websitestandard_html变量

Yes, there's an HTML input parameter for this. Simply called 'amount'.
See https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables

只需在任何HTML输入/选择字段中包含amount,并确保将其传递给PayPal.例如:

Just include amount in any HTML input/select field and ensure you pass it over to PayPal. For example:

<label for="amount">Enter the amount you wish to donate:</label> 
<input type="text" id="amount" name="amount" value"">

或者;

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

这篇关于Paypal的“立即捐赠"自定义金额按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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