Merge pull request #12487 from agh1/rel-permission-icon-titles-aydun
[civicrm-core.git] / api / v3 / PaymentProcessorType.php
index 9f3f4c09e05aad3c5ea926ced3d6171809a45bc4..337839693525beb7a6acb5f48c826d3037627b1c 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.7                                                |
+ | CiviCRM version 5                                                  |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  * @return array
  */
 function civicrm_api3_payment_processor_type_create($params) {
-  if (isset($params['id']) && !CRM_Utils_Rule::integer($params['id'])) {
-    return civicrm_api3_create_error('Invalid value for payment_processor type ID');
-  }
-
-  $paymentProcessorType = CRM_Financial_BAO_PaymentProcessorType::create($params);
-
-  $relType = array();
-
-  _civicrm_api3_object_to_array($paymentProcessorType, $relType[$paymentProcessorType->id]);
-
-  return civicrm_api3_create_success($relType, $params, 'PaymentProcessorType', 'create', $paymentProcessorType);
+  return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'PaymentProcessorType');
 }
 
 /**