【问题标题】:Custom Logic on Paypal buttonPaypal 按钮上的自定义逻辑
【发布时间】:2016-08-05 21:52:56
【问题描述】:

我希望我的 paypal 按钮从我的自定义表单中捕获信息,因此所有用户在按下它后需要做的就是进行付款。我的自定义表单只有 2 个字段:金额和电子邮件地址。甚至可能吗? 任何人都知道如何使用 php 做到这一点?谢谢

【问题讨论】:

    标签: php paypal


    【解决方案1】:

    如果我理解你的问题是正确的,那么这个例子应该是你正在寻找的:

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Paypal</title>
    </head>
    <body>
        <form action="https://www.paypal.com/cgi-bin/webscr" method="post">
            <input type="hidden" name="cmd" value="_xclick">
            <!-- Change the email -->
            <input type="hidden" name="business" value="email@email.com">
            <!-- Change the return email after payment -->
            <input type="hidden" name="return" value="http://google.com">
            <!-- Change the description of the item -->
            <input type="hidden" name="item_name" value="Item name"/>
            <input type="text" name="user_email" placeholder="Please enter email" value=""/>
            <input type="hidden" name="no_shipping" value="1">
            <input type="text" name="user_amount" placeholder="Please enter amount" value="">  
            <input type="hidden" name="no_note" value="1"> 
            <input type="hidden" name="currency_code" value="USD">  
            <input type="hidden" name="bn" value="PP-BuyNowBF">
            <button type="submit" alt="PayPal - The safer, easier way to pay online!">Pay now</button>
        </form>
    </body>
    </html>
    

    【讨论】:

      【解决方案2】:

      删除带有 name="email" 和 name="amount" 的输​​入并标记可见输入 user_email 和 user_amount,填写并发送表单

      【讨论】:

        猜你喜欢
        • 2017-11-14
        • 2011-10-13
        • 2018-06-18
        • 2020-08-06
        • 2013-05-30
        • 1970-01-01
        • 2020-03-11
        • 2017-10-11
        • 1970-01-01
        相关资源
        最近更新 更多