如何通过PayPal提交多个产品复选框
How do i Submit Multiple product Checkboxes via Paypal?
我有PayPal基于View Cart方法的形式。我转换了代码以收集多个复选框信息并通过PayPal提交总和。当我尝试通过单击"立即购买"来处理需求集时,我收到来自PayPal的错误消息,内容为:
您请求了PayPal的过时版本。这个错误经常 使用书签的结果。
这是代码:
<form target="_self" action="https://www.paypal.com/cgi-bin/webscr" method="post" id="submit" name="submit">
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="http://coreneto.com/picturish/assets/images/logo_light.png">
<p>
<input type="hidden" name="cmd" value="_submit">
<input type="hidden" name="display" value="1">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="user@gmail.com">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Script_02.html">
</p>
</form>
<!-- End of the viewcart FORM -->
<!-- Start of Form -->
<!-- Note: target="paypal" was replaced with the variable target="_self" -->
<!-- Note: shopping_url also added to code -->
<!-- These two changes allow better functionality with IE and Firefox -->
<FORM onsubmit="this.target='_self'; return ReadForm(this, true);" action=https://www.paypal.com/cgi-bin/webscr method=post>
<!-- If using a Business or Company Logo Graphic, include the "cpp_header_image" variable in your View Cart code. -->
<input type="hidden" name="cpp_header_image" value="http://coreneto.com/picturish/assets/images/logo_light.png">
<input type="hidden" name="cmd" value="_submit">
<input type="hidden" name="add" value="1">
<!-- Replace "business" value with your PayPal Email Address or Account ID -->
<input type="hidden" name="business" value="user@gmail.com">
<input type="hidden" name="item_name" value="">
<input type="hidden" name="amount" value="">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn/btn_cart_LG.gif:NonHosted">
<!-- Replace value with the web page you want the customer to return to -->
<input type="hidden" name="shopping_url" value="http://www.yourwebsite.com/Script_02.html">
<!-- Replace value with the web page you want the customer to return to after a successful transaction -->
<input type="hidden" name="return" value="http://www.yourwebsite.com/ThankYou.html">
<!-- Replace value with the web page you want the customer to return to after item cancellation -->
<input type="hidden" name="cancel_return" value="http://www.yourwebsite.com/Cancel.html">
<input type="hidden" value="0.00" name="baseamt">
<input type="hidden" value="@0.00" name="basedes">
<input type="hidden" name="button_subtype" value="products">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="cn" value="Add some notes">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">
Add Toppings
<br><br>
<input onclick="ReadForm (this.form, false);" type=checkbox value="Pepp +1.50"> Pepperoni - Add $1.50
<br><br>
<input onclick="ReadForm (this.form, false);" type=checkbox value="It Saug +1.50"> It Saugsage - Add $1.50
<br><br>
<input onclick="ReadForm (this.form, false);" type=checkbox value="Ons +10.10"> Onions - Add $10.10
<br><br>
<input onclick="ReadForm (this.form, false);" type=checkbox value="Mush +10.25"> Mushrooms - Add $10.25
<br><br>
<input onclick="ReadForm (this.form, false);" type=checkbox value="Gr Peppers +10.15"> Green Peppers - Add $10.15
<br>
<!-- <input class=nbor size=6 value=$0.00 name=tot> -->
<div class="display-amount">$0.00</div>
<br><br>
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<input type=image alt="cart add" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" name=submit>
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
<br><br>
<input onclick="document.forms.viewcart.target = '_self'; document.forms.viewcart.submit (); return false;" type=image alt="cart view" src="https://www.paypalobjects.com/en_US/i/btn/btn_viewcart_LG.gif">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
这是现场直播:https://jsfiddle.net/rami7250/cojvcr90/
我做错了什么?
请更改以下代码
从
<input type="hidden" name="cmd" value="_submit">
自
<input type="hidden" name="cmd" value="_xclick">
请参阅 https://developer.paypal.com/docs/classic/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables/,cmd 变量仅支持以下值:_xclick
_车
_oe礼券
_xclick订阅
_xclick自动计费
_xclick付款计划
_捐款
_s-x点击
相关文章:
- Angular JS Filter-通过3个复选框进行筛选
- Rad网格编辑模式通过选中复选框时的java脚本启用禁用所需的字段验证器
- 通过复选框选择形成填充
- 如何通过javascript从复选框中获取仅可见和选中的值
- 通过原型/构造函数从复选框输出值
- 通过选中和取消选中复选框来添加和删除数组中的值
- 如何通过jQuery选中所有复选框并在单击一个复选框时取消选择
- AngularJS复选框通过$event.target更改问题
- 通过 Jquery 调用 tr 属性并找到我的内部复选框
- 通过 JQuery 获取单击的复选框的值属性
- 取消选中通过开机自检 [] 中的回显选中的复选框
- 通过复选框模拟 CTRL 按键
- 通过单击1复选框选中所有复选框
- JavaScript 在选中复选框时通过单击标签进行确认
- 勾选复选框并通过单击链接运行 onclick 事件
- 如何识别复选框是通过鼠标还是键盘选中的
- 改变复选框.Id通过javascript
- 复选框不通过jQuery检查
- 是否有任何方法创建一个复选框列表通过javascript使用剑道
- 复选框显示通过模态框