Hello,
I’m working on an online education site that will have a six month membership with an option to renew. I REALLY don’t want to have to do it manually, as I am a part owner of the company. So I came up with the following extension & php script to run as a cron job to try to do the trick.
I would appreciate it if people would be willing to look at this, tell me what they think & feel free to borrow if it would help them out. However, I have a couple of concerns. This method is completely depends on getting the ping back from Paypal and changing their member group. I have read that it’s not always reliable (is this true?)
So a member who has not paid is in the default member group of ‘4’. I will have their member group change to ‘7’ upon the ping from PayPal. Do you think the page they are returned to after purchase could have a “success” message, or conditionals to see if they are still in member group ‘4’ and tell them there was a problem receiving info from paypal, and they should email us with their info. Or is this unprofessional?
Other admins will have access to SCM, but not Extensions, so I have this making a new table with the info I want, to help to protect from other Admins from “cleaning things up” and messing up the system. That being said, I would love suggestions on how to get stuff into the DB without having to enter stuff manually.
Any and all suggestions/feedback is much appreciated.
Regards,
-greg
This method is completely depends on getting the ping back from Paypal and changing their member group. I have read that it’s not always reliable (is this true?)
Hi Greg -
I’m using SCM & member group changes on one of my own sites. I’m interested in this extension for use there as well, so will find time to look at it over the next couple of days.
I’ve not yet had any issues with people paying through PP and not getting the ping back - and that’s with a few hundred instances.
Sounds interesting. I’ll have a look as well as soon as time permits. Thus a feature could really be very useful in some cases.
Of course, every action handled by the SCM (or any shop automation using PayPal) will depend to the IPN PayPal sends as a pingback. My concern always was when having multiple courses/products - I only can change the member group tio the one associated with the last successful payment. But I’ll need to digg into your code over the weekend first to give some qualified comments.
Thanks for sharing! Markus
Markus:
For what it’s worth, at this time, we are only running one course, but in the next couple of years it could expand, so that’s something I definitely need to take into consideration. Off the top of my head, maybe have different member groups, but also reference the id of the purchase in the db to give them permissions? Oh wow, this could grow into a monster! 😉
If you care, I’m using code igniter to populate a dynamic flash-driven practice test, and I’m using standard EE weblog stuff to do the rest of the site with some custom modules & plugins. I’m EXTREMEMLY excited that the 2.0 will be on top of CI, as I can’t wait to see how it will all integrate! =)
I appreciate you checking this out, and look forward to comments!
Regards,
-greg
OK - taking a couple minutes to look at this.
Keep in mind I’m not a PHP guy - so it’s likely I’m not fully understanding the code..😉
I think overall the approach looks promising for my needs - which are essentially just rolling back a person from a “customer” member group to a “member” member group if their last purchase date is older than a set amount of time.
However I’d want an interface where I could set/choose the member group ID’s, change the text of the emails that get sent, change the timeframe for the rollback etc. I almost wonder if what I’m after is more of a module rather than an extension.
Michael,
Thanks for the response.
I am a PHP guy “wanna-be,” so I’m trying hard here. 😉
I have been thinking about this, and I am expanding to allow for different user groups to have different expiration times, etc.
I think this can be accomplished with settings on the extension & a plugin for the cron-job.
I will keep tinkering, probably ask some questions on the boards for the real “php guys & gals” and re-upload on this thread when I have something.
Kindest Regards,
-greg
Hi Greg, this looks to be a really interesting extension. On first inspection of the code my first thoughts are could this be achieved by just adding a custom member field for renewal date rather than adding a new table?
I’m sure there is a simple reason for having taken this approach but if you had the renewal date in a custom member field you could call it up on member pages so that a member could see when they renewed and you could also then display an expiry date. :?
Finally, perhaps I am being daft but which file do you call with the CRON job? Or are you using the EE Cron Plug-in? It would be great to see this develop into a module with an interface to show subscriptions, expiry dates etc for members.
Some more feedback for you Greg!
It looks as though this extension sets the ‘renewal_date’ for a returning (not new) member to ‘today’. Would it not make more sense to set the renewal date to the expiry date ‘if’ the renewal date has not yet passed? This would allow members to renew prior to membership expiring if they wished.
😊
Hi Greg, I’m about to pick this ext up and use it to try and implement expiry of membership on a site we are working on so I just wanted to check if you had any further updates for us. Could you also confirm where we should be placing the ‘expireUSers.php’ file? I’m assuming it should be a page template with PHP enabled which is called by a EE cron job?
Well I’m right in the thick of using this script as a starting point, just thought I should point out that while the extension creates a table called ‘exp_paid_members’ the PHP in the actual extension tries to interact with a table called ‘exp_paid_users’ so I’ve had to update the table references in the PHP at this end to reflect that. I’m also setting the renew date in the exp_paid_members table to $today+31556926 (12 months) in my case and setting the renew date for already paid members to the previous renew date plus 12 months.
Will keep you updated…
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.