通过添加到购物车paypal购买多个物品 [英] Purchasing more than one item via Add To cart paypal

查看:147
本文介绍了通过添加到购物车paypal购买多个物品的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在通过添加到购物车PayPal按钮购买多个商品。这是我的代码:

 < form action =https://www.paypal.com/cgi-bin/webscr method =post> 

< input type =hiddenname =cmdvalue =_ cart/>
< input type =hiddenname =uploadvalue =1/>

< input type =hiddenname =businessvalue =seller_1360303883_biz@gmail.com/>
< input type =hiddenname =currency_codevalue =USD/>

< input type =hiddenname =item_name_1value =Item Name 1/>
< input type =hiddenname =amount_1value =$<?php echo $ price1?>/>
< input type =hiddenname =shipping_1value =1.75/>
< input type =hiddenname =quantity_1value =1/>

< input type =hiddenname =item_name_2value =Item Name 2/>
< input type =hiddenname =amount_2value =$<?php echo $ price2?>/>
< input type =hiddenname =shipping_2value =2.50/>
< input type =hiddenname =quantity_2value =1/>

< input type =hiddenname =item_name_3value =Item Name 3/>
< input type =hiddenname =amount_3value =$<?php echo $ price3?>/>
< input type =hiddenname =shipping_3value =2.50/>
< input type =hiddenname =quantity_3value =2/>





 <! - < input type =submitvalue =PayPal/> - > 

< / form>

通过使用上面的代码i;获取错误:

您输入的数量无效,数量值必须是大于或等于1的整数。



我搜索了它并尝试了这些建议,但都没有成功。
任何帮助都会很棒!

解决方案

我认为您使用的是沙箱,并且您正在将贝宝b $ b

I'm working on purchasing more than one item via "Add to Cart" paypal button. Here is my code:

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

          <input type="hidden" name="cmd" value="_cart"/>
          <input type="hidden" name="upload" value="1"/>

          <input type="hidden" name="business" value="seller_1360303883_biz@gmail.com"/>
          <input type="hidden" name="currency_code" value="USD"/>

          <input type="hidden" name="item_name_1" value="Item Name 1"/>
          <input type="hidden" name="amount_1" value="$<?php  echo $price1 ?>"/>
          <input type="hidden" name="shipping_1" value="1.75"/>
          <input type="hidden" name="quantity_1" value="1"/>

          <input type="hidden" name="item_name_2" value="Item Name 2"/>
          <input type="hidden" name="amount_2" value="$<?php  echo $price2 ?>"/>
          <input type="hidden" name="shipping_2" value="2.50"/>
          <input type="hidden" name="quantity_2" value="1"/>

          <input type="hidden" name="item_name_3" value="Item Name 3"/>
          <input type="hidden" name="amount_3" value="$<?php  echo $price3 ?>"/>
          <input type="hidden" name="shipping_3" value="2.50"/>
          <input type="hidden" name="quantity_3" value="2"/>

       <!-- <input type="submit" value="PayPal"/> -->

        </form>

By using above code i; getting the error:

"You have entered an invalid quantity value. A quantity value must be an integer greater than or equal to one."

I've searched it and try the suggestions but none of them worked. Any help would be great!

解决方案

i think you are using sandbox and in form you are putting form action of paypal insetead sandbox of paypal

这篇关于通过添加到购物车paypal购买多个物品的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