Make it clear that doDirectPayment/doTransferCheckout are deprecated and should not...
authorMatthew Wire <mjw@mjwconsult.co.uk>
Fri, 9 Apr 2021 10:13:58 +0000 (11:13 +0100)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Sat, 10 Apr 2021 09:10:40 +0000 (10:10 +0100)
CRM/Core/Payment.php

index 8064029670ca052daecd2106bf2e6f279ed6a799..cdee696050797d195d608868ef6001d6bae5e9c2 100644 (file)
@@ -1298,6 +1298,23 @@ abstract class CRM_Core_Payment {
    *   the result in an nice formatted array (or an error object - but throwing exceptions is preferred)
    */
   protected function doDirectPayment(&$params) {
+    CRM_Core_Error::deprecatedFunctionWarning('doPayment');
+    return $params;
+  }
+
+  /**
+   * Calling this from outside the payment subsystem is deprecated - use doPayment.
+   * @deprecated
+   *
+   * @param array $params
+   *   Assoc array of input parameters for this transaction.
+   * @param string $component
+   *
+   * @return array
+   *   the result in an nice formatted array (or an error object - but throwing exceptions is preferred)
+   */
+  protected function doTransferCheckout(&$params, $component = 'contribute') {
+    CRM_Core_Error::deprecatedFunctionWarning('doPayment');
     return $params;
   }