>  기사  >  백엔드 개발  >  paypal 多个商品如何串接金流

paypal 多个商品如何串接金流

WBOY
WBOY원래의
2016-06-06 20:30:281344검색

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

求大大解

성명:
본 글의 내용은 네티즌들의 자발적인 기여로 작성되었으며, 저작권은 원저작자에게 있습니다. 본 사이트는 이에 상응하는 법적 책임을 지지 않습니다. 표절이나 침해가 의심되는 콘텐츠를 발견한 경우 admin@php.cn으로 문의하세요.