Clarify doRefund() signature
authorMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 5 Dec 2023 00:19:36 +0000 (00:19 +0000)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Tue, 5 Dec 2023 18:35:19 +0000 (18:35 +0000)
CRM/Core/Payment.php

index 373f8d1c631273cd6d583c28426251cc3c22a6b2..bc9a08b1406c607bd74e05e32146d667b7f9b2e8 100644 (file)
@@ -1512,13 +1512,14 @@ abstract class CRM_Core_Payment {
   /**
    * Refunds payment
    *
-   * Payment processors should set payment_status_id if it set the status to Refunded in case the transaction is successful
-   *
    * @param array $params
    *
-   * @throws \Civi\Payment\Exception\PaymentProcessorException
+   * @return array
+   *   Result array (containing at least the key refund_status)
    */
-  public function doRefund(&$params) {}
+  public function doRefund(&$params) {
+    return ['refund_status' => 'Completed'];
+  }
 
   /**
    * Query payment processor for details about a transaction.