drci47425 2014-09-20 13:58 采纳率: 100%
浏览 35

自定义paypal网站与PHP集成

I am having a problem with my paypal form. This form was working for me when I only had a field for a client to type in an amount they wished to pay. I modified it so that there would be three radio buttons. 2 for specified amounts (pulled from a mySQL database using php) and the final still being a client specified amount. If you use the last option of the specified amount everything works fine- but if you use the other two amounts that are specified on the page the client must click "update" on the left hand panel on the paypal generated page. How can I arrange this so that the update button does not need to be pushed on the first two options?

I have included screen shots of everything

Thanks for your help

image is here: http://i.stack.imgur.com/LH4eE.png

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
                            <fieldset>
                                <input type="hidden" name="cmd" value="_xclick" />
                                <input type="hidden" name="business" value="# !!I have my paypal email here" />
                                <input type="hidden" name="lc" value="US" />
                                <input type="hidden" name="item_name" value="Service Booking" />
                                <input type="hidden" name="item_number" value="BOOKING" />
                                <input type="hidden" name="currency_code" value="USD" />
                                <input type="hidden" name="button_subtype" value="services" />
                                <input type="hidden" name="no_note" value="0" />
                                <input type="hidden" name="cn" value="Comments" />
                                <input type="hidden" name="no_shipping" value="1" />
                                <input type="hidden" name="rm" value="1" />
                                <input type="hidden" name="return" value="http://www.alphadogentertainment.com/booksuccess.php" />
                                <input type="hidden" name="cancel_return" value="http://www.alphadogentertainment.com/bookcancel.php" />
                                <input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHostedGuest" />
<input type="hidden" name="os0" value="<?php print("$lastname");?> <?php print("$event");?>" />
<input type="hidden" name="on0" value="Event" />
                                <table>
                                        <tr><td style="padding:0 5px 5px 0;">Amount:</td><td style="padding:0 5px 5px 0;"><input type="radio" name="amount" value="<?php print("$deposit");?>" />Deposit: $<?php print("$deposit");?><br><input type="radio" name="amount" value="<?php print("$quote");?>" />Balance: $ <?php print("$quote");?><br><input type="radio" name="amount" value="">Other Amount: <input type="text" name="amount" /></td></tr>

                                        <tr><td>&nbsp;</td><td style="padding:0 5px 5px 0;">
                                                <input style="position:relative; left:-10px; background:#ffffff; border:0;" type="image" src="http://alphadogentertainment.com/images/bookbutton.jpg" name="submit" alt="PayPal" />
                                                <img alt="" style="border:0;" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1" />
                                        </td></tr>
                                </table>
                            </fieldset>
                        </form>
  • 写回答

1条回答 默认 最新

  • doumie7914 2014-09-20 18:41
    关注

    You need to modify the below line of code :

    Remove this line of code

    <tr><td style="padding:0 5px 5px 0;">Amount:</td><td style="padding:0 5px 5px 0;"><input type="radio" name="amount" value="<?php print("$deposit");?>" />Deposit: $<?php print("$deposit");?><br><input type="radio" name="amount" value="<?php print("$quote");?>" />Balance: $ <?php print("$quote");?><br><input type="radio" name="amount" value="">Other Amount: <input type="text" name="amount" /></td></tr>
    

    And paste this one :

    <tr><td style="padding:0 5px 5px 0;">Amount:</td><td style="padding:0 5px 5px 0;"><input type="radio" name="amount" value="">Other Amount: <input type="text" name="amount" /><br><input type="radio" name="amount" value="<?php print("$deposit");?>" />Deposit: $<?php print("$deposit");?><br><input type="radio" name="amount" value="<?php print("$quote");?>" />Balance: $ <?php print("$quote");?></td></tr>
    

    I just changed the order of the options . I have put the option 3 on the first place and it is working fine with this .

    评论

报告相同问题?

悬赏问题

  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用
  • ¥15 微信小程序协议怎么写
  • ¥15 c语言怎么用printf(“\b \b”)与getch()实现黑框里写入与删除?