Merge pull request #20022 from mattwire/dopaymentpropertybag
authorEileen McNaughton <emcnaughton@wikimedia.org>
Sun, 11 Apr 2021 04:58:38 +0000 (16:58 +1200)
committerGitHub <noreply@github.com>
Sun, 11 Apr 2021 04:58:38 +0000 (16:58 +1200)
Use propertyBag in doPayment

1  2 
CRM/Core/Payment.php

index f1df22a94a5e648a203ded97a34aaabb94b2fa22,71f9e55516b2cce4e69e6159d84ae6269dc72bf3..03ce78a7f80c624a2e34ae517be2c017a1391e48
@@@ -1348,10 -1349,9 +1349,10 @@@ abstract class CRM_Core_Payment 
  
      // If we have a $0 amount, skip call to processor and set payment_status to Completed.
      // Conceivably a processor might override this - perhaps for setting up a token - but we don't
-     // have an example of that at the mome.
-     if ($params['amount'] == 0) {
+     // have an example of that at the moment.
+     if ($propertyBag->getAmount() == 0) {
        $result['payment_status_id'] = array_search('Completed', $statuses);
 +      $result['payment_status'] = 'Completed';
        return $result;
      }