PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Retrieve paid entries

  1. Is it possible to get all the leads for which the payment status is approved?

    I am currently using the following function to retrive all leads to display them on the front end.

    RGFormsModel::get_leads();

    But that does not support filtering results by payment status.

    Any help?

    Posted 11 years ago on Wednesday February 6, 2013 | Permalink
  2. RGFormsModel::get_leads(); will return an array of leads and in that array is the payment status. Here is an example of one lead or all the leads returned for one for with get_leads():

    [3] => Array
    	(
    		[id] => 1478
    		[form_id] => 89
    		[date_created] => 2013-01-05 15:34:53
    		[is_starred] => 0
    		[is_read] => 1
    		[ip] => 67.111.123.108
    		[source_url] => http://example.com/category/outings/
    		[post_id] =>
    		[currency] => USD
    		[payment_status] =>
    		[payment_date] =>
    		[transaction_id] =>
    		[payment_amount] =>
    		[is_fulfilled] =>
    		[created_by] =>
    		[transaction_type] =>
    		[user_agent] => Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0; BOIE9;ENUS)
    		[status] => active
    		[1.3] => Will
    		[1.6] => Brimley
    		[4] => none
    		[11] => none
    		[21] => 708-555-1212
    		[23] => 312-555-1212
    		[15.1] => I agree
    		[8.3] => Sandy
    		[8.6] => Bottoms
    		[24] => sandyb@sbcglobal.net
    		[3] =>
    		[22] =>
    		[10] =>
    	)

    In the function you are using to display the leads, test for the existence of $lead['payment_status'] = 'Approved' before echoing the lead. If you show us how you are displaying the leads currently, we can help you with the conditional test of the payment before you display the lead.

    Posted 11 years ago on Wednesday February 6, 2013 | Permalink