How to send multiple items to PayPal

I want to send multiple item names and item prices to PayPal but I am unable to post my item name and price with below code can you please help me?

<form method="post"  name="cart" action="https://www.sandbox.paypal.com/cgi-bin/webscr">
    <input type="hidden" name="cmd" value="_xclick">
    <input type="hidden" name="business" value="navive_1295939206_biz@gmail.com">
    <input type="hidden" name="lc" value="US">

    <input type="hidden" name="currency_code" value="USD">
    <input type="hidden" name="button_subtype" value="services">
    <input type="hidden" name="notify_url" value="http://newzonemedia.com/henry/ipn.php" />
    <input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted">
    <input type="hidden" name="return" value="http://www.example.com/thank_you_kindly.html" />


    <?php
    //select items for table
    $srowcart_dtl = mysql_num_rows($srscart_dtl);
    if($srowcart_dtl > 0) {
        $cnt=1;
        while($srscart_dtl1 = mysql_fetch_assoc($srscart_dtl)) {
            ?>  
            <input type="hidden" name="item_name[<?php echo $cnt ?>]" value="<?php echo $srscart_dtl1['cart_iname']; ?>">

            <input type="hidden" name="amount[<?php echo $cnt ?>]" value="<?php echo $srscart_dtl1['cart_iprc']; ?>">
            <?php
            $cnt++;
        }
    }
    ?>
    <input type="image" src="https://www.paypal.com/en_US/i/btn/btn_buynowCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
    <img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
7
задан jschroedl 14 December 2016 в 14:53
поделиться