<?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: Extra data to order summary paypal via gform_paypal_query hook</title>
		<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook</link>
		<description>Gravity Support Forums Topic: Extra data to order summary paypal via gform_paypal_query hook</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 10:48:58 +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/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-81498</link>
			<pubDate>Tue, 16 Oct 2012 16:04:31 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">81498@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;blockquote&#62;&#60;p&#62;
description of order summary
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;Where is this seen?  On screen or in a notification or in the admin entry view?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brubrant2 on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-81413</link>
			<pubDate>Tue, 16 Oct 2012 10:06:15 +0000</pubDate>
			<dc:creator>brubrant2</dc:creator>
			<guid isPermaLink="false">81413@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Dah! I just typed wrong the variable name. Instead of &#60;strong&#62;item_name1&#60;/strong&#62; is &#60;strong&#62;item_name_1&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62;Now the code look like this:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_paypal_query&#38;#39;, &#38;#39;update_paypal_query&#38;#39;, 10, 3);

function update_paypal_query($query_string, $form, $entry) {
parse_str($query_string, $query);
$query[&#38;#39;item_name_1&#38;#39;] = get_the_title($entry[13]);
$query_string = http_build_query($query, &#38;#39;&#38;#39;, &#38;#39;&#38;amp;&#38;#39;);
return &#38;#39;&#38;amp;&#38;#39; . $query_string;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Now I run into another issue, the charset doesn't match. The special characters are displaying messed up in description of order summary.&#60;/p&#62;
&#60;p&#62;I added the title of post to query string variable &#60;strong&#62;item_name_1&#60;/strong&#62; (line 5), but when the title has special characters (like à á â ã) so this are not displaying correctly in description of order summary.&#60;/p&#62;
&#60;p&#62;I already tried the functions: &#60;strong&#62;utf8_encode()&#60;/strong&#62;, &#60;strong&#62;esc_attr(strip_tags())&#60;/strong&#62;, &#60;strong&#62;iconv()&#60;/strong&#62; and urlencode() but have not had success yet. In fact the urlencode() was not necessary.&#60;/p&#62;
&#60;p&#62;I've also checked the default character encoding settings in PayPal, was Windows-1252 and I changed to UTF-8.&#60;/p&#62;
&#60;p&#62;Anyone has any thoughts?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-80590</link>
			<pubDate>Fri, 12 Oct 2012 13:01:52 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">80590@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Please let us know if you need more help.  Writing the $query_string to a log file is a fine way to do it, if you can't echo it to the screen. At least you would know what it contains at that point.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brubrant2 on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-80300</link>
			<pubDate>Thu, 11 Oct 2012 09:25:38 +0000</pubDate>
			<dc:creator>brubrant2</dc:creator>
			<guid isPermaLink="false">80300@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi Chris, thanks for your fast reply :)&#60;/p&#62;
&#60;p&#62;Also thanks for the tip about urlencode() function.&#60;/p&#62;
&#60;p&#62;I realized that the variable &#60;strong&#62;item_namex&#60;/strong&#62; that holds the main description of transaction, in this case &#60;strong&#62;Preço por cota&#60;/strong&#62; as we can see in attached image above and within IPN message &#60;strong&#62;&#38;amp;item_name1=Preço por cota&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62;Now I'm trying to understand how GF PayPal Add-on handle this variable in &#60;strong&#62;gravityformspaypal/paypal.php&#60;/strong&#62;.&#60;/p&#62;
&#60;p&#62;Also I could not echo the &#60;code&#62;$query_string&#60;/code&#62; before it's returned from my function because the &#60;code&#62;gform_paypal_query&#60;/code&#62; hook is fired immediately before the user is redirected to PayPal. So I'll try to print the &#60;code&#62;$query_string&#60;/code&#62; in a text file.&#60;/p&#62;
&#60;p&#62;I changed my code but have not had success.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_paypal_query&#38;#39;, &#38;#39;update_paypal_query&#38;#39;, 10, 3);

function update_paypal_query($query_string, $form, $entry) {

	//put PayPal querystring into an array
    parse_str($query_string, $query);

    $descricao = &#38;quot;$entry[12] cotas reembols&#38;amp;aacute;veis para o evento $entry[13]&#38;quot;;

    $query[&#38;#39;item_name1&#38;#39;] = urlencode($descricao);

    $query_string = http_build_query($query, &#38;#39;&#38;#39;, &#38;#39;&#38;amp;&#38;#39;);

    print_r($query_string);

    return &#38;#39;&#38;amp;&#38;#39; . $query_string;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;When I have some progress I post here.&#60;/p&#62;
&#60;p&#62;Cheers
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-80193</link>
			<pubDate>Wed, 10 Oct 2012 19:15:57 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">80193@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Can you echo the $query_string before it's returned from your function to be sure everything is present as you expect it? You may have to urlencode this &#60;strong&#62;&#34;entry[12] cotas reembols&#38;aacute;veis para o evento $entry[13]&#34;&#60;/strong&#62; or something like that.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>brubrant2 on "Extra data to order summary paypal via gform_paypal_query hook"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/extra-data-to-order-symmary-paypal-via-gform_paypal_quer-hook#post-80181</link>
			<pubDate>Wed, 10 Oct 2012 18:50:23 +0000</pubDate>
			<dc:creator>brubrant2</dc:creator>
			<guid isPermaLink="false">80181@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Anyone know if is there possible to add extra data to order summary of paypal?&#60;/p&#62;
&#60;p&#62;Order Summary &#60;a href=&#34;http://imageshack.us/a/img32/9984/paywithapaypalaccountpa.png&#34; rel=&#34;nofollow&#34;&#62;http://imageshack.us/a/img32/9984/paywithapaypalaccountpa.png&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;I tried to send &#60;code&#62;transaction_subject&#60;/code&#62; variable through &#60;code&#62;gform_paypal_query&#60;/code&#62; but does not work.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_filter(&#38;#39;gform_paypal_query&#38;#39;, &#38;#39;update_paypal_query&#38;#39;, 10, 3);

function update_paypal_query($query_string, $form, $entry){

	//put PayPal querystring into an array
    parse_str($query_string, $query);

    $query[&#38;#39;transaction_subject&#38;#39;] = &#38;quot;$entry[12] cotas reembols&#38;amp;aacute;veis para o evento $entry[13]&#38;quot;;

    $query_string = http_build_query($query, &#38;#39;&#38;#39;, &#38;#39;&#38;amp;&#38;#39;);

    return &#38;#39;&#38;amp;&#38;#39; . $query_string;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;References:&#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_admin_IPNIntro&#34; rel=&#34;nofollow&#34;&#62;https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&#38;amp;content_ID=developer/e_howto_admin_IPNIntro&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_WebsitePaymentsStandard_IntegrationGuide.pdf&#34; rel=&#34;nofollow&#34;&#62;https://cms.paypal.com/cms_content/US/en_US/files/developer/PP_WebsitePaymentsStandard_IntegrationGuide.pdf&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Any thoughts will be apreciated, thanks all!
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
