I'm researching paid memberships that are automatically paid via a credit card monthly. After doing the research, I found many people who could not make paypal subscriptions work, that the module author may not be supporting it any more, and 2 people who just about got it working. I was looking to hear to hear an update:

those who never got it working: did you get it working eventually?
those who have it working? do you like it? is it buggy? do you still use it?

here is a summary of what I found:

22996 module author did not reply. may not be supported
43609 can't edit or delete subscription
14434 Dries favors having a good paypal module
35718 readme.txt unclear; no success
24441 got it working (June 2005)
42434 got it working (Dec 2005)
32187 ecommerce module only does recurring invoices; does not do automatic payment via credit card (Sep 05)
37802 use ecommerce module for recurring payments (Nov. 05)

thank you very much,
ae2005

Comments

bs’s picture

Hi,
I appreciate your research. I would like to know about subscription for file download module. Any Idea?
Thank you.

kae’s picture

24441 emails must match. got it working
35718 bluedrupal got it working
The problem is, user account needs to be made first AND the user email MUST be the same as the paypal address in order for it to work.

this seems very important and is not in the instructions (but is alluded to in code)

23982 -- invalid item ID. (I have this problem now). 22250 solved this problem by not using cart button
25665 time delay. ran cron manually
34393 had paypal sub working? removed it
43697 want to use site for file downloads
40840 careful with sandbox urls (ecomm)

kae’s picture

by the way, one reason I made this list is that we are talking about raising money from users to pay a developer to enhance this module.
24441 marc m. Jun 05. emails must match. no more posts. no priv msg

24441 kevin schultz. Dec. 05 emails must match. active. no priv msg. 39284 says timedate difference makes paypal framework impractical for realtime transactions.

37461#comment-71061 william rice. Dec. 05. can't get paid mbr to work with paypal or ecomm. no other posts.

44295#comment-82790 reikiman. jan. 06 ecomm only offers 1 role.

38014 sammoscheck. Nov. 05. cancellations not logging. active. no other posts on paypal.

23779. cyberlot. May 05. working. no other posts. no way to contact.

23982. patrick nelson. May 05. active. had invalid item id problem. (solved below)

30419. jey2283. sep. 05 long error message. no contact info. stopped posting.

23982. llizards. nov. 05. same invalid id problem. no contact info. may be using ecomm 37249.

25665. dedicated. jun 05. problem is timedelay. no contact info. no other posts.

18868. sergiob. mar 05. too many goodbye emails. solved by schultz. active. no other posts on paypal

21325. budda. Apr. 05 email notif broken. budda is a Drupal coder who is very actively posting. He is a possible person to hire for this module. May05.suggested a fix for email that was implemented.

4 logical developers would be Gordon Heydon, maintainer of ecomm, Matt Westgate (who wrote ecomm), crackerjackmack and njivy, who wrote paypal framework. torenware is a coder who has commented on the timezone issue. kbahey at 2bits.com is another person to consider.

38354. sheilaruth. nov. 05. dup id error. 2 posts total.

22250,22103. evolve. may 05. invalid id problem. solved by changing buttons. no contact info. not active. no other relevant posts.

reikiman’s picture

I'd done some try-out-the-code research and it sure looks like ecommerce is the best. But I have some qualms.

