query($sql); if ($result->num_rows > 0) { # echo $sql; $User_Data_array = $result->fetch_assoc(); $AC_ID = $User_Data_array["AC_ID"]; $Sub_Desc = $User_Data_array["Sub_Desc"]; $Sub_Start = $User_Data_array["Sub_Start"]; $Sub_Stop = $User_Data_array["Sub_Stop"]; $Sub_Cost = $User_Data_array["Sub_Cost"]; $First_Name1 = $User_Data_array["First_Name"]; $Last_Name = $User_Data_array["Last_Name"]; $Email = $User_Data_array["Email"]; $Phone_No = $User_Data_array["Phone_No"]; $Account_Type_ID = $User_Data_array["Account_Type_ID"]; $Salutation = $User_Data_array["Salutation"]; $Title = $User_Data_array["Title"]; $Security_Code = $User_Data_array["Security_Code"]; $Account_Status = $User_Data_array["Account_Status"]; $C_Name = $User_Data_array["C_Name"]; $C_Date = $User_Data_array["C_Date"]; $M_Name = $User_Data_array["M_Name"]; $M_Date = $User_Data_array["M_Date"]; $User_Bio = $User_Data_array["User_Bio"]; $Terms_Approved = $User_Data_array["Terms_Approved"]; $User_Image = $User_Data_array["profile_image"]; $User_Type = $User_Data_array["User_Type"]; $User_Image_Small = $User_Data_array["profile_image_small"]; $Stripe_Cust_ID = ["User_Invitation_Key"]; $trial_end = date('Y-m-d', strtotime($C_Date. ' + 7 days')); } require_once('../login/vendor/autoload.php'); \Stripe\Stripe::setApiKey("sk_live_RZMMcsuePJVrhMQG1Wa1TqFe"); $Stripe_Email = $Email; $customer = \Stripe\Customer::all(["email" => $Stripe_Email]); $cust = $customer->data[0]->id; //$cust = "cus_GsvF8ddBmMUCIT"; //$customer = \Stripe\Customer::retrieve($Stripe_Cust_ID); #$plan = \Stripe\Plan::retrieve($plan); #echo $plan['nickname']; $sub = \Stripe\Subscription::all(array('customer'=>$cust,'limit'=>10)); $Price = $sub->data[0]->items->data[0]->plan->amount; #$Sub_Stop = "Subscription Period " . date('F j, Y', $sub->data[0]->current_period_start) . " thru " . date('F j, Y', $sub->data[0]->current_period_end); #echo $sub->data[0]->items->data[0]->plan->nickname; #$Sub_Desc = $sub->data[0]->items->data[0]->plan->nickname; #$Sub_Stop = date('F j, Y', $sub->data[0]->current_period_end); #require_once("../include/ActiveCampaign.class.php"); #$ac = new ActiveCampaign(ACTIVECAMPAIGN_URL, ACTIVECAMPAIGN_API_KEY); #$ac->version(2); #$acuser = $ac->api("contact/view?id=$AC_ID"); #$acuser = json_decode(json_encode($acuser), true); #$Sub_Desc = $acuser[fields][51]["val"]; #$Sub_Stop = $acuser[fields][52]["val"]; ?>