Fix unreleased regression where processors using getPaymentDescription get a fatal
authoreileen <emcnaughton@wikimedia.org>
Mon, 9 Dec 2019 03:21:35 +0000 (16:21 +1300)
committereileen <emcnaughton@wikimedia.org>
Wed, 11 Dec 2019 22:52:45 +0000 (11:52 +1300)
commit3209a807f26543c3d1b0c1e5121bbab26afe3713
treef5a09af9e2ae9d052bd2a188ce6d4bfab0a17889
parent1a39ad7ca644db134c13fd7b7b6fb36b52fbb73a
Fix unreleased regression where processors using getPaymentDescription get a fatal

We added the new property bag in https://github.com/civicrm/civicrm-core/pull/15697 but in the back & forth the
call to the function getDescription was retained but the function was removed. This would leave the
core processor that calls it (Paypal std) with a fatal. The known external processor using it (Omnipay)
also hits a notice because the signature changed ($params became optional). From the Omnipay
pov I think it makes sense just to stop overriding the function - hence I am sneaking a tiny
change into this to make that possible.

Note the doPayment function ensures that propertyBag is set. There is a small chance that an external processor
is fully overriding doPayment AND calling this - that would be the case for Omnipay except I'll remove
the override in conjunction with this - so I've added a few lines to ensure it is set.

Note the test would fail with the changes to Payment_Dummmy & not the changes to Core_Payment so it provides
test cover
CRM/Core/Payment.php
CRM/Core/Payment/Dummy.php
Civi/Payment/PropertyBag.php
tests/phpunit/api/v3/PaymentProcessorTest.php