<?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: Check Payment Status &#38; Pay Later</title>
		<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later</link>
		<description>Gravity Support Forums Topic: Check Payment Status &amp; Pay Later</description>
		<language>en-US</language>
		<pubDate>Sat, 04 Apr 2026 09:18:16 +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/check-payment-status-pay-later" rel="self" type="application/rss+xml" />

		<item>
			<title>Chris Hajer on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-81835</link>
			<pubDate>Wed, 17 Oct 2012 20:55:08 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">81835@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@bluantinoo - please begin a new topic for your issue and we will address it there. Please clearly explain what you would like to do when you create your topic.  You can include a link to this topic if you like.  Thank you.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>bluantinoo on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-81782</link>
			<pubDate>Wed, 17 Oct 2012 15:33:13 +0000</pubDate>
			<dc:creator>bluantinoo</dc:creator>
			<guid isPermaLink="false">81782@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Hi all, very nice post! i have a similar situation, except that the price for my product is not predetermined.&#60;br /&#62;
So I should build the Paypal button/link based on each entry total price before sending it to user email.&#60;br /&#62;
Anyone has some suggestion on how it could be achieved?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78554</link>
			<pubDate>Tue, 02 Oct 2012 17:27:23 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">78554@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;@David Peralty Genius! I will look into that and let you know how it goes.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>David Peralty on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78552</link>
			<pubDate>Tue, 02 Oct 2012 17:25:30 +0000</pubDate>
			<dc:creator>David Peralty</dc:creator>
			<guid isPermaLink="false">78552@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Maybe somehow hooking it into WP Cron? &#60;a href=&#34;http://codex.wordpress.org/Function_Reference/wp_cron&#34; rel=&#34;nofollow&#34;&#62;http://codex.wordpress.org/Function_Reference/wp_cron&#60;/a&#62;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78550</link>
			<pubDate>Tue, 02 Oct 2012 17:23:08 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">78550@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, I believe I have solved this issue. The code is here: &#60;a href=&#34;http://pastebin.com/t2UXwzSW&#34; rel=&#34;nofollow&#34;&#62;http://pastebin.com/t2UXwzSW&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;This checks all of my entries that have been posted, if they are +24hours from created day &#38;amp; their payment status is Processing, they will be deleted. I am using the function in the header.php file, so it gets fired and checks on page load. In this function I have it displaying a list of entries and it shows a countdown until they will be deleted... I will most likely use this in the backend of my site later on. &#60;/p&#62;
&#60;p&#62;Is there a way to make this happen without it being triggered on page load? Because lets say 25 hours goes by and no one goes to the site.. An entry will still be in the database for that extra hour, correct?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78523</link>
			<pubDate>Tue, 02 Oct 2012 14:45:47 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">78523@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;However, this does not break the site. I am just not sure the logic is correct on this.. My brain is a little scrambled right now. It seems to delete the entry regardless of the time parameters within our conditional statement... &#60;/p&#62;
