When commerce_subscription receives a subscr_cancel on its IPN callback, it immediately revokes the subscription role.

Consider the following payment schedule with a billing cycle of 1 year.

0 start recurrring subscription
|
|
|
|
1 Payment due (via  IPN)
|
|
| <- user cancels July 1st, IPN receives subscr_cancel, role removed, even though user paid for an additional 6 months (!)
|
2 Payment due <- this is the point where the role should be removed 

Paypal accounts that did start receiving subscriptions on or after October 15, 2009 will not get a subscr_eot response on IPN when the subscription term ends (per Paypal Payments Standard Integration Guide p. 137). This means that commerce_subscription has to keep its own tabs on the payment due date for cancelled subscriptions and revoke the role when that date passes (assuming there's not another active subscription granting the same role).

Comments

heine’s picture

Contrary to the PayPal documentation, it appears that tnx_type => subscr_eot is send by at least the PayPal sand box.

If this can be confirmed for live, only IPN's with tnx_type subscr_eot should be used to remove a subscription.

instanceofjamie’s picture

Yep, that's absolutely correct :-)

If you want to roll a patch, please feel free. Otherwise I'll commit a fix in the next week or so.

deggertsen’s picture

Is there still a fix coming for this? I wouldn't even know where to begin myself.

ericbobson’s picture

subscribing, just wondering whether this ever got a fix