d7803ec4045fbc39c697a18c0844d4fe24b3f890
3 * Test Generated example demonstrating the PaymentProcessorType.create API.
8 function payment_processor_type_create_example() {
11 'name' => 'API_Test_PP',
12 'title' => 'API Test Payment Processor',
13 'class_name' => 'CRM_Core_Payment_APITest',
14 'billing_mode' => 'form',
19 $result = civicrm_api3('PaymentProcessorType', 'create', $params);
21 catch (CiviCRM_API3_Exception
$e) {
23 $errorMessage = $e->getMessage();
24 $errorCode = $e->getErrorCode();
25 $errorData = $e->getExtraParams();
27 'error' => $errorMessage,
28 'error_code' => $errorCode,
29 'error_data' => $errorData,
37 * Function returns array of result expected from previous function.
42 function payment_processor_type_create_expectedresult() {
44 $expectedResult = array(
52 'name' => 'API_Test_PP',
53 'title' => 'API Test Payment Processor',
57 'user_name_label' => '',
58 'password_label' => '',
59 'signature_label' => '',
60 'subject_label' => '',
61 'class_name' => 'CRM_Core_Payment_APITest',
62 'url_site_default' => '',
63 'url_api_default' => '',
64 'url_recur_default' => '',
65 'url_button_default' => '',
66 'url_site_test_default' => '',
67 'url_api_test_default' => '',
68 'url_recur_test_default' => '',
69 'url_button_test_default' => '',
70 'billing_mode' => '1',
77 return $expectedResult;
81 * This example has been generated from the API test suite.
82 * The test that created it is called "testPaymentProcessorTypeCreate"
83 * and can be found at:
84 * https://github.com/civicrm/civicrm-core/blob/master/tests/phpunit/api/v3/PaymentProcessorTypeTest.php
86 * You can see the outcome of the API tests at
87 * https://test.civicrm.org/job/CiviCRM-master-git/
89 * To Learn about the API read
90 * http://wiki.civicrm.org/confluence/display/CRMDOC/Using+the+API
92 * Browse the api on your own site with the api explorer
93 * http://MYSITE.ORG/path/to/civicrm/api
95 * Read more about testing here
96 * http://wiki.civicrm.org/confluence/display/CRM/Testing
98 * API Standards documentation:
99 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards