- Posts: 12
- Thank you received: 0
Offline payment - status 'active' & JUG update
- Paulzero
- Topic Author
- Offline
- New Member
-
Less
More
10 years 1 month ago #59142
by Paulzero
Offline payment - status 'active' & JUG update was created by Paulzero
Hi Tuan,
Thank you for the new features of OSM 1.6.9 especially the ability to restrict a payment method to a specific JUG.
For my Clients 'Sales Agents' using the 'Offline' payment (= Account Payment) method I need to have the 'Offline' payments plugin set subscription status to 'Active' & run all the Joomla group JUG plugins so my Clients 'Sales Agents' can immediately access restricted contend (Content restricted by JUG membership) without having to Logout - Login.
In effect I need the 'Offline' payments plugin to act like any other payment plug would act after it receives confirmation of payment. A such I've modified the 'Offline.php' payments plugin a little. Here is my version of 'components/com_osmembership/plugins/os_offline.php' (I took inspiration from your Forum post by Marie-Anne Melis ' joomdonation.com/forum/membership-pro/44...us-active.html#52412 ' :
function processPayment($row, $data)
{
$Itemid = JRequest::getint('Itemid');
$row->published = 1;
$row->store();
$config = OSMembershipHelper::getConfig() ;
OSMembershipHelper::sendEmails($row, $config);
JPluginHelper::importPlugin('osmembership');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onMembershipActive', array($row));
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_osmembership&view=complete&act='.$row- >act.'&subscription_code='.$row->subscription_code.'&Itemid='.$Itemid, false, false));
The result is Subscription 'Status' is set to 'Active' but 'onMembershipActive' does not appear to run (Subscriber not added to JUG's as specified in 'Plan' setup). Manual change of same 'Plan' status from 'Pending' to 'Active' does add Subscriber to JUG's) - In 1.6.9 is 'onMembershipActive' the right function to call ? Please advise if there a simple code fix.
Thanks again,
Paul Zero.
Thank you for the new features of OSM 1.6.9 especially the ability to restrict a payment method to a specific JUG.
For my Clients 'Sales Agents' using the 'Offline' payment (= Account Payment) method I need to have the 'Offline' payments plugin set subscription status to 'Active' & run all the Joomla group JUG plugins so my Clients 'Sales Agents' can immediately access restricted contend (Content restricted by JUG membership) without having to Logout - Login.
In effect I need the 'Offline' payments plugin to act like any other payment plug would act after it receives confirmation of payment. A such I've modified the 'Offline.php' payments plugin a little. Here is my version of 'components/com_osmembership/plugins/os_offline.php' (I took inspiration from your Forum post by Marie-Anne Melis ' joomdonation.com/forum/membership-pro/44...us-active.html#52412 ' :
function processPayment($row, $data)
{
$Itemid = JRequest::getint('Itemid');
$row->published = 1;
$row->store();
$config = OSMembershipHelper::getConfig() ;
OSMembershipHelper::sendEmails($row, $config);
JPluginHelper::importPlugin('osmembership');
$dispatcher = JDispatcher::getInstance();
$dispatcher->trigger('onMembershipActive', array($row));
JFactory::getApplication()->redirect(JRoute::_('index.php?option=com_osmembership&view=complete&act='.$row- >act.'&subscription_code='.$row->subscription_code.'&Itemid='.$Itemid, false, false));
The result is Subscription 'Status' is set to 'Active' but 'onMembershipActive' does not appear to run (Subscriber not added to JUG's as specified in 'Plan' setup). Manual change of same 'Plan' status from 'Pending' to 'Active' does add Subscriber to JUG's) - In 1.6.9 is 'onMembershipActive' the right function to call ? Please advise if there a simple code fix.
Thanks again,
Paul Zero.
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.