【问题标题】:Creating a check box and donation field for paypal为贝宝创建复选框和捐赠字段
【发布时间】:2013-07-29 18:09:33
【问题描述】:

所以我正在努力创建一个独特的贝宝字段。我什至不知道这是否可行。

我需要一些用户可以选中复选框来购买物品,然后在最后的空白字段中添加捐赠,然后然后结帐?

例如,像这样的东西?

  1. 180 美元
  2. 35 美元

输入捐款? _

结帐按钮

这可能吗? 谢谢! 一个

【问题讨论】:

    标签: checkbox paypal field


    【解决方案1】:

    您可以尝试这样的按钮,但两个字段都不是可选的:

    <form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden" name="business" value="E-mail address">
    
            <!-- Begin First Item -->
    <input type="hidden" name="quantity_1" value="1">
    <input type="hidden" name="item_name_1" value="Item A">
    <input type="radio" name="amount_1" value="male">1.00<br>
    <input type="radio" name="amount_1" value="female">2.00<br>
            <!-- End First Item -->
    
            <!-- Begin Second Item -->
    <input type="hidden" name="quantity_2" value="1">
    <input type="hidden" name="item_name_2" value="Test Item B">
    <input type="text" name="amount_2" value="5.00"><br>
            <!-- End Second Item -->
    
    <input type="hidden" name="currency_code" value="USD">
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_cart_SM.gif" border="0" name="upload" 
    
    alt="Make payments with PayPal - it's fast, free and secure!" width="87" height="23">
    </form>
    

    除了 HTML 表单之外,还可以通过一些开发来计算您网站上的项目总数,然后有一个可选的文本字段。 StackOverflow 不是为您构建脚本,它是一个开发辅助板。

    【讨论】:

      猜你喜欢
      • 2016-05-18
      • 2013-02-02
      • 1970-01-01
      • 2015-09-07
      • 2011-08-30
      • 2016-11-20
      • 2018-05-07
      • 2011-09-16
      • 2013-12-22
      相关资源
      最近更新 更多