+--------------------------------------------------------------------+
| CiviCRM version 4.7 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015 |
+ | Copyright CiviCRM LLC (c) 2004-2017 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
* @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');
}
/**