3 * Test Generated example of using payment_processor_type create API
6 function payment_processor_type_create_example(){
9 'name' => 'API_Test_PP',
10 'title' => 'API Test Payment Processor',
11 'class_name' => 'CRM_Core_Payment_APITest',
12 'billing_mode' => 'form',
17 $result = civicrm_api3('payment_processor_type', 'create', $params);
19 catch (CiviCRM_API3_Exception
$e) {
21 $errorMessage = $e->getMessage();
22 $errorCode = $e->getErrorCode();
23 $errorData = $e->getExtraParams();
24 return array('error' => $errorMessage, 'error_code' => $errorCode, 'error_data' => $errorData);
31 * Function returns array of result expected from previous function
33 function payment_processor_type_create_expectedresult(){
35 $expectedResult = array(
43 'name' => 'API_Test_PP',
44 'title' => 'API Test Payment Processor',
48 'user_name_label' => '',
49 'password_label' => '',
50 'signature_label' => '',
51 'subject_label' => '',
52 'class_name' => 'CRM_Core_Payment_APITest',
53 'url_site_default' => '',
54 'url_api_default' => '',
55 'url_recur_default' => '',
56 'url_button_default' => '',
57 'url_site_test_default' => '',
58 'url_api_test_default' => '',
59 'url_recur_test_default' => '',
60 'url_button_test_default' => '',
61 'billing_mode' => '1',
68 return $expectedResult;
73 * This example has been generated from the API test suite. The test that created it is called
75 * testPaymentProcessorTypeCreate and can be found in
76 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PaymentProcessorTypeTest.php
78 * You can see the outcome of the API tests at
79 * http://tests.dev.civicrm.org/trunk/results-api_v3
81 * To Learn about the API read
82 * http://book.civicrm.org/developer/current/techniques/api/
84 * and review the wiki at
85 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
87 * Read more about testing here
88 * http://wiki.civicrm.org/confluence/display/CRM/Testing
90 * API Standards documentation:
91 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards