3 * Test Generated example of using payment_processor create API
6 function payment_processor_create_example(){
8 'name' => 'API Test PP',
9 'payment_processor_type_id' => 1,
10 'class_name' => 'CRM_Core_Payment_APITest',
16 $result = civicrm_api3('payment_processor', 'create', $params);
18 catch (CiviCRM_API3_Exception
$e) {
20 $errorMessage = $e->getMessage();
21 $errorCode = $e->getErrorCode();
22 $errorData = $e->getExtraParams();
23 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
30 * Function returns array of result expected from previous function
32 function payment_processor_create_expectedresult(){
34 $expectedResult = array(
43 'name' => 'API Test PP',
45 'payment_processor_type_id' => '1',
57 'class_name' => 'CRM_Core_Payment_APITest',
58 'billing_mode' => '1',
60 'payment_type' => '1',
65 return $expectedResult;
70 * This example has been generated from the API test suite. The test that created it is called
72 * testPaymentProcessorCreate and can be found in
73 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTest.php
75 * You can see the outcome of the API tests at
76 * https://test.civicrm.org/job/CiviCRM-master-git/
78 * To Learn about the API read
79 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
81 * Browse the api on your own site with the api explorer
82 * http://MYSITE.ORG/path/to/civicrm/api/explorer
84 * Read more about testing here
85 * http://wiki.civicrm.org/confluence/display/CRM/Testing
87 * API Standards documentation:
88 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards