6 function contribution_get_example(){
8 'contribution_id' => 1,
12 $result = civicrm_api( 'contribution','get',$params );
18 * Function returns array of result expected from previous function
20 function contribution_get_expectedresult(){
22 $expectedResult = array(
30 'contact_type' => 'Individual',
31 'contact_sub_type' => '',
32 'sort_name' => 'Anderson, Anthony',
33 'display_name' => 'Mr. Anthony Anderson II',
34 'contribution_id' => '1',
36 'receive_date' => '2010-01-20 00:00:00',
37 'non_deductible_amount' => '10.00',
38 'total_amount' => '100.00',
39 'fee_amount' => '5.00',
40 'net_amount' => '95.00',
42 'invoice_id' => '78910',
44 'cancel_reason' => '',
46 'thankyou_date' => '',
47 'contribution_source' => 'SSF',
51 'contribution_status_id' => '1',
53 'contribution_campaign_id' => '',
54 'financial_type_id' => '1',
55 'financial_type' => 'Donation',
56 'instrument_id' => '',
57 'payment_instrument' => '',
61 'contribution_product_id' => '',
62 'product_option' => '',
63 'fulfilled_date' => '',
64 'contribution_start_date' => '',
65 'contribution_end_date' => '',
66 'contribution_recur_id' => '',
67 'financial_account_id' => '1',
68 'accounting_code' => '4200',
69 'contribution_note' => '',
70 'contribution_batch' => '',
71 'contribution_status' => 'Completed',
72 'contribution_payment_instrument' => '',
73 'contribution_check_number' => '',
79 return $expectedResult ;
84 * This example has been generated from the API test suite. The test that created it is called
86 * testGetContributionLegacyBehaviour and can be found in
87 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/ContributionTest.php
89 * You can see the outcome of the API tests at
90 * http://tests.dev.civicrm.org/trunk/results-api_v3
92 * To Learn about the API read
93 * http://book.civicrm.org/developer/current/techniques/api/
95 * and review the wiki at
96 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
98 * Read more about testing here
99 * http://wiki.civicrm.org/confluence/display/CRM/Testing
101 * API Standards documentation:
102 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards