[REF] Paypal ipn - cleanup references to completion
authorEileen McNaughton <emcnaughton@wikimedia.org>
Mon, 24 May 2021 22:59:56 +0000 (10:59 +1200)
committerEileen McNaughton <emcnaughton@wikimedia.org>
Tue, 25 May 2021 03:03:02 +0000 (15:03 +1200)
commit65e978281bfd3fce49e5a04f440c8992cd516852
tree616e663460f54fffc3096ba86067e6d48b8f83e0
parent66193dec0e396a1199e4e56f1767844f2754a241
[REF] Paypal ipn - cleanup references to completion

This extracts a function to check if the contribution is completed.

I also rationalised the validation - it was using a combo of recur and first to
validate but on thinking it through I realised all it was saying was
'if we are finalising a pending contribution the amount must match'

I think that's fine even for recur with a change in amount - that seems
to me to be something that happens down the track but we still expect
the very first one to come in with the value it originally
had - if that is NOT true then we probably should just remove the check
CRM/Core/Payment/PayPalProIPN.php
tests/phpunit/CRM/Core/Payment/PayPalProIPNTest.php