Lm_paypal_subscription problem: nothing happen to role assingment when paypal return back
Ikram - March 14, 2009 - 12:29
| Project: | lm_paypal |
| Version: | HEAD |
| Component: | Code |
| Category: | support request |
| Priority: | normal |
| Assigned: | Ikram |
| Status: | active |
Jump to:
Description
AoA to every one.
i am new to drupal and i have a problem to paypal subscription. i want to create paid membership, for this i create all steps successfully but lm_paypal cannot assing role when user subscribe successfully. i check thal all variables available in post. so what i can do to add role. can any body help me. thanks in advance.

#1
#2
HI there,
I am having the same problem too.
The role is not assigned after subscription. I wondering what is wrong with that... This is proven by the role remains the same in User Management>User.
How could be be solved?
Thanks again.
#3
Hi
I think this is very common, i need to do this too and i dont know how to, can somebody help us please?
Thanks in advanced.
#4
HI ttnk,
I personally think that you shouldn't waste your time figuring out. I have tried in many different ways but nothing seems to work.
I may be wrong as I am not fully understand Lm_paypal. However, I would recommend you to try Ubercart instead.
This module is far more powerful than Lm_paypal because there are lots of plugin modules. The only thing that you need to do is figuring out how this module works as it contains lots of functions.
I have used it for months and everything seems fine. I am giving Lm-Paypal a try because I don't need extensive of functions for my website.
Hope this help.
Good luck.
DLZJ
Experience Centre
#5
Glad that I read this. I have LM-Paypal installed, also, but haven't used it, yet. (The site is still under construction.)
The way that I understand the module operation, the user must log out and then back in for the new role to take effect. I assume that both of you tried this to see if it works?
#6
HI mlbonseattle,
Thanks for your valuable feedback.
I have tried what you have suggested earlier in localhost and live, but with no luck.
Congratulation! You have found your way out.
Good luck.
Best Regards,
Dennis
#7
Thanks, Dennis. I suppose that I'll have to find another way, too. :(
I really didn't need all the functions of Ubercart, either. That's a lot of overkill for what I want to do.
Good luck, as well.
Michael
#8
Thanks for your answer, can you tell me about your experience with ubercart please?
I have tried to use it but it consumes a lot of ram, when i enabled it my site simply crashed, then looking around i saw that it uses 128M, thats a lot for me, i use shared hosting and i only need to make subscriptions so the users can use some things in the site.
Can you tell me please in what kind of server are you using ubercart?
Thanks a lot again, and have a nice day.
#9
subscribing
#10
In order for lm_paypal to change a user's role it has to receive a valid IPN from paypal. This means it is tricky to test on localhost as paypal has to be able to send a request to your server. You also have to configure the IPN url in your configuration on the paypal site. The url will be http://www.example.com/lm_paypal/ipn
To check that your server is receiving IPNs from paypal you need to check the saved IPN page here http://www.example.com/admin/settings/lm_paypal/base/ipns
You can also use the paypal sandbox (https://developer.paypal.com/) to test that your site can receive IPNs.
#11
Hi ttnk,
Should you really unable to use lm_paypal, then you may have to tried ubercart.
My experience with Ubercart is okay, so far so good~.
First Question arise:
What error message you got from the crash? I assume you are getting the below error message when enabling your module
"Fatal error: Allowed memory size of X bytes exhausted (tried to allocate Y bytes)..." Am I correct?
If that is the case, then you could insert the following code in your .htaccess
php_value memory_limit 16M*replace 16 with your own figure
Second Question arise:
Whether your web hosting company allows you to amend or override the .htaccess?
I have a few web hosting plans for my personal and office use. I have used Bluehost.com for my Drupal + Ubercart.
Bluehost gives "Override .htaccess Support", so it allows you to amend .htaccess file, I guess. Should you think bluehost.com is the solution for you, please DOUBLE CHECK with them before you subscribe a hosting plan.
If it allows you to do so, then you are fine. Your problem is solved.
For your information - Web hosting plan:
Bluehost:
Price: cheap $3.95/month (36 months)
support: a bit slow, may take hours (some web hosting company respond to open ticket in 10 minutes), reply in short sentences, sometimes reply in rude manner, no greeting. But, the price is cheap anyway.
Hostgator:
Price: more expensive
support: very friendly and patient. Great support.
Lunarpages:
Price: very cheap in long run (5-year plan)
support: unknown, I have not tried before
Well, the above is based on my own opinion. I may be wrong. You may take the above into account to make your own decision, it is entirely up to you.
I hope I have answered your questions.
Please do let me know whether the above solve your problem.
Good luck!
Best Regards,
Dennis
#12
Thanks for the answers.
Well i tried to use ubercart on a vps with verio.com, it ran out of ram and unticked all of my other modules that where on the site. After that i saw that ubercart uses 128M for php, my resources where not so abundant, so i had to change the strategy.
I'm not anymore with verio, i changed the site to hostgator, they have .htaccess override and as you said the attention is amazingly good, it worths every penny. Well an Verio.com it was really the worst experience ever, i emailed them so they could help me, they answered like a week later, telling me a lot of nonesense, ha, I tried to speak on the phone but got a worst attention, english isn't my native language, but i try hard to make me understand, but the person on the phone hanged on me because i forgot how to say a word (hyphen) when i was trying to say my customer id, and he just hang on me heheheheeh That was the worst attention ever really. Money isn't everything, attention for me is very important.
To change the site to another server i read a lot of blogs, and posts and everywhere just to see good and bad comments of every hosting and i read the best comments of hostgator.
Im trying today the lm_paypal module with the site on my new hosting and whith the domain pointing there, so ill give some feedback if i am able to make things work with this module, i will use the alexpott instructions.
Thanks for the explanation btw. Have a great day!
#13
Hi ttnk,
I am glad that you have finally solved your problem.
I think you might have done something wrong or some errors happened onto your website previously.
I have set my memory at 50MB. So, I guess it is impossible that Ubercart takes all your memory of 128MB. It must be some types of error causing it to happen.
Anyway, for your information:
www.hostgator.com
It provides 64MB of memory (max limit)
www.bluehost.com
It provides 128 MB of memory (max limit)
If you really need more than 128MB of memory, then you could try
www.hostora.com
It also provides 128MB of memory (by default) but you could adjust the amount of memory you need. However, it depends the server load. If you set your memory limit to an extremely high level then you have to take your own risk as the system might suspend your account. They provide great support too, therefore please consult the technician before you set the memory limit.
Hope the above clear to you.
Have a great day.
#14
OK I had changed my paypal email and it failed, so I fixed the email - now is there a way to re-hit drupal or is that a 1 time deal? I want drupal to be aware of the subscription.
#15
In case anyone has this issue while testing against www.sandbox.paypal.com, make sure that on the example.com/admin/settings/lm_paypal/settings page, you have the option "LM PayPal Obey Test IPNS
Obey test IPNS, from PayPal Sandbox, as if real" checked. Otherwise it won't update the users role.
#16
Hi guys,
I was having the same problem. I suspect there may be many reasons for this but I think I have fixed what was giving me trouble...
As my site was not ready for making live I had password protected the site folder using my server's cPanel. This meant the IPN could not get to the http://www.example.com/lm_paypal/ipn URL so the acceptance never got through. When I disabled the password protect the module worked fine.
Which leads me to the question: Does anyone know how I can password protect my site folders while still allowing IPNs to get through?
Many thanks
Ben
#17
order deny,allow
deny from all
AuthName "Whatever"
AuthUserFile /path/to/.htpasswd
AuthType Basic
Require valid-user
#Paypal ips
allow from 216.113.191.80 216.113.191.81 216.113.191.82 216.113.191.83 216.113.191.84 216.113.191.86 216.113.191.110 216.113.191.33 216.113.191.88 216.113.191.89 216.113.191.91 216.113.191.101 216.113.190.147 216.113.190.148 216.113.190.149 216.113.190.154 216.113.190.199 216.113.190.154 216.113.190.187
allow from 216.113.191.69 216.113.191.70 216.113.191.71 216.113.191.71 216.113.191.72 216.113.191.73 216.113.191.77 216.113.191.78 216.113.191.79 216.113.191.90 216.113.188.39 216.113.188.71 66.211.168.91 66.211.168.123 216.113.188.52 216.113.188.84 66.211.168.92 66.211.168.124 216.113.188.10 66.211.168.126 66.211.168.194 216.113.188.11 66.211.168.125 216.113.188.202 216.113.188.203 216.113.188.204 66.211.170.66 216.113.188.100 66.211.168.65 66.211.168.97 66.211.168.193 66.211.168.209 64.4.241.16 64.4.241.32 64.4.241.33 64.4.241.34 64.4.241.35 64.4.241.36 64.4.241.37 64.4.241.38 64.4.241.39 64.4.241.49 64.4.241.65 64.4.241.129 216.113.188.32 216.113.188.33 216.113.188.34 216.113.188.35 216.113.188.64 216.113.188.65 216.113.188.66 216.113.188.67 216.113.188.64 216.113.188.34 66.135.197.162 66.135.197.141 66.135.197.231 66.135.197.232 66.135.197.249 66.135.197.250 66.135.197.233 66.135.197.234
#Yahoo finance
allow from 68.142.195.247
Satisfy Any
Putting this at the top of your .htaccess file that is providing the password protection will do the trick... you'll need to update the directives above to use your current password file... can't remember where I got the IP list from but I can confirm it works great. Yahoo finance is there because I was using the currency module too.
The important line is "Satisfy Any" as this tells apache that either the password or a request from one of the listed ips is valid.