3 * Test Generated example demonstrating the ContributionPage.get API.
8 function contribution_page_get_example() {
12 'financial_type_id' => 1,
16 $result = civicrm_api3('ContributionPage', 'get', $params);
18 catch (CiviCRM_API3_Exception
$e) {
20 $errorMessage = $e->getMessage();
21 $errorCode = $e->getErrorCode();
22 $errorData = $e->getExtraParams();
24 'error' => $errorMessage,
25 'error_code' => $errorCode,
26 'error_data' => $errorData,
34 * Function returns array of result expected from previous function.
39 function contribution_page_get_expectedresult() {
41 $expectedResult = array(
49 'title' => 'Test Contribution Page',
50 'financial_type_id' => '1',
51 'is_credit_card_only' => 0,
54 'is_confirm_enabled' => '1',
55 'is_recur_interval' => 0,
56 'is_recur_installments' => 0,
57 'is_pay_later' => '1',
58 'is_partial_payment' => 0,
59 'is_allow_other_amount' => 0,
60 'goal_amount' => '34567.00',
61 'is_for_organization' => 0,
62 'is_email_receipt' => 0,
64 'amount_block_is_active' => '1',
67 'is_billing_required' => 0,
72 return $expectedResult;
76 * This example has been generated from the API test suite.
77 * The test that created it is called "testGetContributionPageByAmount"
78 * and can be found at:
79 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/ContributionPageTest.php
81 * You can see the outcome of the API tests at
82 * https://test.civicrm.org/job/CiviCRM-master-git/
84 * To Learn about the API read
85 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
87 * Browse the api on your own site with the api explorer
88 * http://MYSITE.ORG/path/to/civicrm/api
90 * Read more about testing here
91 * http://wiki.civicrm.org/confluence/display/CRM/Testing
93 * API Standards documentation:
94 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards