3 * Test Generated example of using payment_processor create API.
8 function payment_processor_create_example() {
10 'name' => 'API Test PP',
11 'payment_processor_type_id' => 1,
12 'class_name' => 'CRM_Core_Payment_APITest',
18 $result = civicrm_api3('payment_processor', 'create', $params);
20 catch (CiviCRM_API3_Exception
$e) {
22 $errorMessage = $e->getMessage();
23 $errorCode = $e->getErrorCode();
24 $errorData = $e->getExtraParams();
26 'error' => $errorMessage,
27 'error_code' => $errorCode,
28 'error_data' => $errorData,
36 * Function returns array of result expected from previous function.
41 function payment_processor_create_expectedresult() {
43 $expectedResult = array(
52 'name' => 'API Test PP',
54 'payment_processor_type_id' => '18',
66 'class_name' => 'CRM_Core_Payment_APITest',
67 'billing_mode' => '1',
69 'payment_type' => '1',
74 return $expectedResult;
78 * This example has been generated from the API test suite.
79 * The test that created it is called
80 * testPaymentProcessorCreate
82 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php
84 * You can see the outcome of the API tests at
85 * https://test.civicrm.org/job/CiviCRM-master-git/
87 * To Learn about the API read
88 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
90 * Browse the api on your own site with the api explorer
91 * http://MYSITE.ORG/path/to/civicrm/api
93 * Read more about testing here
94 * http://wiki.civicrm.org/confluence/display/CRM/Testing
96 * API Standards documentation:
97 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards