_civicrm_api3_contribution_create_legacy_support_45($params);
+ // make sure tax calculation is handled via api
+ $params = CRM_Contribute_BAO_Contribution::checkTaxAmount($params);
+
return _civicrm_api3_basic_create(_civicrm_api3_get_BAO(__FUNCTION__), $params, 'Contribution');
}
// @todo required for base ipn but problematic as api layer handles this
$transaction = new CRM_Core_Transaction();
$ipn = new CRM_Core_Payment_BaseIPN();
- $ipn->completeTransaction($input, $ids, $objects, $transaction);
+ $ipn->completeTransaction($input, $ids, $objects, $transaction, !empty($contribution->contribution_recur_id));
}
catch(Exception $e) {
throw new API_Exception('failed to load related objects' . $e->getMessage() . "\n" . $e->getTraceAsString());
}
/**
+ * provide function metadata
* @param $params
*/
-function _civicrm_api3_contribution_completetransaction(&$params) {
+function _civicrm_api3_contribution_completetransaction_spec(&$params) {
$params['id'] = array(
'title' => 'Contribution ID',
'type' => CRM_Utils_Type::T_INT,