I am using the session variables to read the payments received. But it only generates it for active subscriptions. Is it possible to use the session variables to pull up payments for expired subscriptions too?
Should be if you add condition to your existing code to list along the lines of testing if membership has expired. $mem_status = '2' for expired active is '1'. '0' is pending PHP: $mem_status = ($_SESSION['_amember_user'][status]); Above gives overall status of member but there is also available in aMember another array '$member['data']['status']' where data is product id and status is status for that particular product.
Thanks for the reply but I am actually interested in retrieving payments for all purchases. I wish to generate a payment history for a customer account without having to use using mysql code. Right now I am using the following code example for pulling up payments: Code: $subscriptions = $_SESSION['_amember_subscriptions']; $payment = $subscriptions[$i][amount] In the loop for $i, I can retreive all payments a customer has made. However, this will only work for active subscriptions and is not displaying payments for old expired subscriptions. I would like it to generate payments for all subscriptions (expired and not expired).
Yes you need to query for all payments: Code: include "/full/path/to/amember/config.inc.php"; $payments = $db->get_user_payments($_SESSION[_amember_id], 1); // Will return all completed payments(active/expired)