Is there a way to prevent subscriptions paid by eCheck from going active until after the echeck clears?
Currently if someone pays for a subscription via echeck, LM_Paypal activates the subscription immediately instead of waiting for the echeck to clear..

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mrtoner’s picture

Assigned: Unassigned » mrtoner

I noticed that when looking at the code last night. Although lm_paypal ignores pending payments, it accepts a subscription creation as reason to assign the role/group/node. I understand the reason for this: a free trial won't generate a payment for the trial period, so the assignation must happen during subscription creation.

To keep non-free subscription signups from going active when the payment is pending, it should be possible to test the IPN variable amount1 and only activate for a value of '0' (free trial). All other signups will only activate upon payment completion. I'll write a patch and upload it tomorrow.

mrtoner’s picture

Category: support » bug
Status: Active » Needs review
FileSize
2.55 KB

Okay, this patch changes the behavior of a subscription signup. A transaction of "subscr_signup" will only escalate a role/group if the signup has a free trial. For all other signups, the role/group escalation will occur when the payment is completed.

YMMV. Please test fully.

MrGeek’s picture

Thanks..
I'm willing to give it a run, but, can you point me in the direction of the easiest way to apply this patch ?

mrtoner’s picture

MrGeek’s picture

Thank you MrToner..
Before i go ahead and apply the patch i want to verify this is for/will work with my v4.7 install ?

mrtoner’s picture

I only tested this on a 5.x installation, but the version of lm_paypal that the patch applies to (HEAD) is suitable for 4.7 as well. There's nothing in there specific to either core version.

John Franklin’s picture

Version: master » 6.x-2.x-dev
Component: Code » LM Paypal Subscriptions
John Franklin’s picture

Status: Needs review » Needs work

This patch no longer applies cleanly. A surprise to no one, I'm sure.