Merge remote-tracking branch 'upstream/4.4' into 4.4-master-2014-01-13-11-57-38
[civicrm-core.git] / api / v3 / Contribution.php
index 6e12ef560377745f5ad45c2757259c47f5c5ae9d..370f8135a7c34ab4d6107be55310f53eda05d682 100644 (file)
@@ -122,6 +122,11 @@ function _civicrm_api3_contribution_create_spec(&$params) {
     'api.default' => 0,
     'description' => 'Do not add line items by default (if you wish to add your own)',
   );
+  $params['batch_id'] = array(
+    'title' => 'Batch',
+    'type' => 1,
+    'description' => 'Batch which relevant transactions should be added to',
+  );
 }
 
 /**
@@ -405,7 +410,7 @@ function civicrm_api3_contribution_completetransaction(&$params) {
     $ipn = new CRM_Core_Payment_BaseIPN();
     $ipn->completeTransaction($input, $ids, $objects, $transaction);
   }
-  catch(Exception$e) {
+  catch(Exception $e) {
     throw new API_Exception('failed to load related objects' . $e->getMessage() . "\n" . $e->getTraceAsString());
   }
 }