user3342042
user3342042

Reputation: 241

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

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="[email protected]" 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>

Upvotes: 3

Views: 3416

Answers (1)

PYPL_ORCN
PYPL_ORCN

Reputation: 91

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">

Upvotes: 4

Related Questions