douyan6871 2016-02-22 15:47
浏览 41
已采纳

Paypal不同的产品选择

I have paypal legacy code try to debug. I have different products with different price. In my project I found code

<div id="paypal_container"  class="payment_container">
                    <div class="procesor font20 marg_bot20">Pay via PayPal</div>    
                    <form action="<?php $server = base_url(); if (strpos($server,'http://cam.com/') !== false) echo 'https://www.paypal.com/cgi-bin/webscr'; else echo 'https://www.sandbox.paypal.com/cgi-bin/webscr'; ?>" method="post" target="_blank">
                    <input type="hidden" name="cmd" value="_xclick">
                    <input type="hidden" name="business" value="<?php if (strpos($server,'http://camm') !== false) echo 'cdd';  else echo 'pptest'; ?>">
                    <input type="hidden" name="lc" value="US">
                    <input type="hidden" name="button_subtype" value="services">
                    <input type="hidden" name="no_note" value="0">
                    <input type="hidden" name="cn" value="Add special instructions to the seller:">
                    <input type="hidden" name="no_shipping" value="2">
                    <input type="hidden" name="currency_code" value="USD">
                    <input type="hidden" name="notify_url" value="<?php echo base_url ('paypal/payment'); ?>">
                    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
                    <table>
                        <tr>
                            <td class="font20 marg_bot20 inline-block">
                                <input type="hidden" name="on0" value="Package">Package
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <select name="os0" class="input">
                                    <option value="Basic1">Basic $5.00 USD</option>
                                    <option value="Basic2">Basic $25.00 USD</option>
                                    <option value="Basic3">Basic $50.00 USD</option>
                                                                        <option value="VIP1">VIP1 $75.00 USD</option>
                                                                        <option value="VIP2">VIP2 150.00 USD</option>
                                    <option value="VIP3">VIP3 300.00 USD</option>
                                    <option value="VIP4">VIP4 $500.00 USD</option>
                                    <option value="VIP5">VIP5 $1,000.00 USD</option>
                                    <option value="VIP6">VIP6 $1,500.00 USD</option>
                                    <option value="Marquis">Marquis $3,000.00</option>
                            </select> 
                        </td>
                    </tr>
                    </table>
                    <input type="hidden" name="custom" value="<?php echo $custom_pp; ?>">
                    <input type="hidden" name="currency_code" value="USD">

                    <input type="hidden" name="option_select0" value="Basic1">
                    <input type="hidden" name="option_amount0" value="5.00">
                    <input type="hidden" name="option_select1" value="Basic2">
                    <input type="hidden" name="option_amount1" value="25.00">
                    <input type="hidden" name="option_select10" value="Basic3">
                    <input type="hidden" name="option_amount10" value="50.00">
                    <input type="hidden" name="option_select2" value="VIP1">
                    <input type="hidden" name="option_amount2" value="75.00">
                    <input type="hidden" name="option_select3" value="VIP2">
                    <input type="hidden" name="option_amount3" value="150.00">
                    <input type="hidden" name="option_select8" value="Marquis1">
                    <input type="hidden" name="option_amount8" value="200.00">
                    <input type="hidden" name="option_select4" value="VIP3">
                    <input type="hidden" name="option_amount4" value="300.00">
                    <input type="hidden" name="option_select5" value="VIP4">
                    <input type="hidden" name="option_amount5" value="500.00">
                    <input type="hidden" name="option_select6" value="VIP5">
                    <input type="hidden" name="option_amount6" value="1000.00">
                    <input type="hidden" name="option_select7" value="VIP6">
                    <input type="hidden" name="option_amount7" value="1500.00">
                    <input type="hidden" name="option_select9" value="Marquis">
                    <input type="hidden" name="option_amount9" value="3000.00">

                    <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
                    <img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
                    </form>

                </div>

But when I am redirected to sandbox paypal test page In cart I have proper product selected but price is always 0.01$.

Maybe I need something to add in my test facilitator or something in my html I am not sure how it works?

  • 写回答

1条回答 默认 最新

报告相同问题?

悬赏问题

  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题