Merge pull request #17345 from eileenmcnaughton/ev_batch
[civicrm-core.git] / CRM / Core / Payment.php
index c40d3fe09c2d7ca9ccdba47902938321ac75795f..288359d4e5e5e710820932c2c676b8bbe3eae040 100644 (file)
@@ -622,6 +622,15 @@ abstract class CRM_Core_Payment {
     return '';
   }
 
+  /**
+   * Get the title of the payment processor to display to the user
+   *
+   * @return string
+   */
+  public function getTitle() {
+    return $this->getPaymentProcessor()['title'] ?? $this->getPaymentProcessor()['name'];
+  }
+
   /**
    * Getter for accessing member vars.
    *
@@ -1493,7 +1502,7 @@ abstract class CRM_Core_Payment {
    */
   public static function handlePaymentMethod($method, $params = []) {
     if (!isset($params['processor_id']) && !isset($params['processor_name'])) {
-      $q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, ''));
+      $q = explode('/', CRM_Utils_System::currentPath());
       $lastParam = array_pop($q);
       if (is_numeric($lastParam)) {
         $params['processor_id'] = $_GET['processor_id'] = $lastParam;