Can you explain when the "Payment Information - Status" field is changed?

  • Stuckshutter
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 1 month ago #123393 by Stuckshutter
I've looked all over but can't find an answer in spite of reading all the posts on Status...

My question is: When does the Payment Information "Status" field change from Active to Expired and when does Expired get changed to Active?

Is this an indication that the Plan the user has is no longer active or does it mean the payment failed?

We want to use the Status field to quickly determine if a user's plan is active or expired in another program where we'll use it to set the user group of the subscriber.

Thanks,
Stuck

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #123399 by Tuan Pham Ngoc
Hi Stuck

1. When users subscribe for your plan and make payment, the status will become Active. If no payment is made, the Status remain Pending

2. When current date > To Date of the subscription, the system will change status of the subscription to expired

So Yes, you can use data from published field to determine of the subscription is active or expired:

0: Pending
1: Active
2: Expired

Regards,

Tuan

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #123400 by Tuan Pham Ngoc
If your program is Joomla! extension, then you can use built-in method to get ID of plans which user has active subscription:
Code:
require_once JPATH_ADMINISTRATOR . '/components/com_osmembership/loader.php'; $activePlans = OSMembershipHelper::getActiveMembershipPlans();
After the above command, $activePlans will contain IDs of all plans which user has acive subscription. Check to see whether that array contain ID of the plan you want to check and do further logic you want base on that data

Tuan

Please Log in or Create an account to join the conversation.

  • Stuckshutter
  • Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
5 years 1 month ago #123404 by Stuckshutter
Hi Tuan,
Very helpful and complete answers, this is a big help.
Much appreciated.
Stuck (no more)

Please Log in or Create an account to join the conversation.

More
5 years 1 month ago #123406 by Tuan Pham Ngoc
Great. Happy to hear that it's useful

Tuan

Please Log in or Create an account to join the conversation.