1

I have made a paypal form to upload my custom shopping cart to paypal so customers can pay using payapal, however everytime I try to use it I am getting the following error on the paypal website:

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

Here is my code:

<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
    <input type="hidden" name="cmd" value="_cart">
    <input type="hidden" name="upload" value="1">
    <input type="hidden"name="business" value="websales@myemail.co.uk">
    <input type="hidden" name="item_name_1" value="Multi-Purpose Grease - Renolit" >
    <input type="hidden" name="amount_1" value="4.13" >
    <input type="hidden" name="shipping_1" value="1.00" >
    <input type="hidden" name="quantity_1" value="1" >
    <input type="hidden" name="item_name_2" value="Blue Roll six pack, seconds" >
    <input type="hidden" name="amount_2" value="8.00" >
    <input type="hidden" name="shipping_2" value="1.00" >
    <input type="hidden" name="quantity_2" value="1" >
    <input type="hidden" name=" currency_code " value="GBP">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
    <img alt="" border="0" src="https://www.paypalobjects.com/en_GB/i/scr/pixel.gif" width="1" height="1">
    <input type="hidden" name="hosted_button_id" value="KJXKVWA5MPEBY">
    <input type= "image"src="https://www.paypalobjects.com/en_US/GB/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal – The safer, easier way to pay online.">
</form>

If anyone has any ideas it would be much appreciated, this has been driving me mad!

4

1 回答 1

1

You are mixing cart upload buttons with the cart upload command. The cart upload command should not have a hosted button id variable in it. It would need to look like the following.

<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="my_email@my_site.com">

<input type="hidden" name="item_name_1" value="Football T-Shirt">
<input type="hidden" name="quantity_1" value="4">
<input type="hidden" name="amount_1" value="1.00">
<input type="hidden" name="on0_1" value="Color">
<input type="hidden" name="os0_1" value="Red">
<input type="hidden" name="on1_1" value="Size">
<input type="hidden" name="os1_1" value="Small">

<input type="hidden" name="item_name_2" value="Notebook">
<input type="hidden" name="quantity_2" value="2">
<input type="hidden" name="amount_2" value="2.00">
<input type="hidden" name="on0_2" value="Number of Pages">
<input type="hidden" name="os0_2" value="200">
<input type="hidden" name="on1_2" value="Type">
<input type="hidden" name="os1_2" value="3 Ring">

<input type="submit" value="PayPal">
</form>
于 2013-04-15T13:11:53.700 回答