dev/core#927 Remove code to update recur on cancel & fail
authoreileen <emcnaughton@wikimedia.org>
Wed, 21 Oct 2020 00:08:17 +0000 (13:08 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 21 Oct 2020 00:09:21 +0000 (13:09 +1300)
commiteb1e43261577799187817423f30d9d4e23230ff2
tree2836b2e36dd13b63d6c2d903ab0c485696101d64
parent47de3d1b8b97289dde16f363680b2b660ce82b6b
dev/core#927 Remove code to update recur on cancel & fail

I've been racking my brains as to why we do this and it just feels like copy & paste that has survived forever

This code is called only from the 2 PaypalIPN classes. In both cases the classes follow the same flow - ie

if the payment is part of a recurring series, then call recur
if the payment is NOT the first in the series then call repeattransaction
only proceed to the 'single' function if we are confirming the
first recurring payment or it is not recurring

This means the cancelled & failed functions can only be reached when the flow is not
recurring OR the payment is the first - in neither case does it make sense to copy date
from one payment in the series to others - I'm pretty sure this precedes many many code changes
CRM/Contribute/BAO/ContributionRecur.php
CRM/Core/Payment/BaseIPN.php