English 中文(简体)
2. 提交多件物品,一劳永逸地与营地一起支付
原标题:submitting multiple items to paypal cart at once with php
  • 时间:2009-11-19 08:46:20
  •  标签:
  • php
  • paypal

我有一些销售物品,有2和3级的定制。 一旦安装了用户,就会增加我的现场车。 问题在于,如何把每一件物品送到检查时支付费用? 唯一为有活力的纽州制定的法典只支持一个单一项目。

<form method="post" action="https://www.paypal.com/cgi-bin/webscr" target="paypal">
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="add" value="1">
<input type="hidden" name="business" value="EMAIL">
<input type="hidden" name="item_name" value="Item #1">
<input type="hidden" name="item_number" value="123456">
<input type="hidden" name="amount" value="7.00">
<input type="hidden" name="shipping" value="0">
<input type="hidden" name="shipping2" value="0">
<input type="hidden" name="handling" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="return" value="http://www.yoursite.com/thankyou.htm">
<input type="hidden" name="undefined_quantity" value="1">
<input type="image" src="http://images.paypal.com/en_US/i/btn/x-click-but22.gif" border="0" name="submit" width="87" height="23" alt="Make payments with PayPal - it s fast, free and secure!">
</form>

我尝试加添一句。

<input type="hidden" name="item_name_2" value="Item #1">
<input type="hidden" name="item_number_2" value="123456">
<input type="hidden" name="amount_2" value="7.00">

但没有任何积极结果。

任何想法?

最佳回答

这就是解决办法。

<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="email@email.com">
<input type="hidden" name="item_name_1" value="Item #1">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="item_name_2" value="Item #2">
<input type="hidden" name="amount_2" value="2.00">
<input type="submit" value="PayPal">
</form> 
问题回答

为什么不把客户必须支付的总额寄给付Pal?





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签