Add default of TRUE for is_active on PaymentProcessor.create api.
authoreileen <emcnaughton@wikimedia.org>
Sun, 16 Dec 2018 21:05:45 +0000 (10:05 +1300)
committereileen <emcnaughton@wikimedia.org>
Mon, 17 Dec 2018 00:34:14 +0000 (13:34 +1300)
This is consistent with UFGroup, CustomGroup, ComtributionPage etc

api/v3/PaymentProcessor.php
tests/phpunit/api/v3/PaymentProcessorTest.php

index 1a2b3caea2515cda64000604f2c3a7e96bc58c0a..75b82edb7565d0f7f18896e99266e1ed71e7019c 100644 (file)
@@ -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;
index e16796c8b36dc74c4078b4f0f583435cf4783b90..4faf20e9f7c9be21341f62d09d486a578b524343 100644 (file)
@@ -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']]);
   }