首頁 > 後端開發 > php教程 > paypal 多个商品如何串接金流

paypal 多个商品如何串接金流

WBOY
發布: 2016-06-06 20:30:28
原創
1361 人瀏覽過

我在网络上查个 单个商品的串接方式 是ok的

<code><form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> 
<input type="hidden" name="business" value="recieve@gmail.com"> 
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="rm" value="2"> 
<input type="hidden" name="return" value="http://www.sqlview.com/payment/notify.php"> 
<input type="hidden" name="custom" value="myvalue"> 
<input type="hidden" name="item_name" value="楼票"> 
<input type="hidden" name="amount" value="5.95"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="undefined_quantity" value="1"> 
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif"    style="max-width:90%"  style="max-width:90%"> 
</form> 
</code>
登入後複製
登入後複製

上述是正确的,可传送,但今天我的传品有好几个的时候,就不知道要怎么传了,我的程序如下
总计跟 手续费运费是正确的,但没有跟出明细

<code><form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="PayPalForm"> 

                        <input type="hidden" name="business" value="lrain@yudole.com"> 

                        <input type="hidden" name="cmd" value="_xclick"> 

                        <input type="hidden" name="rm" value="2"> 

                        <input type="hidden" name="return" value="http://www.sqlview.com/payment/notify.php"> 

                        <input type="hidden" name="custom" value="lrain5477@gmail.com"> 

                        <input type="hidden" name="item_name_1" value="机票_1"> 
                        <input type="hidden" name="item_name_2" value="楼票_2"> 
                        <input type="hidden" name="item_name_3" value="楼票_3">

                        <input type="hidden" name="item_number_1" value="aa0001"> 
                        <input type="hidden" name="item_number_2" value="aa0003"> 
                        <input type="hidden" name="item_number_3" value="AA0004"> 

                        <input type="hidden" name="amount_1" value="250">
                        <input type="hidden" name="amount_2" value="220">
                        <input type="hidden" name="amount_3" value="210"> 

                        <input type="hidden" name="currency_code" value="USD"> 

                        <input type="hidden" name="undefined_quantity" value="1"> 
                        <input type="hidden" name="invoice" value="aaabc12354"> 
                        <input type="hidden" name="amount" value="5000"> 
                        <input type="hidden" name="shipping" value="600"> 
                    </form>  
                    <script>
                        document.getElementById("PayPalForm").submit()


                    </script>
</code>
登入後複製
登入後複製

求大大解

回复内容:

我在网络上查个 单个商品的串接方式 是ok的

<code><form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post"> 
<input type="hidden" name="business" value="recieve@gmail.com"> 
<input type="hidden" name="cmd" value="_xclick"> 
<input type="hidden" name="rm" value="2"> 
<input type="hidden" name="return" value="http://www.sqlview.com/payment/notify.php"> 
<input type="hidden" name="custom" value="myvalue"> 
<input type="hidden" name="item_name" value="楼票"> 
<input type="hidden" name="amount" value="5.95"> 
<input type="hidden" name="currency_code" value="USD"> 
<input type="hidden" name="undefined_quantity" value="1"> 
<input type="image" src="https://www.sandbox.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"> 
<img alt="" border="0" src="https://www.sandbox.paypal.com/en_US/i/scr/pixel.gif"    style="max-width:90%"  style="max-width:90%"> 
</form> 
</code>
登入後複製
登入後複製

上述是正确的,可传送,但今天我的传品有好几个的时候,就不知道要怎么传了,我的程序如下
总计跟 手续费运费是正确的,但没有跟出明细

<code><form action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post" id="PayPalForm"> 

                        <input type="hidden" name="business" value="lrain@yudole.com"> 

                        <input type="hidden" name="cmd" value="_xclick"> 

                        <input type="hidden" name="rm" value="2"> 

                        <input type="hidden" name="return" value="http://www.sqlview.com/payment/notify.php"> 

                        <input type="hidden" name="custom" value="lrain5477@gmail.com"> 

                        <input type="hidden" name="item_name_1" value="机票_1"> 
                        <input type="hidden" name="item_name_2" value="楼票_2"> 
                        <input type="hidden" name="item_name_3" value="楼票_3">

                        <input type="hidden" name="item_number_1" value="aa0001"> 
                        <input type="hidden" name="item_number_2" value="aa0003"> 
                        <input type="hidden" name="item_number_3" value="AA0004"> 

                        <input type="hidden" name="amount_1" value="250">
                        <input type="hidden" name="amount_2" value="220">
                        <input type="hidden" name="amount_3" value="210"> 

                        <input type="hidden" name="currency_code" value="USD"> 

                        <input type="hidden" name="undefined_quantity" value="1"> 
                        <input type="hidden" name="invoice" value="aaabc12354"> 
                        <input type="hidden" name="amount" value="5000"> 
                        <input type="hidden" name="shipping" value="600"> 
                    </form>  
                    <script>
                        document.getElementById("PayPalForm").submit()


                    </script>
</code>
登入後複製
登入後複製

求大大解

相關標籤:
來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板