Paypal立即购买表格,发送电子邮件

时间:2014-07-01 17:41:34

标签: php html forms paypal

我有一个表格,收集人车的数据(年份,颜色,班级,最后4位数字。同样的表格也有关于注册此活动的人的信息。

当用户点击paypal立即购买按钮时,它应该向接受表格的人发​​送电子邮件,并将用户重定向到paypal,以便用户支付注册费。

您将看到提交按钮以及立即购买按钮。我基本上想要提交的功能,但重定向到paypal,如立即购买按钮。也不确定表单上的操作应该是什么。

<div id="container">
<section id="register">

                 <form action="mail.php" method="post" accept-charset="utf-8" on>
                        <h4>Your Jeep</h4>
                    <div class="form-field">
                        <fieldset>
                            <label>Year</label>
                            <input value="" placeholder="Year" type="text" name="year">
                        </fieldset>



                        <fieldset>
                            <label>Color</label>
                            <input value="" placeholder="Color" type="text" name="color">
                        </fieldset>



                        <fieldset>
                            <label>Class</label>
                            <input value="" placeholder="Stock, Modified, Highly Modified" type="text" name="class">
                        </fieldset>


                   <!--------------------
                    <div class="form-field">
                        <fieldset>
                            <label>Class</label>
                            <select class="form-field">
                            <option value="Select Class">Select Class</option>
                            <option value="Stock">Stock</option>
                            <option value="Modified">Modified</option>
                            <option value="Highly Modified">Highly Modified</option>
                            </select>
                        </fieldset>
                    </div>
                     ------------------------->


                        <fieldset>
                            <label>Last 4 digits of VIN</label>
                            <input value="" placeholder="Last 4 digits of VIN" type="text" name="vin">
                        </fieldset>
                    </div>





                            <h4>You</h4>
                        <div class="form-field">
                            <fieldset>
                                <label>Name</label>
                                <input value="" placeholder="Name" type="text" name="name">
                            </fieldset>
                        </div>

                        <div class="form-field">
                            <fieldset>
                                <label>Address</label>
                                <input value="" placeholder="Address" type="text" name="address">
                            </fieldset>
                        </div>

                        <div class="form-field">
                            <fieldset>
                                <label>City</label>
                                <input value="" placeholder="City" type="text" name="city">
                            </fieldset>
                        </div>

                        <div class="form-field">
                            <fieldset>
                                <label>State</label>
                                <input value="" placeholder="State" type="text" name="state">
                            </fieldset>
                        </div>

                        <div class="form-field">
                            <fieldset>
                                <label>Zip</label>
                                <input value="" placeholder="Zip" type="text" name="Zip">
                            </fieldset>
                        </div>

                        <div class="form-field">
                            <fieldset>
                                <label>Email</label>
                                <input value="" placeholder="Email" type="text" name="email">
                            </fieldset>
                        </div>


                       <div class="form-button">
                                <input type="submit" onclick="this.form.submit();"></div>
                       </form>










         <div id="paykim">
            <form name="_xclick" action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="me@mybusiness.com">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="item_name" value="Jeep Registration">
<input type="hidden" name="amount" value="10.00">
<input type="image" src="http://www.paypal.com/en_US/i/btn/btn_buynow_LG.gif" border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
</form>
        <p>Clicking the Submit button will bring you to the official PayPal website where you will be able to send the $10 Registration Fee to </p>
        <p id="ekim">Email of person accepting the registrations.</p>
        <p id="confirm">You'll recieve a conformation email once your transaction is complete.</p>
         </div> 



                 </section> 
      </div>          

http://jsfiddle.net/BsVv5/

1 个答案:

答案 0 :(得分:0)

我假设您将数据存储在数据库中。我建议首先将表单数据保存在数据库中,一旦存储,通过查询数据库创建一个结帐页面并创建另外的paypal形式。你需要提供ipn paypal的文件来发送即时通知。

https://developer.paypal.com/webapps/developer/docs/classic/products/instant-payment-notification/

相关问题