* @param array $params
*
* @return array
+ * API result array
*/
function civicrm_api3_payment_processor_create($params) {
+ if (empty($params['id']) && empty($params['payment_instrument_id'])) {
+ $params['payment_instrument_id'] = civicrm_api3('PaymentProcessorType', 'getvalue', array(
+ 'id' => $params['payment_processor_type_id'],
+ 'return' => 'payment_instrument_id',
+ ));
+ }
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params);
}
* @param array $params
*
* @return array
- * API result Array
+ * API result array
*/
function civicrm_api3_payment_processor_delete($params) {
return _civicrm_api3_basic_delete(_civicrm_api3_get_BAO(__FUNCTION__), $params);
* Array of name/value pairs.
*
* @return array
- * details of found PaymentProcessor
+ * API result array
*/
function civicrm_api3_payment_processor_get($params) {
return _civicrm_api3_basic_get(_civicrm_api3_get_BAO(__FUNCTION__), $params);