<?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: Help With gform_after_submission</title>
		<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission</link>
		<description>Gravity Support Forums Topic: Help With gform_after_submission</description>
		<language>en-US</language>
		<pubDate>Sun, 19 Apr 2026 21:44: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/help-with-gform_after_submission" rel="self" type="application/rss+xml" />

		<item>
			<title>David Peralty on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64766</link>
			<pubDate>Wed, 04 Jul 2012 13:08:40 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">64766@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;It isn't working because it doesn't work the way you think it does. What is happening is that behind the scenes, WordPress is now sending that data to your other page, and waiting for that page to send a response. &#60;/p&#62;
&#60;p&#62;You are expecting it to work like a normal POST call, like if you had changed where the form submits to, but that's not how this works. &#60;/p&#62;
&#60;p&#62;That is why you were receiving data back sometimes before in your previous attempt because where you were submitting the data was receiving it, and sending a result back. Now, you are sending to another page, and it probably won't receive a response back. &#60;/p&#62;
&#60;p&#62;Did you read through the article I posted earlier?&#60;br /&#62;
&#60;a href=&#34;http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/&#34; rel=&#34;nofollow&#34;&#62;http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Some people call this using an API. You send an external site or service some data, and they send back details so that you can then use it or whatnot. &#60;/p&#62;
&#60;p&#62;So when you had&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
Sometimes I can catch this:&#60;br /&#62;
Array ( [chargetotal] =&#38;gt; 32 [mode] =&#38;gt; Fullpay [storename] =&#38;gt; 1001294132 [txntype] =&#38;gt; sale )&#60;br /&#62;
but I don't know what to do with it :)
&#60;/p&#62;&#60;/blockquote&#62;
&#60;p&#62;You were sending data to the service, and those were the details it sent back to you. &#60;/p&#62;
&#60;p&#62;You could then echo out a message to users letting them know that things worked, or you can ignore this response because things are working. Either way, this was working how it is intended. &#60;/p&#62;
&#60;p&#62;Users will not be redirected anywhere, values will not show up on another page. The function you are working with sends data behind the scenes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64762</link>
			<pubDate>Wed, 04 Jul 2012 12:56:06 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">64762@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, I've simplified this a bunch. No more redirect, just a straight form submitted to another page on the site. I'll submit to the payment gateway from there.  I have the following code to gather the post variables:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;add_action(&#38;#39;gform_after_submission&#38;#39;, &#38;#39;post_to_third_party&#38;#39;, 10, 2);
function post_to_third_party($entry, $form) {

    $post_url = &#38;#39;another-page-on-the-site&#38;#39;;
    $body = array(
            &#38;#39;first_name&#38;#39; =&#38;gt; $entry[&#38;#39;1.3&#38;#39;],
            &#38;#39;last_name&#38;#39; =&#38;gt; $entry[&#38;#39;1.6&#38;#39;],
	    &#38;#39;chargetotal&#38;#39; =&#38;gt; $entry[&#38;#39;5&#38;#39;],
	    &#38;#39;test&#38;#39; =&#38;gt; &#38;#39;test&#38;#39;,
        );
	if( !class_exists( &#38;#39;WP_Http&#38;#39; ) )
	include_once( ABSPATH . WPINC. &#38;#39;/class-http.php&#38;#39; );

	$request = new WP_Http();
    $result = $request-&#38;gt;post($post_url, array(&#38;#39;body&#38;#39; =&#38;gt; $body));
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This line on the receiving page&#60;br /&#62;
&#60;code&#62;var_dump($result[&#38;#39;response&#38;#39;]);&#60;/code&#62;&#60;br /&#62;
results in a NULL&#60;br /&#62;
and none of the $body variables prints, not even the hard-coded test variable.&#60;/p&#62;
&#60;p&#62;Any idea why the function is not working?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64671</link>
			<pubDate>Tue, 03 Jul 2012 22:57:37 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">64671@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Here's the problem as I see it: I need to submit the main registration form to a redirect page which then sends the form to either a financial aid form or the payment gateway. I can't use GET variables because I need to specify the URLs on the redirect page. So I need to pass POST variables. That seems to mean that I need to use the gform_after_submission post_to_third_party function in the Documentation here:&#60;br /&#62;
&#60;a href=&#34;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#34; rel=&#34;nofollow&#34;&#62;http://www.gravityhelp.com/documentation/page/Gform_after_submission&#60;/a&#62;&#60;br /&#62;
But I can't get the $body array variables to pass.&#60;/p&#62;
&#60;p&#62;On my test site, I've tried ditching the redirect page and submitting the form to a page on my own test site where I can ask for variables and check whether they're coming through. But they're not. Adding&#60;br /&#62;
	print_r ($result['response']);&#60;br /&#62;
to the function results in nothing.&#60;/p&#62;
&#60;p&#62;A GET variable comes through okay, but that doesn't work for a redirect page, as detailed above. &#60;/p&#62;
&#60;p&#62;Sometimes I can catch this:&#60;br /&#62;
Array ( [chargetotal] =&#38;gt; 32 [mode] =&#38;gt; Fullpay [storename] =&#38;gt; 1001294132 [txntype] =&#38;gt; sale )&#60;br /&#62;
but I don't know what to do with it :)
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64624</link>
			<pubDate>Tue, 03 Jul 2012 17:56:31 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">64624@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Have you checked with linkpointcentral to see if they are getting any data? Have you tried printing out the $result['response'] to see if things worked okay? Do they have an API that allows a response code through this method?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64579</link>
			<pubDate>Tue, 03 Jul 2012 13:26:45 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">64579@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, I've figured out why #gf_2 was appended to the URL -- it's because I was testing from the Form Preview instead of from the page that the form is on. Duh.&#60;/p&#62;
&#60;p&#62;But testing from the form on the published page still results in no post variables being passed, as far as I can tell.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64549</link>
			<pubDate>Tue, 03 Jul 2012 11:28:22 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">64549@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have a form which submits to a redirect page. Based on a yes/no answer in a radio choice field (&#34;Are you in need of financial aid?&#34;, the form is redirected either to a financial aid application or the payment gateway ( &#60;a href=&#34;https://www.linkpointcentral.com/lpc/servlet/lppay&#34; rel=&#34;nofollow&#34;&#62;https://www.linkpointcentral.com/lpc/servlet/lppay&#60;/a&#62; ). I've set up the gform_after_submission post_to_third_party function to post to that same URL. But when I submit the form, it submits to &#60;a href=&#34;https://www.linkpointcentral.com/lpc/servlet/lppay#gf_2&#34; rel=&#34;nofollow&#34;&#62;https://www.linkpointcentral.com/lpc/servlet/lppay#gf_2&#60;/a&#62;. Why is it appending the id of the form to the URL? &#60;/p&#62;
&#60;p&#62;Code for redirect template and post_to_third_party() is here:&#60;br /&#62;
&#60;a href=&#34;http://pastebin.com/9iLhRpmR&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/9iLhRpmR&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64511</link>
			<pubDate>Tue, 03 Jul 2012 08:04:00 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">64511@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;gform_after_submission doesn't control redirects without having code to redirect people. The function passes data behind the scenes. &#60;/p&#62;
&#60;p&#62;See this post:&#60;br /&#62;
&#60;a href=&#34;http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/&#34; rel=&#34;nofollow&#34;&#62;http://planetozh.com/blog/2009/08/how-to-make-http-requests-with-wordpress/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Hopefully, it should help you understand better what people are doing with WP_Http;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>callibeth on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-64485</link>
			<pubDate>Tue, 03 Jul 2012 01:30:11 +0000</pubDate>
			<dc:creator>callibeth</dc:creator>
			<guid isPermaLink="false">64485@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I'm also interested in this question. I have added a gform_after_submission function which I'm fairly sure is accurate, but the form does not go to the payment gateway. What setting am I missing? Could you explain a little more specifically what that function accomplishes?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>revrandy on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-55030</link>
			<pubDate>Thu, 12 Apr 2012 10:35:16 +0000</pubDate>
			<dc:creator>revrandy</dc:creator>
			<guid isPermaLink="false">55030@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I do know if I echo $response it just says Array
&#60;/p&#62;</description>
		</item>
		<item>
			<title>revrandy on "Help With gform_after_submission"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/help-with-gform_after_submission#post-55029</link>
			<pubDate>Thu, 12 Apr 2012 10:30:48 +0000</pubDate>
			<dc:creator>revrandy</dc:creator>
			<guid isPermaLink="false">55029@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;I have all the $body = array fields assigned and working correctly. I added a additional 'submit' =&#38;gt; 'submit' to the array as submit did not have a name=.&#60;/p&#62;
&#60;p&#62;The form still does not redirect to the payment gateway but remains on the page the form is on. Is there something else I may need to add to the code to have it post to the payment gateway.&#60;/p&#62;
&#60;p&#62;I double checked a html from I made with required fields and it will post so I am pretty sure I have all the required fields.&#60;/p&#62;
&#60;p&#62;Thanks for your assistance
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
