X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=api%2Fv3%2FPaymentProcessorType.php;h=363436faac233dd186e9b0266255038c0a0f6045;hb=4f87ec96e8ba594ad1705a8806999bd0bc976bb0;hp=708460ac53198a0a76d3939ab3eb7d83a6c07e37;hpb=383164729863d20ddbd409b5dd6ff3561d8dbe07;p=civicrm-core.git diff --git a/api/v3/PaymentProcessorType.php b/api/v3/PaymentProcessorType.php index 708460ac53..363436faac 100644 --- a/api/v3/PaymentProcessorType.php +++ b/api/v3/PaymentProcessorType.php @@ -1,9 +1,9 @@ id]); - return civicrm_api3_create_success($relType, $params, 'payment_processor_type', 'create', $paymentProcessorType); + return civicrm_api3_create_success($relType, $params, 'PaymentProcessorType', 'create', $paymentProcessorType); } /** @@ -68,7 +59,7 @@ function civicrm_api3_payment_processor_type_create($params) { * The metadata is used for setting defaults, documentation & validation. * * @param array $params - * Array or parameters determined by getfields. + * Array of parameters determined by getfields. */ function _civicrm_api3_payment_processor_type_create_spec(&$params) { $params['billing_mode']['api.required'] = 1; @@ -78,11 +69,14 @@ function _civicrm_api3_payment_processor_type_create_spec(&$params) { // FIXME bool support // $params['is_recur']['api.required'] = 1; $params['name']['api.required'] = 1; $params['title']['api.required'] = 1; + $params['payment_instrument_id']['api.default'] = 'Credit Card'; } /** - * get all payment_processor types + * Get all payment_processor types. + * * @param array $params + * * @return array */ function civicrm_api3_payment_processor_type_get($params) { @@ -90,7 +84,7 @@ function civicrm_api3_payment_processor_type_get($params) { } /** - * Delete a payment_processor type delete + * Delete a payment_processor type delete. * * @param array $params * @@ -107,5 +101,5 @@ function civicrm_api3_payment_processor_type_delete($params) { if (!$result) { return civicrm_api3_create_error('Could not delete payment processor type'); } - return civicrm_api3_create_success($result, $params, 'payment_processor_type', 'delete', $payProcTypeBAO); + return civicrm_api3_create_success($result, $params, 'PaymentProcessorType', 'delete', $payProcTypeBAO); }