3 * Test Generated example of using contribution_page get API
6 function contribution_page_get_example(){
10 'financial_type_id' => 1,
14 $result = civicrm_api3('contribution_page', 'get', $params);
16 catch (CiviCRM_API3_Exception
$e) {
18 $errorMessage = $e->getMessage();
19 $errorCode = $e->getErrorCode();
20 $errorData = $e->getExtraParams();
21 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
28 * Function returns array of result expected from previous function
30 function contribution_page_get_expectedresult(){
32 $expectedResult = array(
40 'title' => 'Test Contribution Page',
41 'financial_type_id' => '1',
42 'is_credit_card_only' => 0,
45 'is_confirm_enabled' => '1',
46 'is_recur_interval' => 0,
47 'is_recur_installments' => 0,
49 'is_partial_payment' => 0,
50 'is_allow_other_amount' => 0,
51 'goal_amount' => '34567.00',
52 'is_for_organization' => 0,
53 'is_email_receipt' => 0,
54 'amount_block_is_active' => '1',
61 return $expectedResult;
66 * This example has been generated from the API test suite. The test that created it is called
68 * testGetContributionPageByAmount and can be found in
69 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
71 * You can see the outcome of the API tests at
72 * https://test.civicrm.org/job/CiviCRM-master-git/
74 * To Learn about the API read
75 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
77 * Browse the api on your own site with the api explorer
78 * http://MYSITE.ORG/path/to/civicrm/api/explorer
80 * Read more about testing here
81 * http://wiki.civicrm.org/confluence/display/CRM/Testing
83 * API Standards documentation:
84 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards