Paypal sandbox - your shoping cart is empty after i post variables with form?

paypal, php

Solution

Your item variables should start with 1 instead of 0. This is how your item related variables should look like:

<input type="hidden" value="super tričko" name="item_name_1">
<input type="hidden" value="1000" name="amount_1">
<input type="hidden" value="1" name="quantity_1">

Problem

I have a problem after I am redirected on paypal site. It display error -> your shopping cart is empty. No idea what is wrong. Thank you. HTML: ``` <form method="post" action="https://www.paypal.com/cgi-bin/webscr"> <input type="hidden" value="_cart" name="cmd"> <input type="hidden" value="1" name="upload"> <input type="hidden" value="jax.cj@seznam.cz" name="business"> <input type="hidden" value="super tričko" name="item_name_0"> <input type="hidden" value="1000" name="amount_0"> <input type="hidden" value="1" name="quantity_0"> <input type="hidden" value="" name="custom"> <input type="hidden" value="https://www.yoursite.com/storescripts/my_ipn.php" name="notify_url"> <input type="hidden" value="https://www.yoursite.com/checkout_complete.php" name="return"> <input type="hidden" value="2" name="rm"> <input type="hidden" value="Return to The Store" name="cbt"> <input type="hidden" value="https://www.yoursite.com/paypal_cancel.php" name="cancel_return"> <input type="hidden" value="CZ" name="lc"> <input type="hidden" value="CZK" name="currency_code"> <input type="image" alt="Make payments with PayPal - its fast, free and secure!" name="submit" src="http://www.paypal.com/en_US/i/btn/x-click-but01.gif"> </form> ```

Original source