First my user base is worldwide, so I think paypalpro is right out the window (I understand it's only for U.S. citizens).

One issue with regular paypal is you give it a single IPN URL. But what if you want to handle paypal payments from multiple sites? I have several sites I want to launch, each could have a different set of users, etc. Paypal has a limit on the number of accounts one person can have, so I can't just open lots of accounts.

One idea I have is a kind of IPN Redirector, where you'd tell paypal an IPN for a neutral site, the neutral site receives the notification, and then forwards the notification to the other sites based e.g. on the product code.

Another issue with ecommerce ... I want to offer multiple membership levels, each with various services. That maps to roles, clearly. I didn't see that ecommerce would support that. I'd want subscription-product-A award role-A, subscription-product-B award role-B, etc.

- David Herron - http://7gen.com/

kae’s picture

thank you reikiman. I was wondering what you've been doing.

here is the link to the readme.txt for this module in the cvs repository.
http://cvs.drupal.org/viewcvs/drupal/contributions/modules/paypal_subscr...

reikiman’s picture

I was in India for most of November ... and then as soon as I got back, my fiancee announced we were breaking up ... and it took me a couple weeks to climb down off the ceiling, and now I've been looking for a house to rent and I'll need to move in the next 3 weeks or so. So I won't be able to do much of anything until mid February. Oh, and I've got a large project going on at work too.

- David Herron - http://7gen.com/

kae’s picture

reikiman, thanks for the update. sorry about your news.
ae

michob’s picture

I've been trying to get paypal_subscriptions working on my local test site, and it seems to be working now, but only after several hours of debugging and fixing stuff... and I'm still left with one issue I don't understand at all.

A bit of background:
I originally started using the ecommerce module and had hacked the ps module to work with it. I only did limited testing, but it seemed to be working. Unfortunately, the ecomm module wasn't cutting it - it was too complicated for what I need (and not flexible enough), the user experience was painful, and I found I was just working around it too much.

So, I ditched ecomm and chose to use paypal_framework (plus a few functions from the ecomm paypal) with the ps module and some custom code to handle my needs. I have a couple of extra modules that use the paypal_transaction hook for some of my custom processing.

The problem:
The paypal_transaction hook is called in ps upon receiving an IPN, but no matching data is found. When the same query is run in MySQL, data shows up. After some investigation, I determined that there's some sort of timing/sequence issue. Running the query in one of my other modules (called after ps), returns data. Yet even if I put a usleep() in ps, even if I loop it 100 times, that query still fails. It only works if ps is the last module called with paypal_transaction.

The temporary solution, of course, is to rename the module to "zpaypal_transaction" so it runs last, but what in the world could be causing this issue?

-michob

PS. Once I collect all my data, I'll put in a bug report under the module... though it seems the maintainer is MIA (or just doesn't read/respond to bug reports)

kae’s picture

hi michob,
thanks for your detailed post. you are way beyond what I know. right now I can't get the paypal button to work as an encrypted button, but that is a paypal issue, not drupal. i'll post here if i get ps working. thanks, ae

kae’s picture

more about paypal subscription
35718 bluedrupal got it working. see comment near top
17047 got paypal framework working
41227 scrapped joomla

http://drupal.org/node/727#comment-31800 Mar 05 discusses issues and progress with sub

Jan. 06 I receive email from Gordon (maintainer) that ecomm cannot do the recurring debits, only the recurring invoices

kae’s picture

I've disabled paypal sub to see if I can get paypal framework working. (haven't succeeded yet.)

here are some threads about paypal framework:
binserversystems.com/node/12--about tipping
http://www.hivemindz.com/paypal_subscription_module--2 code fixes

http://lists.drupal.org/archives/support/2005-11/msg00097.html--a long discussion

kae’s picture

kae’s picture

here I plan to put threads discussing the ecommerce module
33721 ec vs mambo's cart
20285 ec vs osc vs zencart. no product variation in ec
28049 osc and zcart bloated, hard to modify; phpshop.org (not maintained)

35884 security problem; logging credit cards
drupal.org/security keep up-to-date on ecomm security issues

http://civicspacelabs.org/home/commerce
links to ecommerce discussions

43607, 43821 ecivicrm
35702 user points
44623 selling votes
11313 rent a coder
21068 wish: consignment fees
25757 amazon module
26015 need https
30069 multisite
34975 skibits site working great
32485 paid events
19794 hook
43268 no files to download
39149 ssl
24317, 16744 bug about completion
33705 needs /

kae’s picture

3 specific discussions of using ecommerce for subscriptions
34289 invoicing only
20334
32187

coupet’s picture

Hi,

I think the concept and development of paypal subscription is excellent. I wish others can continue the development and update the module and resolved outstanding bugs as reported.

A nice feature that Paypal subscription provides and ecommerce does not currently implement is Role Assignment.

Thanks, Darly

Roddy’s picture

Just to chime in, I've recently got paypal subscriptions working with virtually no trouble at all. I initially tried to use the ecommerce module, but after hitting problems ( 44932 ) I gave up and went with paypal framework + subscriptions.

Couple of comments -
1) Be very careful if you have both the paypal framework / subscriptions and ecommerce modules up and running - the subscriptions module at one point wiped out all the subscriptions that ecommerce had set up (use seperate roles to avoid this)
2) Get a sandbox account from developer.paypal.com - takes a bit of time to set up but it will let you test to your heart's content at no cost. You'll need to change all reference in the module code to www.paypal to www.sandbox.paypal (and of course change it back once you are done testing).
3) It appears you need a role PURELY for paypal subscribers. The cron job will delete anyone from the 'paid' role who does not have a currently valid paypal payment.

one question:

Although most of our subscriptions will be via paypal, there will be people who send in a cheque / bank transfer, etc. I can't currently see any way to manually add them to the list of subscribers so that the subscriptions module will end the subscription when it runs out. The only way I can see to handle this is to create a second user group with the same permissions (see 3) above) and try to remember to manually remove them when their money runs out.

