<?php
/**
- * @file
- * Test Generated API Example.
- * See bottom of this file for more detail.
- */
-
-/**
- * Test Generated example of using contact get API.
+ * Test Generated example demonstrating the Contact.get API.
*
- * /*this demonstrates the usage of chained api functions. In this case no notes or custom fields have been created
+ * This demonstrates the usage of chained api functions.
+ * In this case no notes or custom fields have been created.
*
* @return array
* API result array
);
try{
- $result = civicrm_api3('contact', 'get', $params);
+ $result = civicrm_api3('Contact', 'get', $params);
}
catch (CiviCRM_API3_Exception $e) {
// Handle error here.
'contribution_campaign_id' => '',
'financial_type_id' => '1',
'financial_type' => 'Donation',
- 'instrument_id' => '86',
- 'payment_instrument' => 'Credit Card',
'product_id' => '',
'product_name' => '',
'sku' => '',
'contribution_note' => '',
'contribution_batch' => '',
'contribution_status' => 'Completed',
- 'contribution_payment_instrument' => 'Credit Card',
+ 'payment_instrument' => 'Credit Card',
+ 'payment_instrument_id' => '1',
+ 'instrument_id' => '1',
'contribution_check_number' => '',
'id' => '2',
'contribution_type_id' => '1',
return $expectedResult;
}
-/**
+/*
* This example has been generated from the API test suite.
-* The test that created it is called
-* testGetIndividualWithChainedArrays
-* and can be found in
+* The test that created it is called "testGetIndividualWithChainedArrays"
+* and can be found at:
* https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContactTest.php
*
* You can see the outcome of the API tests at
* http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
*
* Browse the api on your own site with the api explorer
-* http://MYSITE.ORG/path/to/civicrm/api/explorer
+* http://MYSITE.ORG/path/to/civicrm/api
*
* Read more about testing here
* http://wiki.civicrm.org/confluence/display/CRM/Testing