&#60;p&#62;I have gf_published_entry_time() in my header.php file to it is triggered on page load.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function gf_published_entry_time( $entry, $form ) {

	// Get all Entries for our form ID 1
	$entries =  RGFormsModel::get_leads(1, &#38;#39;&#38;#39;, &#38;#39;DESC&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;0&#38;#39;, &#38;#39;99999999&#38;#39;);
	foreach ($entries as $entry){

		// Created on
		$time = strtotime($entry[&#38;#39;date_created&#38;#39;]);
		// Time on Day Ago
		$one_day_ago = strtotime(&#38;#39;-24 hour&#38;#39;);

		if(
			$entry[&#38;#39;payment_status&#38;#39;] == &#38;#39;Processing&#38;#39; &#38;amp;&#38;amp;
			$time &#38;lt;= $one_day_ago
		){
			// it&#38;#39;s sooner than one day ago
			$time_left = $time - $one_day_ago;
			$days_left = floor($time_left / 86400); // 86400 = seconds per day
			$hours_left = floor(($time_left - $days_left * 86400) / 3600); // 3600 = seconds per hour
			echo &#38;#39;Created On: &#38;#39;.$entry[&#38;#39;date_created&#38;#39;];
			echo &#38;quot; Still $days_left day(s), $hours_left hour(s) to go until it is past due.&#38;lt;br/&#38;gt;&#38;quot;;
		} else {
			// Delete Appropriate Entries
			my_remove_entries();
		}

	}

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78520</link>
			<pubDate>Tue, 02 Oct 2012 14:33:03 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">78520@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Tried adding in your statement. It breaks my site if I add it in like so:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function gf_published_entry_time( $entry, $form ) {

	// Get all Entries for our form ID 1
	$entries =  RGFormsModel::get_leads(1, &#38;#39;&#38;#39;, &#38;#39;DESC&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;0&#38;#39;, &#38;#39;99999999&#38;#39;);
	foreach ($entries as $entry){

		if(
			($entry[&#38;#39;payment_status&#38;#39;] == &#38;#39;Processing&#38;#39;) &#38;amp;&#38;amp;
			(strtotime(&#38;quot;$entry[&#38;#39;date_created&#38;#39;] +24 hour&#38;quot;) &#38;lt;= time())
		){
			echo &#38;#39;Created On: &#38;#39;.$entry[&#38;#39;date_created&#38;#39;];
		} else {
			// Delete Appropriate Entries
			echo &#38;#39;Delete&#38;#39;;
		}

	}

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78218</link>
			<pubDate>Sun, 30 Sep 2012 21:59:45 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78218@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Sorry, I was working on my solution and posted after you posted your code.  I did not look at your approach at all, but I think it's similar.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Chris Hajer on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78217</link>
			<pubDate>Sun, 30 Sep 2012 21:59:06 +0000</pubDate>
			<dc:creator>Chris Hajer</dc:creator>
			<guid isPermaLink="false">78217@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;In this line:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if($entry[&#38;#39;payment_status&#38;#39;] == &#38;#39;Processing&#38;#39;){&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;you need to say something like:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;[php]
if(($entry[&#38;#39;payment_status&#38;#39;] == &#38;#39;Processing&#38;#39;) &#38;amp;&#38;amp; (strtotime(&#38;quot;$entry[&#38;#39;date_created&#38;#39;] +24 hour&#38;quot;) &#38;lt;= time())){&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I tested the function but did not verify the logic in all cases.   Please be sure it is checking for entries older than 24 hours.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>iamdangavin on "Check Payment Status &#38; Pay Later"</title>
			<link>https://legacy.forums.gravityhelp.com/topic/check-payment-status-pay-later#post-78216</link>
			<pubDate>Sun, 30 Sep 2012 21:46:42 +0000</pubDate>
			<dc:creator>iamdangavin</dc:creator>
			<guid isPermaLink="false">78216@https://legacy.forums.gravityhelp.com/</guid>
			<description>&#60;p&#62;Okay, I am on to something here... I am using this function to check every entry and let me know if 1 day has passed since they have signed up. I will work on rolling this into the delete function that I posted above. I will get back to you shortly on it.&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function gf_published_entry_time( $entry, $form ) {

	// Get all Entries for our form ID 1
	$entries =  RGFormsModel::get_leads(1, &#38;#39;&#38;#39;, &#38;#39;DESC&#38;#39;, &#38;#39;&#38;#39;, &#38;#39;0&#38;#39;, &#38;#39;99999999&#38;#39;);
	foreach ($entries as $entry){

		$time = strtotime($entry[&#38;#39;date_created&#38;#39;]);
		$one_day_ago = strtotime(&#38;#39;-1 day&#38;#39;);

		if( $time &#38;gt; $one_day_ago ) {
		    // it&#38;#39;s sooner than one day ago
		    $time_left = $time - $one_day_ago;
		    $days_left = floor($time_left / 86400); // 86400 = seconds per day
		    $hours_left = floor(($time_left - $days_left * 86400) / 3600); // 3600 = seconds per hour
		    echo &#38;quot;Still $days_left day(s), $hours_left hour(s) to go.&#38;quot;;
		} else {
			echo &#38;#39;It has been longer than one day!&#38;#39;;
		}

	}

}&#60;/code&#62;&#60;/pre&#62;</description>
		</item>

	</channel>
</rss>