Basically, is there a way (short of a direct database insert, which I may yet have to do) to manually add a transaction and make someone a subscriber?

Roddy

kae’s picture

Roddy, wow, congratulations! I can't get paypal sub to work. In fact, can't get paypal framework to work. always get "no transactions were found." I'm doing all 3 of your points. did learn that all Drupal email addresses have to be identical to paypal addresses for both seller and buyer accounts.

have you enabled SSL or something in terms of security? I haven't. that's one angle I'm going to check. I'm hoping that's the problem.

I'm running 4.6.3. (civicspace) what version are you on? I'm assuming you didn't make any changes to the code other than the sandbox change. If you think of anything else you did or that could help, please write here!

one long shot: perhaps it could be a conflict of modules. can you please indicate which modules you have installed if it's not too much trouble? I have all the civicspace modules, which might be about an extra 15-20.

as to your question. that's a good one. I can't think of any way other than a manual insert, but if I think of one I'll write.

thanks so much for taking the time to write of your success and tips.
ae2005

Roddy’s picture

I'm not using anything major beyond the two paypal modules. No SSL enabled (unless it's a default server setting, I guess).

Edit: just as another useful note (I'm hoping someone is going to pick up development of this module): If you create your paypal button via the 'Recurring payments and subscriptions' menu, it requires your users to create a paypal account for subscription management. That might put some people off.

However, if you create a 'buy it now' button, it will still trigger the subscription with no need to create a Paypal account. Obviously it will not renew when it expires.

I should point out I'm only doing sandbox testing so far. Who knows what will happen when I'm dealing with real cash . . .

Roddy’s picture

Back in tearing my hair out mode again . . .

It's registering subscriptions and assigning the role fine. BUT immediately the cron runs, it sends the goodbye email and removes the role. And the wierd thing is, when you get the goodbye email, it is for the WRONG subscription - id no.1, as opposed to id no.4, which I'm doing my testing on.

Stumped, completely.

EDIT: Ok, figured this out, at least. I haven't seen it mentioned in the documentation anywhere, but you can NOT have more than one subscription for each role. Here's why.

My set up was 1 role, associated with 3 subscriptions - monthly, six monthly, and yearly.

I could sign up fine for any of these, but as soon as I ran cron, my subscription ended - why? Because the module checks the user against EACH subscription and if the user fails any ONE, he's kicked out of the role. Ie, I'm subscribed to the monthly option. Cron runs, notices I'm a subscriber. Checks my monthly sub. That's fine, leaves me into the subscriber role. Checks my six-monthly sub - oh, no, he doesn't have a six-monthly sub - never mind that I DO have a valid monthly one.

I'm going to need to set up three roles, one for each subscription. Shouldn't be too hard, and then maybe I can call myself done for the night . . .

EDIT EDIT: At this point I would consider paying for the subscription module to be upgraded - for manual management of subscriptions to be possible, for one role to be able to have more than on subscription, and maybe something else. Anyone interested? I'm working on this for a non-profit so it'd be coming out of my own pocket, so you ain't going to get rich . . .

kae’s picture

Hi Roddy,
you are awesome. You've figured out such great stuff. thank you so much for sharing.
1) can you please explain a little about your process for tracking down the problem. are you manually going in and checking your mysql table? how should I think about this? I installed devel but nothing from paypal is showing up. I was thinking about reading the paypal manuals line by line to see if I've missed something.
2) After that, I was going to start going through the code line by line. This would be very tedious, but I figured I'd learn what I need to learn for dealing with any other problems going forward. However, I don't have much experience so maybe it's better to hire someone. Since you are looking to hire someone, maybe this is too advanced for me. May I ask how much programming experience you have please?
3) I will certainly go in with you on this, if you think we need an experienced developer. However, my first request to the developer would be to ask him why I and many others are getting the "no transactions were found" error. I don't know enough yet to know how difficult our requests would be (and hence how much time it would take). I am also willing to try to raise money off this site from others by contacting all the others who are interested.

tip to everyone else: the code says paypal framework requires libcurl installed on your server. you can read more about curl at php.net/curl.
31362 edited curl in

thanks for pitching in!

ae

kae’s picture

roddy, node 19329 has an answer to your question for the ecomm module. recommended cod module. --ae

Roddy’s picture

Hey folks,

The trouble is, I couldn't get the ecomm module working - the IPN transaction was being logged, but the users wasn't been added to role. It might have been wiser to stick with it, but too late now . . .

That particular problem I just realised what was going on because I was getting cancelation notices for a different subscription to the one I signed up for.

