Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In addition to the changes suggested by devilprince, the underscores are missing from the line item input tags' name attributes, and also the tags are not proper self-closing tags because the closing <code>/</code> is missing. Correct like so:</p> <pre><code>&lt;form method="post" name="cart" action="https://www.sandbox.paypal.com/cgi-bin/webscr"&gt; &lt;input type="hidden" name="cmd" value="_cart"&gt; &lt;input type="hidden" name="upload" value="1"&gt; &lt;input type="hidden" name="business" value="navive_1295939206_biz@gmail.com"&gt; &lt;input type="hidden" name="lc" value="US"&gt; &lt;input type="hidden" name="currency_code" value="USD"&gt; &lt;input type="hidden" name="button_subtype" value="services"&gt; &lt;input type="hidden" name="notify_url" value="http://newzonemedia.com/henry/ipn.php" /&gt; &lt;input type="hidden" name="bn" value="PP-BuyNowBF:btn_buynowCC_LG.gif:NonHosted"&gt; &lt;input type="hidden" name="return" value="http://www.mysite.org/thank_you_kindly.html" /&gt; &lt;?php // select items for table $srowcart_dtl = mysql_num_rows($srscart_dtl); if($srowcart_dtl &gt; 0) { $cnt=1; while($srscart_dtl1 = mysql_fetch_assoc($srscart_dtl)) { ?&gt; &lt;input type="hidden" name="item_name_[&lt;?php echo $cnt ?&gt;]" value="&lt;?php echo $srscart_dtl1['cart_iname']; ?&gt;"/&gt; &lt;input type="hidden" name="amount_[&lt;?php echo $cnt ?&gt;]" value="&lt;?php echo $srscart_dtl1['cart_iprc']; ?&gt;"/&gt; &lt;?php $cnt++; } } ?&gt; &lt;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!"&gt; &lt;img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1"&gt; &lt;/form&gt; </code></pre> <p>(You may also want to escape special characters in the value attribute, at least for the <code>"</code> character in case it shows up in your item name data.)</p> <p>Just had to figure this out today for a client. Besides <code>item_name_N</code> and <code>amount_N</code> I also used <code>quantity_N</code>, <code>tax_N</code>, and <code>shipping_N</code> (where N is the line item number, starting with 1). </p> <p>This page has a list of all parameters: <a href="https://www.x.com/developers/paypal/documentation-tools/paypal-payments-standard/integration-guide/Appx_websitestandard_htmlvariables" rel="nofollow">PayPal HTML Form Variables</a>, but the question &amp; answers given here are a better real-world example than the trivial examples on the PayPal site.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload