* @throws CiviCRM_API3_Exception
* @return array
*/
- public static function getAllPaymentProcessors($mode, $reset = FALSE) {
+ public static function getAllPaymentProcessors($mode = 'all', $reset = FALSE) {
- $cacheKey = 'CRM_Financial_BAO_Payment_Processor_' . ($mode ? 'test' : 'all') . '_' . CRM_Core_Config::domainID();
+ $cacheKey = 'CRM_Financial_BAO_Payment_Processor_' . $mode . '_' . CRM_Core_Config::domainID();
if (!$reset) {
$processors = CRM_Utils_Cache::singleton()->get($cacheKey);
if (!empty($processors)) {
public static function getPaymentProcessors($capabilities = array(), $ids = FALSE) {
$mode = NULL;
$testProcessors = in_array('TestMode', $capabilities) ? self::getAllPaymentProcessors('test') : array();
- $processors = $liveProcessors = self::getAllPaymentProcessors('live');
+ $processors = $liveProcessors = self::getAllPaymentProcessors('all');
if (in_array('TestMode', $capabilities)) {
if ($ids) {
* Flush processors from static cache.
*
* This is particularly used for tests.
- *
*/
public function flushProcessors() {
$this->cache = array();
- \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors(NULL, TRUE);
+ \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('all', TRUE);
+ \CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('live', TRUE);
\CRM_Financial_BAO_PaymentProcessor::getAllPaymentProcessors('test', TRUE);
}