I have very little programming experience, and what I do have is only in hacking up open source stuff. I wouldn't attempt anything significant.

Current Issue: People can sign up fine, but I'm not sure that cron is removing them when it should. Hmmm . . .

kae’s picture

as of now, ecomm does not do role upgrade so you are better off with paypal s. however, maintainer of ecomm did say he'll consider adding the functionality.

by the way, Roddy, thanks a zillion. It was knowing that you got it working without hacking the code that set me on the right path, rather than start tinkering with the code.

thank you, thank you,
ae2005

kae’s picture

partial success. I got paypal framework working. I read in the code that libcurl must be enabled. I contacted my host (opensourcehost.com). found out libcurl is compiled into php. went to paypal framework settings. changed my method from fsock to libcurl. changed my email address to match my paypal email addr. changed address to sandbox. (last 2 everywhere else but forgot about this page.) now paypal f works.

however paypal sub is still not working. but role did not get upgraded. will have to go through all the posts again.

Roddy, thanks for the update and info. I'll see how far I get. if I can't get this to work I'll work with you and others to hire someone.

more soon,
ae

andread’s picture

Hi,

As I don´t have any programming skills, and this subscription module has a pretty high priority for me - I started to look around other places then Drupal Forum. I wanted to register at 2checkout - and there I have maybe find my solution ( I only hope it will work together):
http://lite.membershipclientpro.com/

It seems the easiest way for me, as I didn´t get so far as you guys - as I STILL can´t edit any subscriptions, I can write them in, but nothing else (see: node/43609). SO matbe it is the right solution for me. - and for others too.... I will let you know, how did it work out!!

Andrea D
www.excondo.com

kae’s picture

it appears to be working! yesterday I reported that role was not upgraded. today it was. I assume it's some delay due to timestamp. any way, I'm not going to worry about a 24 hour delay.

I can edit and delete subscriptions. right now, am only in sandbox. will have to test some issues that roddy and someone mentioned.

andrea, that's great info. please do check it out and let us what you think.

those of you who can't edit subscriptions, are you sure you have the privilege enabled in access control?

ae2005
whew

kae’s picture

if paypal sub is not working for you, here are some things to try:

here are the changes i made yesterday:
1) changed paypal settings in drupal: set on libcurl (default is fsock). i confirmed libcurl is compiled into php by asking my hosting provider (if set incorrectly, this will cause the "invalid item id number" error)
2) changed customer service email on paypal to match developer/webmaster addr
3) inserted sandbox into url in paypal settings in drupal (this tip only if you are using paypal's developer sandbox)
4) earlier, synchronized all email addresses across drupal and paypal
5) took any numeric characters out of product description on paypal and on drupal.
6) (had done earlier) make sure administer subscriptions is enabled in access control

kae’s picture

39284 schultz. dec. 05 discusses the datetime problem in detail.
notes
the variable transaction_date is in the table paypal_log
the variable payment_date is also in the table paypal_log

transaction date appears to be when the order was placed.
payment date is when order was received.

transaction date (order date) is where your server is
payment date is your local time.
If your server is in a time zone 2 hours ahead of you, then apparently your order won't be processed either for 2 hours or until the next cron job.

according to paypal's order management integration guide, p.67, payment_date is an IPN variable and is always set as Paypals time, which is West Coast US.

17313 module coder discusses timedate issue

46820 i'm going to move this point and track general timing issues to 46820

kae’s picture

I've started a new thread to track paypal framework. it's at node 46736

Roddy’s picture

ae2005, thanks for that checklist. I may yet rescue some of my weekend . . .

I'm curious if anyone else is seeing the following behaviour with paypal subscription:

Payment is made and taken fine. Welcome email is sent and role is added. BUT when the next cron job runs, goodbye email is sent and role is removed. - EDIT: ignore this, it stopped doing it . . .

On a real push to get this set up for Monday, wish me luck . . .

Roddy’s picture

This is only relevant if you have multiple subscriptions.

I mentioned above that when you have multiple subscriptions (I have one month, 6 month and annual subscriptions) all applying to one role, the cron job fails to work correctly. It checks you against EACH subscription and if you fail any one, it removes the role. Example, I have a six month subscription. Checks me against monthly criteria - no problem. Against six monthly - no problem. Against annual - whoops, you haven't paid enough, goodbye.

I solved that by having different roles - I now have three roles, one each for each length of subscription. This appeared to be working fine, but I now notice that . . .

Cron (NOT the transaction hook, which works fine) is now ADDING people to roles they shouldn't have. Example: I have a six month subscription. I sign up fine and am assigned to the six month role. No problem. Then cron runs. Checks against monthly subscription. ADDS ME! Checks against six monthly. Adds me (or leaves me there as I'm already a member). Checks against annual - no action.

This is despite the fact that the item number is not the same. It appears to not be taking item number into account, only amount paid.

I initially thought this wouldn't be a problem - the different roles have the same priviliges. However, it DOES send out warning emails for the inappropriate roles - so a six month subscriber will get a warning email saying their ONE MONTH subscription is about to expire.
Going to try and fix this, but as it involves real live code I don't hold out much hope. Suggestions welcome . . .

kae’s picture

Roddy,
congrats! good luck for Monday. after I get timedate working I'll try to take a look at what you are talking about. but you might have solved it already. check out the log of users near the top of this thread. some people disabled email notif altogether.

are your servers on the west coast? is that why you don't have the timedate problem? your profile says you are in China. ae

Roddy’s picture

To be honest I have no idea why I don't have the timedate problem. I'm in Beijing, but my server is in Manchester, UK. Perhaps I do have it and I've inadvertently solved it . . .

My current advice is - if you are looking for a single subscription, this module should be ok. You'll have teething problems, but it's workable. There's enough info on this page to get it working.

However, if you want to have multiple subscriptions / roles then things are more problematic. The cron job doesn't handle this well, and people get removed and added all over the shop.

I think what I am going to have to do is disable all cron-based emails and role adjustments. This will require manual emailing and management of roles but we'll just have to live with that for a while.

Here's a list of what I think needs done (this should possibly go in the project section, but it seems like all the action is here).

1) Support for multiple subscriptions (different lengths, different roles, etc). The cron section needs work here. I don't think it would be difficult for someone who speaks database.
2) Warning emails should only be sent a limited number of times - they are currently sent with every cron run.
3) A hook for the user profiles, so users can see what subscriptions they have and when they expire. Addition of a user friendly subscription description? (ecommerce does this)
4) A way to manually edit and add a users transactions. This may take us into paypal framework territory, but I think it would be useful to manually add in transactions (say if IPN fails, or you want to give a free subscription to someone)
5) Clarifications of timedate issues
6) Support for different email addresses for admin / users and paypal accounts.

That, I think, will give us a solid, user friendly subscriptions module.

There's a 'why not use ecommerce' question to be answered. Basically, ecommerce is more than is necessary. We don't need a full shopping cart for simple subscriptions.

coupet’s picture

Hi Roddy,

Excellent testing and contribs.

Basically, ecommerce is more than is necessary. We don't need a full shopping cart for simple subscriptions.

An excellent feature of paypal subscritions is the assignment of users to a role based on subscription product. Ecommerce does not presently provide that feature.

Thanks, Darly

Roddy’s picture

Actually, you can - you need the 'generic' module, which is included in the ecommerce contrib directory. That allows you to have a non-shippable product, and associate it with a role. Ecommerce also allows recurring invoicing (but not billing). Basically, between all the modules, you have all you need for a subscription / role set-up. There's a write up available here, link found elsewhere on drupal.org, can't remember where.
(edit: I may have misunderstood coupet - if I remember correctly ecommerce only allows one role to be assigned, wheras paypal_subscription allows different subscriptions to different roles - but be aware that I had issues, detailed above)

However, the problems I had with ecommerce are
1) Overkill if you want a simple subscription set up - shopping cart, shipping address, etc - it's been designed for running a full online store with real, shippable products. Kudos to the guys who put it together, it's a fantastic piece of work and it's great to see stuff like this in an open source project - but it's more than I, and many others, need. If you are selling products and want subscriptions as a sideline, fine. But if you are subscription-only, I'm not convinced this is what you need.
2) I couldn't get it to do the role assignment, and I couldn't figure out why. In retrospect, it may have been a datetime issue. What I did note is that valid IPN hits did not assign the role, but adding a manual transaction did.

The above meant I looked at the paypal framework + subscription solution. I think this is the right decision, although it took me quite some number of wrong decisions to get here, not least because I mistook the problems the subscription module has with multiple subscription to be fundamental problems with the module. Datetime issues may have confused things, I'm not sure.

My current situation is that I have the paypal framework and subscription module installed, but I have completely disabled the cron functions in the subscription module. This means that the transaction functions will send the welcome email and assign the role, but any warning and goodbye emails won't get sent, and roles won't be removed on expiry.

All the best, and a Happy Year of the Dog from Beijing . . .

jeff veit’s picture

The ecommerce module allows anonymous purchase, so may be suitable now. Anonymous purchase was broken, but I submitted a patch for 4.6 some time back. At node/51476. I don't think it's been integrated into 4.6 as of April 06. The patch understands that a shipping address is not needed if the product is not tangible. I think it still requests a billing address though.

Roddy’s picture

Actually, let me ask - has anyone else observed these problems I've had with multiple subscriptions. For example,

If you have the following set up:

1 month subscription. $10. Assigned to 'monthly subscribers' role
6 month subscription. $20. Assigned to 'six monthly subscribers' role
12 month subscription. $20. Assigned to 'annual subscribers' role

and User X signs up to the 6 month subscription, does cron assign them to the monthly subscribers role also?

If you have the following set up:

1 month subscription. $10.
6 month subscription. $20.
12 month subscription. $30. All three subscriptions assigned to 'subscribers'

and User X signs up to the 6 month subscription, does cron remove them from the subscribers role?

kae’s picture

Hi Roddy,
thanks for the detailed comments
46820. unix_timestamp is on gmt, which might be why you don't have the problem (it seems your servers are on gmt)!

ecomm will not do recurring deductions, only billing, so if subscriber does not pay again, their subscription ends. not my preference. but i didn't realize ecomm will put subscribers in the right role. (but i guess as you say, it has only one subscription possible)

i like your nicely laid out wishlist and testings ques. i'll try to do that test later today. first i want to try more on the timing issue. anyone else checking this site, maybe you can check too!

thank you, ae

kae’s picture

roddy, look at line 580 in paypal f. alludes to problems that sound like yours.

kae’s picture

as i think about it more, the paypal framework module might be okay. the timing issue may only be in paypal sub.
the problem line seems to be line 235
$timeperiod = _paypal_subscription_time_period($subscription->subscription_id);
// The RIGHT JOIN prevents returning NULL uids.
$payer = db_fetch_object(db_query('SELECT u.uid, u.name, u.mail, u.timezone, SUM(ppl.mc_gross) AS payment
FROM {paypal_log} ppl RIGHT JOIN {users} u ON ppl.payer_email=u.mail
WHERE ppl.mc_currency="%s" AND UNIX_TIMESTAMP(ppl.transaction_date) >= %d
AND UNIX_TIMESTAMP(ppl.transaction_date) < %d AND item_number="%s"
AND ppl.payer_email="%s"
GROUP BY ppl.payer_email
HAVING payment >= "%s"',
$subscription->currency, $timeperiod->start, $timeperiod->stop,

also look at line 144 granting role status.
also look: line 122. $now=time();

ps line 543. "better be GMT" see 46820
any of you who can read php code please take a look. to learn php, see node 46820

hold your horses. this may be an overall drupal problem with timezones that affects other modules like event. i'll read thru everything and log them at 46820, and post a summary here.

in meantime, you (anyone) can try pursuing your problem as a timezone issue.

kae’s picture

19816 is an excellent thread. i recommend reading it

21699. summary of timezone bugs

http://drupal.org/node/19816#comment-33894
torenware. apr 05. do NOT correct for timezones.
i believe ps tries to do this on line 550.

toren notes this is a php problem, not just drupal problem.

http://drupal.org/node/19816#comment-33908
joel (agrees) says store all time in UTC. convert only for display
GMT is now called UTC, universal time coordinates.

20927 shane apr 05 is linked to thread
18860 about 4.5 but nice explanation of problem

must problems disappear after 4.6 released, however
45570 hunkybill Jan 06 still have timezone problem. nice explann
38027koomis nov 05. tz problem. nice explann

kae’s picture

first the good news, after reading about timezone issues,
1. i changed my global settings time (admin--settings) to GMT (+0000).
make purchase
---result. user was not upgraded to role
ran cron
--not upgraded
2. Then I also disabled letting users configure local timezone settings.
make purchase
--result. not upgraded
ran cron
--result. IS UPGRADED!
that's good news.

however, it is true that only 1 subscriber got the role, even though 2 subscribers are listed under paypal subscriptions.
now i'll try having 2 roles.

stretchwickster’s picture

Hi there,

Can anyone tell me whether cron is used to upgrade people to a subscriber role after payment has been processed?

From the limited documentation I have read, I only saw mention of cron being used to remove people from a role on expiry.

I'm still struggling to get users automatically assigned a subscriber role on returning to the site, could this be my problem?

jeff h’s picture

Hi... strangely enough I was actually looking at the code when I read your post. Unfortunately I'm not a great PHP coder, but from my understanding of this module's code, the answer is no...

Roles are upgraded instantly, without CRON. However as you know, CRON triggers a function which checks to see who hasn't paid and then demotes them.

I think the biggest cause of non-upgraded roles is that the user provided a different email address to Paypal than the one they used to create their Drupal membership. Is this possibly the cause in your case?

stretchwickster’s picture

Is there any way around this? Personally, I use a different paypal email address to the one I submitted for my drupal membership.

kae’s picture

I've got it mostly working, at least perhaps to the extent that Roddy has.
At first I couldn't get a second subscriber to be subscribed. Then I created a second role, ran cron, and then the second subscriber got the correct role. (at this point, 2 subscribers, with 1 role each)

ran cron again, and now all subscribers (n=2) have all roles (n=2)

ran cron again, no change

so now I have something similar to Roddy's problem. next to do will be to read closely the line in the code I pointed Roddy to above.

Roddy, thank you so much for all you've figured out!
Happy Chinese New Year to you too.
ae

Roddy’s picture

Glad you are making progress, best of luck.

Just as an additional note which might save you some time, I found that the order in which things are listed in the database makes a difference. For example, when I had three subscriptions, all linked to different roles, and under phpmyadmin they were showing up in the order
6 monthly
Monthly
Annual
(NB, not talking about order of ID number or anything, just the order they appear in the database before any ordering is applied)
the 6 monthly role worked fine, but people were getting chucked out of monthly and annual. However, if I deleted and then reinstated the 6 monthly one, so I got the order.
Monthly
Annual
6 monthly
then the monthly one started functioning, and annual and 6 monthly started messing up.

I don't have the time or ability to think through the code, but I'm pretty confident (as I think you are) that the cron job functions aren't handling multiple subscriptions and roles.

kae’s picture

roddy, thanks very much for the additional info. since the developers list has been discussing the complex issue of adding roles programmatically 46724, i do think it'd be good to get a developer. I'm going to try to talk with them next week. node 47263, and see how much this might cost. in the meantime, I may take a break from testing this module and spend the time trying to understand how much rework is necessary. too bad you can join us from China! ae

Roddy’s picture

2 more observations:
1) role is being added for 'pending' payments. That's ok for us, as we generally trust our users to eventually come up with the cash, but may be an issue for some.
2) IPN notifications of subscription creation are causing a duplicate key error.

Nothing major, just being comprehensive.

kae’s picture

47393. provide your wishlist!

roddy, thanks a lot for the additional info. ae

SheilaRuth’s picture

Sorry to come in late here. I would also be interested in contributing to hiring a developer to work on this module, if the original programmer isn't supporting it any more. I tried the e-commerce module, and it was also overkill for me, and I think I had other problems with it as well. The PayPal module is exactly what I need, except I'm having the same types of problems that you guys are:

- Mismatched email addresses between Drupal and PayPal cause the subscription role to not be activated. There should be some way to identify which Drupal Userid goes with which PayPal payment. Even a manual way would be better than no way.

- The inability to add people to a role manually, and the need for multiple subscription options. I also have been getting around these with multiple roles, but that's inconvenient when I have to deal with permissions, etc. I'd rather have one role. If I, as the administrator, manually assign someone a role, I don't want the PayPal module to delete it.

- I did get duplicate key errors on inserting the IPN transactions at first, but I don't get that now. I'm not sure what changed.

- I'd like to see some way that users can view the expiration date of the subscription, and that administrators can manually change the expiration date.

Let me know how I can contribute.

Thanks!
Sheila

Cromicon’s picture

I'd donate for this too. Please let me know how.

FatPitchFinancials’s picture

I'm willing to test out any new PayPal Subscription module. I have a test site set up and ready to go.

If this module gets improved, I'll likely move my current website over to Drupal.

kae’s picture

thank you. by the way, some developers are working on doing this with authorize.net.

here is a comparison of that with paypal
www.secondsite.biz/Partners/Payment-Partners/Authorize-Net/Compare/

paypal has no setup fee

kae’s picture

Hi everyone,
thanks so much for offering to contribute. Can you please send me a private message and let me know how much you can put in? thanks very much. I have a developer in mind.
ae2005

jeff h’s picture

Hi,

Any progress toward getting a developer to work on this for us all? I would be able to put a little towards it, if it'll work in 4.7.

Thanks for your work. A paid-subscription role-based feature is very much needed, I belive.

Jeff

ps part of me feels that the smartest move would be to work on the ecommerce module so that it suits our needs, as it is more widely used and maintained. What do you think?

kae’s picture

Jeff, thanks for asking. I have some quotes from developers. Please private message me with how much you can contribute, and post here with your needs by priority. (version, gateway, timeline, etc.) Yes, the plan is to make it part of ecommerce or compatible.

