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