Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I've created a non recurring subscription.
When a user subscribes, Paypal sends a "subscr_eot" immediatly after the payment.
It even happened that this "subscr_eot" was sent *before* the payment.
It seems to be a bug from Paypal .
Have you ever run into it?
Any help appreciated!
Comments
Comment #1
wbzial CreditAttribution: wbzial commentedi'm experiencing the exact same issue.
Comment #2
anrikun CreditAttribution: anrikun commentedI've contacted Paypal after running into this issue.
Even if it is not clearly stated on Paypal's site, Paypal does not handle non recurring subscriptions the way we could expect.
As there's only one payment, it considers that its job is done and send "subscr_eot" immediatly.
The only way I found to handle non recurring subscriptions was to modify lm_paypal's code so that non recurring subscriptions are traited as one-click/donate payments.
Doing so, "subscr_eot" is never sent by Paypal. So I had to add some code so that lm_paypal checks itself whether a subscription has ended or not each time cron runs.
Comment #3
wbzial CreditAttribution: wbzial commentedWell, if you could explain a bit the edit you've done, that would be much apreciated!!!!!
Good thing to know that someone went through !!!
Comment #4
anrikun CreditAttribution: anrikun commentedI've changed so much stuff that I'm not sure I can explain it easily but I can post some code so that you can try:
In lm_paypal.module, add 1 line:
In lm_paypal_subscriptions.module, change lm_paypal_subscribe this way:
Change this too:
It might not be enough but try it.
Comment #5
wbzial CreditAttribution: wbzial commentedThanks i'm on it!!!
Comment #6
pjd CreditAttribution: pjd commentedHi
I had the same problem. ("subscr_eot" sent just after register)
A another solution to correct quickly and disable fully the request to end the subscription (you will have to build the cron to delete the subscription...)
I only comment this line in the alpha version of the module in the lm_paypal_subscriptions.module script (modules/lm_paypal folder) :
Search for the first "subscr_eot" and the line:
else if ($ipn->txn_type == 'subscr_cancel' || $ipn->txn_type == 'subscr_eot') {
After this line search for this new line and comment it :
//lm_paypal_subscriber_set_status($ipn->subscr_id, $status);
and
if ($so->kind == 0) {
// INTERVENTION ICI : PJD : 30 DECEMBRE - AJOUT des lignes loose_role et loose_group en commentaire:
//lm_paypal_user_loose_role($uid, $so->rid);
}
else if ($so->kind == 2) {
//lm_paypal_user_loose_group($uid, $so->rid);
}
Becarefull to comment too the email sent to the user !
// ON ENLEVE AUSSI L'ENVOI D EMAIL A L UTILISATEUR EN FIN D ABONNEMENT
// lm_paypal_mail_user($uid, $uid, $so->send_user_onend_subject, $so->send_user_onend_body, $variables);
Comment #7
anrikun CreditAttribution: anrikun commentedHi PDJ,
You fix should work too.
The difference with mine is that you still handle non recurring subscriptions as subscriptions whereas I handle them as one-click payments.
Why ?
Because subscriptions force users to create a Paypal account even if they want to pay directly using their credit cards.
Many users don't like having to create a Paypal account.
That's why I have switched to one-click payment.
Comment #8
tahiticlic CreditAttribution: tahiticlic commentedHi there,
to complete #6 comment, maybe a test on the normal duration of a subscription would do the trick. Around lines 2091-2100 of subscription module :
and the last line, ~2130 :
Comment #9
SomebodySysop CreditAttribution: SomebodySysop commented@anrikun and @pjd
These sound like good solutions. Could you attach patches?
@cfab
This code looks like it ends the subscription. But, in what function does it go? hook_cron? Could you also supply a patch?
Thanks!
Comment #10
anrikun CreditAttribution: anrikun commentedI think there's so much to rewrite that a patch might not be easy to make, but I will try when I have more time.
Comment #11
tahiticlic CreditAttribution: tahiticlic commentedNope it doesn't end the subscription, it is a hack to avoid it since it is the problem here... As I wrote, it is the same of pjd's hack, but it introduces a test on the subscription duration (I didn't check it but the idea is here).
I don't know how to make patch. The lines to change are in
lm_paypal_process_in_subscr
function, near the end and after "Mark the subscription ended" comment, inlm_paypal_subscriptions.module
I don't understand #8 comment because having a Paypal account is not mandatory I think (is it?). Nevertheless, I agree that one-click payment is surely a better solution to deal with non reccurent payment.
Comment #12
anrikun CreditAttribution: anrikun commentedHi cfab!
Yes having a Paypal account is mandatory when using subscriptions (so that Paypal can rebill each cycle).
The (undocumented) problem with non recurrent subscriptions is that at the same time:
- Paypal still asks to create an account although there won't be any rebill => This way, Paypal treats a non recurrent payment like a recurrent payment.
- Paypal sends eot immediatly after payment => This way, Paypal treats a recurrent payment differently from a recurrent payment
So Paypal does not act consistently when dealing with non recurrent payments.
Comment #13
SomebodySysop CreditAttribution: SomebodySysop commentedJust for the record, I used the solution outlined in #6. In the case of a one time subscription, I still get the email from Paypal indicating that the profile is cancelled:
But, the subscription itself is NOT cancelled, so no more angry emails from subscribers.
It would be nice if there could be a way figured out how to handle this on the lm_paypal side.
Comment #14
tanoshimi CreditAttribution: tanoshimi commentedI've only just tried using lm_paypal, but it appears that I might have got stuck on the same problem as lots of other users, namely:
- I want to create the ability for users to make a 'one-time' payment via PayPal that doesn't involve them having a paypal account, and having done so I want to add that user to a role (so that they can access particular content).
- Ubercart and e-commerce are way too over the top for this (although could handle the task)
- Various other modules that claim to do similar things havent' been updated to D6
- lm_paypal seems to have two components each of which do half of what I want - the 'donations' allows a one-off payment, and doesn't require a paypal account, but I have no easy way of assigning a role to those users that have made the payment. The 'subscriptions' has a lot more options, but because of the way paypal defines their subscription model, has to be recurring and also has to have a paypal account, neither of which I want.
So, is it worth taking the efforts of people in this thread and others to create a new plugin for lm_paypal that deals with one-off payments, or should it be that the 'donations' module is made more generic? Is there any difference in the paypal API between handling 'payments' and handling 'donations'?
Comment #15
carlwohlforth CreditAttribution: carlwohlforth commentedI just got bitten by this one. Drupal 6.13, lm_paypal 6x-1.0.
Maybe a note can be added to the project page so people can find out ahead of time that non-recurring subscriptions don't currently work?
Comment #16
anrikun CreditAttribution: anrikun commented@tanoshimi
one-click and donate payments are the same in Paypal.
Comment #17
NickTech CreditAttribution: NickTech commentedHave the exact same problem here. Subscribing.
Comment #18
kerauno CreditAttribution: kerauno commentedThis has been fixed in the 6.x-2.x dev version if you have time to test.
Comment #19
arturoramos CreditAttribution: arturoramos commentedIn response to anrikun (#4) comment:
Your solution basically overrides all web_accept payment handlers and sends them all to the subscribe module. So if you are using lm_paypal for any other purposes on the site, those will be broken...
I have hacked mine by moving your first edit to the end of the function lm_paypal_process_in_web_accept function... assuming that subscriptions have an item number of 1 and all other payment handlers have been assigned item numbers other than 1:
Comment #20
anrikun CreditAttribution: anrikun commentedNice contribution arturoramos.
My solution is an ugly hack that works only for the purpose it was made for.
What would be great now would be to repack all the patches of this thread into the dev version.
But according to #18 it might be already in it.
I haven't had time to test it so far...
Comment #21
chic_geek CreditAttribution: chic_geek commentedI tried to update to 6.x-2.x dev. The install went smoothly, and I like the updates... the only problem is that it doesn't seem to recognize when a user is logged in, because when I'm logged in and go to the subscription page, it prompts me to create an account or log in in order to subscribe.
Any thoughts?
Comment #22
kerauno CreditAttribution: kerauno commentedhmmm. Haven't experienced this issue. I would first verify all permissions and make sure you are an allowed to access all the modules. Then if you continue to have a problem, try doing a complete uninstall and re-installing?
Thanks.
Comment #23
catya CreditAttribution: catya commentedI'm running into this same problem in the 7.x version - has anyone looked at it there?