- Posts: 1
- Thank you received: 0
unsubscribe user in payment plugin
- DannyB
- Topic Author
- Offline
- New Member
-
Less
More
9 years 3 months ago #73514
by DannyB
unsubscribe user in payment plugin was created by DannyB
Hello Tuan
I created a plugin to subscribe with SMS.
plan = lifetime (until user sends 'stop'), every week user get paid sms.
Everything works smooth.
Only 1 problem:
When user send 'stop' the user need to be removed from the paid group.
I set 'published' to 2 (expired) , but user is still active in the paid group.
I think i need to add some magic code to remove user from the paid group.
I could do this with joomla api , but maybe is there a function 'unsubribe', i can not find that.
any idea?
another question:
if user is expired, the user can create a new subscription i think?
By the way, creating plugins and setting up the component was easy. Me and my customer are very happy
I created a plugin to subscribe with SMS.
plan = lifetime (until user sends 'stop'), every week user get paid sms.
Everything works smooth.
Only 1 problem:
When user send 'stop' the user need to be removed from the paid group.
I set 'published' to 2 (expired) , but user is still active in the paid group.
I think i need to add some magic code to remove user from the paid group.
I could do this with joomla api , but maybe is there a function 'unsubribe', i can not find that.
any idea?
another question:
if user is expired, the user can create a new subscription i think?
By the way, creating plugins and setting up the component was easy. Me and my customer are very happy

Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Away
- Administrator
-
9 years 3 months ago #73540
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic unsubscribe user in payment plugin
Hi Danny
You can simply trigger onMembershipExpire event. For example, use this code:
$row is a subscription record object.
Regards,
Tuan
You can simply trigger onMembershipExpire event. For example, use this code:
Code:
JPluginHelper::importPlugin('osmembership');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onMembershipExpire', array($row));
$row is a subscription record object.
Regards,
Tuan
Please Log in or Create an account to join the conversation.
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.