sample payment query and question

Discussion in 'Integration' started by marcel, Aug 19, 2005.

  1. marcel

    marcel New Member

    Joined:
    Aug 18, 2005
    Messages:
    7
    Sample code for a payment query on member_id --> 1
    How do I get a list of payments in a date range ?

    PHP:
    <?php 

    include("../config.inc.php");

     
    $pl = array();  
     
     
    $dat date('Y-m-d');  
     
     foreach (
    $db->get_user_payments(10) as $p){  
     
        if ((
    $p['begin_date']<=$dat) && ($p['expire_date']>=$dat)){  
     
           
    $pl[] = $p;  


    foreach (
    $pl as $key => $value)
        {
            if(
    is_array($value))
            {
                
            foreach (
    $value as $keyv => $valuev)
                {
                    echo 
    "$keyv => $valuev <br>";
                }
            }
        }
     
        }  
     
     }   


    ?>

    Marcel
    http://businessletters.com
    http://01businesses.com
  2. alex

    alex aMember Pro Customer Staff Member

    Joined:
    Jan 24, 2004
    Messages:
    6,021
    You may filter it in PHP code.
    $p['tm_added'] contains time of record addition (invoice creation)
    $p['tm_completed'] contains time when record was marked as paid;

Share This Page