Home > Backend Development > PHP Tutorial > paypal 多个商品如何串接金流

paypal 多个商品如何串接金流

WBOY
Release: 2016-06-06 20:30:28
Original
1361 people have browsed it

我在网络上查个 单个商品的串接方式 是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>
Copy after login
Copy after login

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

<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>
Copy after login
Copy after login

求大大解

回复内容:

我在网络上查个 单个商品的串接方式 是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>
Copy after login
Copy after login

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

<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>
Copy after login
Copy after login

求大大解

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template