Merge pull request #972 from deepak-srivastava/hr
[civicrm-core.git] / api / v3 / examples / PaymentProcessorTypeCreate.php
1 <?php
2
3 /*
4
5 */
6 function payment_processor_type_create_example(){
7 $params = array(
8 'version' => 3,
9 'sequential' => 1,
10 'name' => 'API_Test_PP',
11 'title' => 'API Test Payment Processor',
12 'class_name' => 'CRM_Core_Payment_APITest',
13 'billing_mode' => 'form',
14 'is_recur' => 0,
15 );
16
17 $result = civicrm_api( 'payment_processor_type','create',$params );
18
19 return $result;
20 }
21
22 /*
23 * Function returns array of result expected from previous function
24 */
25 function payment_processor_type_create_expectedresult(){
26
27 $expectedResult = array(
28 'is_error' => 0,
29 'version' => 3,
30 'count' => 1,
31 'id' => 1,
32 'values' => array(
33 '0' => array(
34 'id' => '1',
35 'name' => 'API_Test_PP',
36 'title' => 'API Test Payment Processor',
37 'description' => '',
38 'is_active' => '1',
39 'is_default' => '',
40 'user_name_label' => '',
41 'password_label' => '',
42 'signature_label' => '',
43 'subject_label' => '',
44 'class_name' => 'CRM_Core_Payment_APITest',
45 'url_site_default' => '',
46 'url_api_default' => '',
47 'url_recur_default' => '',
48 'url_button_default' => '',
49 'url_site_test_default' => '',
50 'url_api_test_default' => '',
51 'url_recur_test_default' => '',
52 'url_button_test_default' => '',
53 'billing_mode' => '1',
54 'is_recur' => 0,
55 'payment_type' => '',
56 ),
57 ),
58 );
59
60 return $expectedResult ;
61 }
62
63
64 /*
65 * This example has been generated from the API test suite. The test that created it is called
66 *
67 * testPaymentProcessorTypeCreate and can be found in
68 * http://svn.civicrm.org/civicrm/trunk/tests/phpunit/CiviTest/api/v3/PaymentProcessorTypeTest.php
69 *
70 * You can see the outcome of the API tests at
71 * http://tests.dev.civicrm.org/trunk/results-api_v3
72 *
73 * To Learn about the API read
74 * http://book.civicrm.org/developer/current/techniques/api/
75 *
76 * and review the wiki at
77 * http://wiki.civicrm.org/confluence/display/CRMDOC/CiviCRM+Public+APIs
78 *
79 * Read more about testing here
80 * http://wiki.civicrm.org/confluence/display/CRM/Testing
81 *
82 * API Standards documentation:
83 * http://wiki.civicrm.org/confluence/display/CRM/API+Architecture+Standards
84 */