From: eileen Date: Sun, 16 Dec 2018 21:05:45 +0000 (+1300) Subject: Add default of TRUE for is_active on PaymentProcessor.create api. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=29adc103115c02648449fe5db1027dced716bbfe;p=civicrm-core.git Add default of TRUE for is_active on PaymentProcessor.create api. This is consistent with UFGroup, CustomGroup, ComtributionPage etc --- 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']]); }