<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Gravity Support Forums Topic: Incorrectly Formatted Item Amount</title>
		<link>https://legacy.forums.gravityhelp.com/topic/incorrectly-formatted-item-amount</link>
		<description>Gravity Support Forums Topic: Incorrectly Formatted Item Amount</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 18:25:34 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.1</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>https://legacy.forums.gravityhelp.com/search.php</link>
		</textInput>
		<atom:link href="https://legacy.forums.gravityhelp.com/rss/topic/incorrectly-formatted-item-amount" rel="self" type="application/rss+xml" />

		<item>
			<title>red on "Incorrectly Formatted Item Amount"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/incorrectly-formatted-item-amount#post-59547</link>
			<pubDate>Sun, 20 May 2012 16:21:26 +0000</pubDate>
			<dc:creator>red</dc:creator>
			<guid isPermaLink="false">59547@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Thanks for the tip on the hook! Put this together to work for multiple negative items/discounts and coupons, in a form:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://pastebin.com/WgC9vwD2&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/WgC9vwD2&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;- keeps all non-negative items as is&#60;br /&#62;
- adds up discount and coupon items&#60;br /&#62;
- clears out those discount and coupon items and $0 value items from the cart&#60;br /&#62;
- sends to PayPal only non-negative cart items and one grand total discount amount for the cart&#60;/p&#62;
&#60;p&#62;This way you still get itemized checkouts and receipts and can show the discount separate, without passing negative numbers.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Smith on "Incorrectly Formatted Item Amount"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/incorrectly-formatted-item-amount#post-46778</link>
			<pubDate>Wed, 18 Jan 2012 17:24:05 +0000</pubDate>
			<dc:creator>David Smith</dc:creator>
			<guid isPermaLink="false">46778@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Jarrod,&#60;/p&#62;
&#60;p&#62;The documentation you found is for PayPal's express checkout service. Gravity Forms currently only integrates with PayPal's Website Payments Standard service. As far as I know, Website Payments Standard does not like negative numbers at all.&#60;/p&#62;
&#60;p&#62;The solution is the pass the discount as a coupon amount rather than a product. Here are a list of variables that you can pass:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#38;amp;content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables&#34; rel=&#34;nofollow&#34;&#62;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#38;amp;content_ID=developer/e_howto_html_Appx_websitestandard_htmlvariables&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;You'll see &#34;discount_amount&#34; for single items or &#34;discount_amount_cart&#34; for the entire order. You can update the query sent to PayPal via the &#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_paypal_query&#34; rel=&#34;nofollow&#34;&#62;gform_paypal_query&#60;/a&#62; hook.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>JnJ on "Incorrectly Formatted Item Amount"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/incorrectly-formatted-item-amount#post-46262</link>
			<pubDate>Thu, 12 Jan 2012 21:01:43 +0000</pubDate>
			<dc:creator>JnJ</dc:creator>
			<guid isPermaLink="false">46262@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I had a form that at one time was working perfectly. It seems like randomly it decided to stop working. So it seems.&#60;/p&#62;
&#60;p&#62;I wrote some custom code to check a text field for a discount code entered and then add a product with a negative amount and pass it through gform_product_info. I can no longer get gform_product_total to dynamically update my front end total (but that's a different problem) and while testing my form to see if the backend stuff still worked, I got this error from paypal: &#60;/p&#62;
&#60;p&#62;&#34;The link you have used to enter the PayPal system contains an incorrectly formatted item amount.&#34;&#60;/p&#62;
&#60;p&#62;I've been hunting around for a couple of hours now and can't figure out what paypal has an issue with. I thought it might suddenly have a problem with negative amounts, but according to &#60;a href=&#34;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#38;amp;content_ID=developer/e_howto_api_ECCustomizing&#34; rel=&#34;nofollow&#34;&#62;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#38;amp;content_ID=developer/e_howto_api_ECCustomizing&#60;/a&#62; the item price can be positive or negative, but not zero. When no discount code is used paypal brings up a total summary just fine.&#60;/p&#62;
&#60;p&#62;The relevant products part of the URL being sent to paypal is: &#60;/p&#62;
&#60;p&#62;&#34;item_name_1=Austin%2C+TX+-+August+11-18&#38;amp;amount_1=320&#38;amp;quantity_1=1&#38;amp;item_name_2=Discount+MLD2012&#38;amp;amount_2=-30&#38;amp;quantity_2=1&#34;&#60;/p&#62;
&#60;p&#62;My code for sending the discount info to paypal is:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;function update_product_info($product_info, $form, $entry) {
    $code = $entry[88];

	if($code == &#38;#39;MLD2012&#38;#39; &#124;&#124; $code == &#38;#39;mld2012&#38;#39;){

		$total = get_total($product_info);
	    $discount = -30;

	    $product_info[&#38;#39;products&#38;#39;][&#38;#39;tax&#38;#39;] = array(
	        &#38;#39;name&#38;#39; =&#38;gt; &#38;#39;Discount MLD2012&#38;#39;, // name that will appear in PayPal and pricing summary tables
	        &#38;#39;price&#38;#39; =&#38;gt; $discount, // amount of total discount
	        &#38;#39;quantity&#38;#39; =&#38;gt; 1
	        );
    }

  return $product_info;

}
add_filter(&#38;#39;gform_product_info_9&#38;#39;, &#38;#39;update_product_info&#38;#39;, 10, 3);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;You can see the form live at: &#60;a href=&#34;http://www.youthunlimited.org/form-test/&#34; rel=&#34;nofollow&#34;&#62;http://www.youthunlimited.org/form-test/&#60;/a&#62; (if you feel like checking the script I'm loading with the gform_pre_render filter and seeing if you can tell why it won't change my front end total, then that's a bonus)&#60;/p&#62;
&#60;p&#62;in summary, paypal is annoying. hopefully you guys can see quickly what may be going wrong. I always appreciate the quality support here.&#60;/p&#62;
&#60;p&#62;Thanks!&#60;/p&#62;
&#60;p&#62;-Jarrod
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
