Paypal Post IPN handeling nightmare

I ended up using kind of a hack. I made a hidden field that was populated with the user ID. I then used this to update metas and what not on a successful IPN and or successful payment. Ie:

add_filter("gform_paypal_post_ipn", "update_order_status", 10, 4);
function update_order_status($ipn_post, $entry, $config, $cancel){

    // if the IPN was canceled, don't process
    if($cancel)
        return;

    $currUID = $entry["8"] // The Input # of your hidden ID field

    update_user_meta($currUID, 'eventRegistration', 1);

    return; 
}

The Database checking I handled by on the template level by having it check the wp_rg_lead table to see if the current user has an entry for the appropriate form id with a payment status of ‘Pending’ or ‘Approved’. If so, display that there has been a purchase already associated with the account and to contact support if there has been any error. The SQL looks something like this (not on the same computer, so going off the top of my head) :

 $trans_type = $wpdb->get_col( $wpdb->prepare( 
     "
     SELECT wp_rg_lead.transaction_status
     FROM wp_rg_lead
     WHERE wp_rg_lead.form_id = 1 AND wp_rg_lead.created_by = %s
     ",
     $txn_id 
     ) ); 

Then my IF/THEN was simply something like:

if ( $trans_type == 'Pending' || $trans_type == 'Approved' ) {
    // If the user has a transaction pending or accepted do this
} else {
    // If not, do this
}

I hope this helps someone out in a similar situation!