Pixel-Info’s picture

Hi,

I have create a subscription named "1" but i don't see where i can "tell" to the Paypal Subscription module what role must be use for the user who have payed the subscription, can you help me ?

Thanks

coupet’s picture

Did you create additional roles?

Did you install paypal_framework?

Apache is bandwidth limited, PHP is CPU limited, and MySQL is memory limited.

Pixel-Info’s picture

Yes i have create an additional role (subscribers), i have installed paypal_framework too.

In the edit tab of paypal_subscription, i only see one field : the name of the subscription. I don't see the other fields so i can't declare others parameters like currency, role and so on (i know the name of the fields because i saw them in phpadmin in the table paypal_subscription)

I'm very discouraged, because i really need subscriptions on my site.

Thanks for ideas.

Roddy’s picture

admin > PayPal > Subscriptions > 'edit' next to your subscription, and you choose the role under 'Role to grant'. This is fairly obvious though, so I'm wondering if something is preventing you from seeing this option.

Edit: Sorry, didn't see the last post. I'd say something is corrupted somewhere - if you haven't got any vital info in there, I'd delete your paypal tables, reupload and reinstall.

Pixel-Info’s picture

yes, i've already deinstall and reinstall paypal_framework and paypal_subscription several times, delete the tables but this doesn't change anything.

When i click on the link 'Edit', no field appear, the field 'Name' is alone, it is really incredible. I can't see the field 'Role to grant' and others.

Can you please send me the content of the record in the table 'paypal_subscription', i will add the values in phpmyadmin.

Thanks.

Pixel-Info’s picture

I've found the problem, the module 'locale' must be disabled in admin/modules. 'Paypal_Subscription' and 'locale' can't work together.

Is there somebody who can resolve this, i need both 'locale' and 'Paypal_Subscription'.

Thanks.

kae’s picture

i'm surprised locale cannot work with ps. i can't think of why. but it's great you've figured it out

qomo’s picture

I can contribute some money

bs’s picture

Hi all,
I am following this thread about paypal subscription module. My special thanks and appreciation goes to ae for his continued support for this project to succeed. I am doing a small e-commerce project for a U.S based client. He wants to sell CD’s, DVD’s and some Books on his site. I don’t know about current status of Drupal’s E-Commerce module’s stability. Yes, I searched nodes and visited some Drupal based E-Commerce sites .Could you give some guidance on which payment Gateway is best?
Please give your suggestions.
Thank you.

kae’s picture

hi B, thanks for your nice note. I've only worked with 4.6 so far. the files modules is working in the sandbox for file downloads. choose "nonshippable product" when you create the product. The only gateway I've worked with so far is paypal. However, authorize.net is popular outside of U.S. anything else I learn about the other gateways I'll post. remember that paypal sub conflicts with ecommerce, so you need ecommerce suite of modules.

kae’s picture

we've hired a developer to do this. this thread is being moved to 51181. please post there if you can contribute to the bounty. thanks!

Dublin Drupaller’s picture

here's a link to that thread

Dub

Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate

9802008’s picture

When testing paypal subscriptions you need to:
1. create a test account: developer.paypal.com
2. login to the test account and create test business personal accounts as needed.
3. change all your urls to www.sandbox.paypal.com instead of www.paypal.com
4. NB You need to open TWO browser windows when testing. In the first browser window login to developer.paypal.com with the account you create in step 1. Open up your Drupal site in the second browser.
5. Click on the 'subscription button' etc in your Drupal site. If you do not have two windows open (1 logged into developer.paypal.com) you will get a message on www.sandbox.paypal.com that you must use developer.paypal.com

Hope this helps someone! Took me a while to figure it out!

www.johnstonwebsolutions.com/we_install_modify_and_maintain_drupal_web_s...

Anonymous’s picture

There's a good Paypal Subscriptions solution which basically works out of the box, allows recurring membership to your site, and automatically adds and removes roles when the subsription ends. Check it out here: http://www.moneyscripts.net/drupal-paypal-subscriptions . It is $24.95, so not free, but worth it if it can save you hours of debugging and messing with things...

WorldFallz’s picture

Just an fyi-- the poster is the module seller.

Anonymous’s picture

Yes, I am the creator of this module. I also regularly update my modules and support them on the community forums found here: http://www.moneyscripts.net/forum . I hope this can help someone. I also offer some free modules both on my site and also here on drupal.org . One example is the Click2Sell Suite (http://drupal.org/project/click2sell), which offers similar functionality to the Paypal Subsriptions module through Click2Sell. You can check it out if you'd like.