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 socket通信实现多人聊天室疑惑
  • ¥15 DEV-C++编译缺失
  • ¥33 找熟练码农写段Pyhthon程序
  • ¥100 怎么让数据库字段自动更新
  • ¥15 antv g6 力导向图布局
  • ¥15 quartz框架,No record found for selection of Trigger with key
  • ¥15 锅炉建模+优化算法,遗传算法优化锅炉燃烧模型,ls-svm会搞,后面的智能算法不会
  • ¥20 MATLAB多目标优化问题求解
  • ¥15 windows2003服务器按你VPN教程设置后,本地win10如何连接?
  • ¥15 求一阶微分方程的幂级数