* @return bool
*/
protected function supportsLiveMode() {
- return empty($this->_paymentProcessor['is_test']) ? TRUE : FALSE;
+ return empty($this->_paymentProcessor['is_test']);
}
/**
* @return bool
*/
protected function supportsTestMode() {
- return empty($this->_paymentProcessor['is_test']) ? FALSE : TRUE;
+ return !empty($this->_paymentProcessor['is_test']);
}
/**
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.
*
*/
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;