From 29adc103115c02648449fe5db1027dced716bbfe Mon Sep 17 00:00:00 2001 From: eileen Date: Mon, 17 Dec 2018 10:05:45 +1300 Subject: [PATCH] Add default of TRUE for is_active on PaymentProcessor.create api. This is consistent with UFGroup, CustomGroup, ComtributionPage etc --- api/v3/PaymentProcessor.php | 1 + tests/phpunit/api/v3/PaymentProcessorTest.php | 1 + 2 files changed, 2 insertions(+) diff --git a/api/v3/PaymentProcessor.php b/api/v3/PaymentProcessor.php index 1a2b3caea2..75b82edb75 100644 --- a/api/v3/PaymentProcessor.php +++ b/api/v3/PaymentProcessor.php @@ -61,6 +61,7 @@ function _civicrm_api3_payment_processor_create_spec(&$params) { $params['payment_processor_type_id']['api.required'] = 1; $params['is_default']['api.default'] = 0; $params['is_test']['api.default'] = 0; + $params['is_active']['api.default'] = TRUE; $params['domain_id']['api.default'] = CRM_Core_Config::domainID(); $params['financial_account_id']['api.default'] = CRM_Financial_BAO_PaymentProcessor::getDefaultFinancialAccountID(); $params['financial_account_id']['api.required'] = TRUE; diff --git a/tests/phpunit/api/v3/PaymentProcessorTest.php b/tests/phpunit/api/v3/PaymentProcessorTest.php index e16796c8b3..4faf20e9f7 100644 --- a/tests/phpunit/api/v3/PaymentProcessorTest.php +++ b/tests/phpunit/api/v3/PaymentProcessorTest.php @@ -105,6 +105,7 @@ class api_v3_PaymentProcessorTest extends CiviUnitTestCase { 'is_recur' => $params['is_recur'], 'payment_type' => 1, 'payment_instrument_id' => 1, + 'is_active' => 1, ); $this->checkArrayEquals($expectedResult, $result['values'][$result['id']]); } -- 2.25.1