Merge pull request #10988 from jmcclelland/CRM-21194
[civicrm-core.git] / api / v3 / PaymentProcessorType.php
index 9f3f4c09e05aad3c5ea926ced3d6171809a45bc4..9c2799650fcc805560e39d27403358f9a519d239 100644 (file)
  * @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');
 }
 
 /**