Commit | Line | Data |
---|---|---|
e501603b TO |
1 | <?php |
2 | /* | |
3 | +--------------------------------------------------------------------+ | |
4 | | CiviCRM version 4.7 | | |
5 | +--------------------------------------------------------------------+ | |
0f03f337 | 6 | | Copyright CiviCRM LLC (c) 2004-2017 | |
e501603b TO |
7 | +--------------------------------------------------------------------+ |
8 | | This file is a part of CiviCRM. | | |
9 | | | | |
10 | | CiviCRM is free software; you can copy, modify, and distribute it | | |
11 | | under the terms of the GNU Affero General Public License | | |
12 | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | |
13 | | | | |
14 | | CiviCRM is distributed in the hope that it will be useful, but | | |
15 | | WITHOUT ANY WARRANTY; without even the implied warranty of | | |
16 | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | |
17 | | See the GNU Affero General Public License for more details. | | |
18 | | | | |
19 | | You should have received a copy of the GNU Affero General Public | | |
20 | | License and the CiviCRM Licensing Exception along | | |
21 | | with this program; if not, contact CiviCRM LLC | | |
22 | | at info[AT]civicrm[DOT]org. If you have questions about the | | |
23 | | GNU Affero General Public License or the licensing of CiviCRM, | | |
24 | | see the CiviCRM license FAQ at http://civicrm.org/licensing | | |
25 | +--------------------------------------------------------------------+ | |
26 | */ | |
27 | /** | |
28 | * @package CRM | |
0f03f337 | 29 | * @copyright CiviCRM LLC (c) 2004-2017 |
e501603b TO |
30 | * |
31 | * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml | |
32 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
022785d8 | 33 | * (GenCodeChecksum:d638c879011835041875c04db5831748) |
e501603b TO |
34 | */ |
35 | require_once 'CRM/Core/DAO.php'; | |
36 | require_once 'CRM/Utils/Type.php'; | |
f41f0342 | 37 | /** |
38 | * CRM_Financial_DAO_PaymentProcessor constructor. | |
39 | */ | |
e501603b TO |
40 | class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO { |
41 | /** | |
f41f0342 | 42 | * Static instance to hold the table name. |
e501603b TO |
43 | * |
44 | * @var string | |
45 | */ | |
46 | static $_tableName = 'civicrm_payment_processor'; | |
e501603b | 47 | /** |
f41f0342 | 48 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b TO |
49 | * |
50 | * @var boolean | |
51 | */ | |
52 | static $_log = false; | |
53 | /** | |
54 | * Payment Processor ID | |
55 | * | |
56 | * @var int unsigned | |
57 | */ | |
58 | public $id; | |
59 | /** | |
60 | * Which Domain is this match entry for | |
61 | * | |
62 | * @var int unsigned | |
63 | */ | |
64 | public $domain_id; | |
65 | /** | |
66 | * Payment Processor Name. | |
67 | * | |
68 | * @var string | |
69 | */ | |
70 | public $name; | |
71 | /** | |
72 | * Payment Processor Description. | |
73 | * | |
74 | * @var string | |
75 | */ | |
76 | public $description; | |
77 | /** | |
78 | * | |
79 | * @var int unsigned | |
80 | */ | |
81 | public $payment_processor_type_id; | |
82 | /** | |
83 | * Is this processor active? | |
84 | * | |
85 | * @var boolean | |
86 | */ | |
87 | public $is_active; | |
88 | /** | |
89 | * Is this processor the default? | |
90 | * | |
91 | * @var boolean | |
92 | */ | |
93 | public $is_default; | |
94 | /** | |
95 | * Is this processor for a test site? | |
96 | * | |
97 | * @var boolean | |
98 | */ | |
99 | public $is_test; | |
100 | /** | |
101 | * | |
102 | * @var string | |
103 | */ | |
104 | public $user_name; | |
105 | /** | |
106 | * | |
107 | * @var string | |
108 | */ | |
109 | public $password; | |
110 | /** | |
111 | * | |
112 | * @var text | |
113 | */ | |
114 | public $signature; | |
115 | /** | |
116 | * | |
117 | * @var string | |
118 | */ | |
119 | public $url_site; | |
120 | /** | |
121 | * | |
122 | * @var string | |
123 | */ | |
124 | public $url_api; | |
125 | /** | |
126 | * | |
127 | * @var string | |
128 | */ | |
129 | public $url_recur; | |
130 | /** | |
131 | * | |
132 | * @var string | |
133 | */ | |
134 | public $url_button; | |
135 | /** | |
136 | * | |
137 | * @var string | |
138 | */ | |
139 | public $subject; | |
140 | /** | |
141 | * | |
142 | * @var string | |
143 | */ | |
144 | public $class_name; | |
145 | /** | |
146 | * Billing Mode (deprecated) | |
147 | * | |
148 | * @var int unsigned | |
149 | */ | |
150 | public $billing_mode; | |
151 | /** | |
152 | * Can process recurring contributions | |
153 | * | |
154 | * @var boolean | |
155 | */ | |
156 | public $is_recur; | |
157 | /** | |
158 | * Payment Type: Credit or Debit (deprecated) | |
159 | * | |
160 | * @var int unsigned | |
161 | */ | |
162 | public $payment_type; | |
163 | /** | |
164 | * Payment Instrument ID | |
165 | * | |
166 | * @var int unsigned | |
167 | */ | |
168 | public $payment_instrument_id; | |
cb5962bd SL |
169 | /** |
170 | * array of accepted credit card types | |
171 | * | |
172 | * @var text | |
173 | */ | |
174 | public $accepted_credit_cards; | |
e501603b | 175 | /** |
f41f0342 | 176 | * Class constructor. |
e501603b TO |
177 | */ |
178 | function __construct() { | |
179 | $this->__table = 'civicrm_payment_processor'; | |
180 | parent::__construct(); | |
181 | } | |
182 | /** | |
f41f0342 | 183 | * Returns foreign keys and entity references. |
e501603b TO |
184 | * |
185 | * @return array | |
186 | * [CRM_Core_Reference_Interface] | |
187 | */ | |
188 | static function getReferenceColumns() { | |
346aaaba TO |
189 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
190 | Civi::$statics[__CLASS__]['links'] = static ::createReferenceColumns(__CLASS__); | |
191 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'domain_id', 'civicrm_domain', 'id'); | |
192 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id'); | |
193 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); | |
e501603b | 194 | } |
346aaaba | 195 | return Civi::$statics[__CLASS__]['links']; |
e501603b TO |
196 | } |
197 | /** | |
198 | * Returns all the column names of this table | |
199 | * | |
200 | * @return array | |
201 | */ | |
202 | static function &fields() { | |
346aaaba TO |
203 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
204 | Civi::$statics[__CLASS__]['fields'] = array( | |
e501603b TO |
205 | 'id' => array( |
206 | 'name' => 'id', | |
207 | 'type' => CRM_Utils_Type::T_INT, | |
208 | 'title' => ts('Payment Processor ID') , | |
209 | 'description' => 'Payment Processor ID', | |
210 | 'required' => true, | |
522a26c9 | 211 | 'table_name' => 'civicrm_payment_processor', |
212 | 'entity' => 'PaymentProcessor', | |
213 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
214 | ) , |
215 | 'domain_id' => array( | |
216 | 'name' => 'domain_id', | |
217 | 'type' => CRM_Utils_Type::T_INT, | |
218 | 'title' => ts('Payment Processor Domain') , | |
219 | 'description' => 'Which Domain is this match entry for', | |
220 | 'required' => true, | |
522a26c9 | 221 | 'table_name' => 'civicrm_payment_processor', |
222 | 'entity' => 'PaymentProcessor', | |
223 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
224 | 'FKClassName' => 'CRM_Core_DAO_Domain', |
225 | 'pseudoconstant' => array( | |
226 | 'table' => 'civicrm_domain', | |
227 | 'keyColumn' => 'id', | |
228 | 'labelColumn' => 'name', | |
229 | ) | |
230 | ) , | |
231 | 'name' => array( | |
232 | 'name' => 'name', | |
233 | 'type' => CRM_Utils_Type::T_STRING, | |
234 | 'title' => ts('Payment Processor') , | |
235 | 'description' => 'Payment Processor Name.', | |
236 | 'maxlength' => 64, | |
237 | 'size' => CRM_Utils_Type::BIG, | |
522a26c9 | 238 | 'table_name' => 'civicrm_payment_processor', |
239 | 'entity' => 'PaymentProcessor', | |
240 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 241 | 'html' => array( |
242 | 'type' => 'Text', | |
243 | ) , | |
e501603b TO |
244 | ) , |
245 | 'description' => array( | |
246 | 'name' => 'description', | |
247 | 'type' => CRM_Utils_Type::T_STRING, | |
248 | 'title' => ts('Processor Description') , | |
249 | 'description' => 'Payment Processor Description.', | |
250 | 'maxlength' => 255, | |
251 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 252 | 'table_name' => 'civicrm_payment_processor', |
253 | 'entity' => 'PaymentProcessor', | |
254 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
255 | ) , |
256 | 'payment_processor_type_id' => array( | |
257 | 'name' => 'payment_processor_type_id', | |
258 | 'type' => CRM_Utils_Type::T_INT, | |
259 | 'title' => ts('Payment Processor Type ID') , | |
522a26c9 | 260 | 'table_name' => 'civicrm_payment_processor', |
261 | 'entity' => 'PaymentProcessor', | |
262 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
263 | 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType', |
264 | 'pseudoconstant' => array( | |
265 | 'table' => 'civicrm_payment_processor_type', | |
266 | 'keyColumn' => 'id', | |
267 | 'labelColumn' => 'title', | |
268 | ) | |
269 | ) , | |
270 | 'is_active' => array( | |
271 | 'name' => 'is_active', | |
272 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
273 | 'title' => ts('Processor is Active?') , | |
274 | 'description' => 'Is this processor active?', | |
522a26c9 | 275 | 'table_name' => 'civicrm_payment_processor', |
276 | 'entity' => 'PaymentProcessor', | |
277 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
278 | ) , |
279 | 'is_default' => array( | |
280 | 'name' => 'is_default', | |
281 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
282 | 'title' => ts('Processor Is Default?') , | |
283 | 'description' => 'Is this processor the default?', | |
522a26c9 | 284 | 'table_name' => 'civicrm_payment_processor', |
285 | 'entity' => 'PaymentProcessor', | |
286 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
287 | ) , |
288 | 'is_test' => array( | |
289 | 'name' => 'is_test', | |
290 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
291 | 'title' => ts('Is Test Processor?') , | |
292 | 'description' => 'Is this processor for a test site?', | |
522a26c9 | 293 | 'table_name' => 'civicrm_payment_processor', |
294 | 'entity' => 'PaymentProcessor', | |
295 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
296 | ) , |
297 | 'user_name' => array( | |
298 | 'name' => 'user_name', | |
299 | 'type' => CRM_Utils_Type::T_STRING, | |
300 | 'title' => ts('User Name') , | |
301 | 'maxlength' => 255, | |
302 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 303 | 'table_name' => 'civicrm_payment_processor', |
304 | 'entity' => 'PaymentProcessor', | |
305 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 306 | 'html' => array( |
307 | 'type' => 'Text', | |
308 | ) , | |
e501603b TO |
309 | ) , |
310 | 'password' => array( | |
311 | 'name' => 'password', | |
312 | 'type' => CRM_Utils_Type::T_STRING, | |
313 | 'title' => ts('Password') , | |
314 | 'maxlength' => 255, | |
315 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 316 | 'table_name' => 'civicrm_payment_processor', |
317 | 'entity' => 'PaymentProcessor', | |
318 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 319 | 'html' => array( |
320 | 'type' => 'Text', | |
321 | ) , | |
e501603b TO |
322 | ) , |
323 | 'signature' => array( | |
324 | 'name' => 'signature', | |
325 | 'type' => CRM_Utils_Type::T_TEXT, | |
326 | 'title' => ts('Signature') , | |
1d2a585a | 327 | 'rows' => 4, |
328 | 'cols' => 40, | |
522a26c9 | 329 | 'table_name' => 'civicrm_payment_processor', |
330 | 'entity' => 'PaymentProcessor', | |
331 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 332 | 'html' => array( |
333 | 'type' => 'TextArea', | |
334 | ) , | |
e501603b TO |
335 | ) , |
336 | 'url_site' => array( | |
337 | 'name' => 'url_site', | |
338 | 'type' => CRM_Utils_Type::T_STRING, | |
339 | 'title' => ts('Site URL') , | |
340 | 'maxlength' => 255, | |
341 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 342 | 'table_name' => 'civicrm_payment_processor', |
343 | 'entity' => 'PaymentProcessor', | |
344 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 345 | 'html' => array( |
346 | 'type' => 'Text', | |
347 | ) , | |
e501603b TO |
348 | ) , |
349 | 'url_api' => array( | |
350 | 'name' => 'url_api', | |
351 | 'type' => CRM_Utils_Type::T_STRING, | |
352 | 'title' => ts('API URL') , | |
353 | 'maxlength' => 255, | |
354 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 355 | 'table_name' => 'civicrm_payment_processor', |
356 | 'entity' => 'PaymentProcessor', | |
357 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 358 | 'html' => array( |
359 | 'type' => 'Text', | |
360 | ) , | |
e501603b TO |
361 | ) , |
362 | 'url_recur' => array( | |
363 | 'name' => 'url_recur', | |
364 | 'type' => CRM_Utils_Type::T_STRING, | |
365 | 'title' => ts('Recurring Payments URL') , | |
366 | 'maxlength' => 255, | |
367 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 368 | 'table_name' => 'civicrm_payment_processor', |
369 | 'entity' => 'PaymentProcessor', | |
370 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 371 | 'html' => array( |
372 | 'type' => 'Text', | |
373 | ) , | |
e501603b TO |
374 | ) , |
375 | 'url_button' => array( | |
376 | 'name' => 'url_button', | |
377 | 'type' => CRM_Utils_Type::T_STRING, | |
378 | 'title' => ts('Button URL') , | |
379 | 'maxlength' => 255, | |
380 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 381 | 'table_name' => 'civicrm_payment_processor', |
382 | 'entity' => 'PaymentProcessor', | |
383 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 384 | 'html' => array( |
385 | 'type' => 'Text', | |
386 | ) , | |
e501603b TO |
387 | ) , |
388 | 'subject' => array( | |
389 | 'name' => 'subject', | |
390 | 'type' => CRM_Utils_Type::T_STRING, | |
391 | 'title' => ts('Subject') , | |
392 | 'maxlength' => 255, | |
393 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 394 | 'table_name' => 'civicrm_payment_processor', |
395 | 'entity' => 'PaymentProcessor', | |
396 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
1d2a585a | 397 | 'html' => array( |
398 | 'type' => 'Text', | |
399 | ) , | |
e501603b TO |
400 | ) , |
401 | 'class_name' => array( | |
402 | 'name' => 'class_name', | |
403 | 'type' => CRM_Utils_Type::T_STRING, | |
404 | 'title' => ts('Suffix for PHP class name implementation') , | |
405 | 'maxlength' => 255, | |
406 | 'size' => CRM_Utils_Type::HUGE, | |
522a26c9 | 407 | 'table_name' => 'civicrm_payment_processor', |
408 | 'entity' => 'PaymentProcessor', | |
409 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
410 | ) , |
411 | 'billing_mode' => array( | |
412 | 'name' => 'billing_mode', | |
413 | 'type' => CRM_Utils_Type::T_INT, | |
414 | 'title' => ts('Processor Billing Mode') , | |
415 | 'description' => 'Billing Mode (deprecated)', | |
416 | 'required' => true, | |
522a26c9 | 417 | 'table_name' => 'civicrm_payment_processor', |
418 | 'entity' => 'PaymentProcessor', | |
419 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
420 | ) , |
421 | 'is_recur' => array( | |
422 | 'name' => 'is_recur', | |
423 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
424 | 'title' => ts('Processor Supports Recurring?') , | |
425 | 'description' => 'Can process recurring contributions', | |
522a26c9 | 426 | 'table_name' => 'civicrm_payment_processor', |
427 | 'entity' => 'PaymentProcessor', | |
428 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
429 | ) , |
430 | 'payment_type' => array( | |
431 | 'name' => 'payment_type', | |
432 | 'type' => CRM_Utils_Type::T_INT, | |
433 | 'title' => ts('Payment Type') , | |
434 | 'description' => 'Payment Type: Credit or Debit (deprecated)', | |
435 | 'default' => '1', | |
522a26c9 | 436 | 'table_name' => 'civicrm_payment_processor', |
437 | 'entity' => 'PaymentProcessor', | |
438 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
439 | ) , |
440 | 'payment_instrument_id' => array( | |
441 | 'name' => 'payment_instrument_id', | |
442 | 'type' => CRM_Utils_Type::T_INT, | |
443 | 'title' => ts('Payment Method') , | |
444 | 'description' => 'Payment Instrument ID', | |
445 | 'default' => '1', | |
522a26c9 | 446 | 'table_name' => 'civicrm_payment_processor', |
447 | 'entity' => 'PaymentProcessor', | |
448 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
e501603b TO |
449 | 'pseudoconstant' => array( |
450 | 'optionGroupName' => 'payment_instrument', | |
451 | 'optionEditPath' => 'civicrm/admin/options/payment_instrument', | |
452 | ) | |
453 | ) , | |
cb5962bd SL |
454 | 'accepted_credit_cards' => array( |
455 | 'name' => 'accepted_credit_cards', | |
456 | 'type' => CRM_Utils_Type::T_TEXT, | |
457 | 'title' => ts('Accepted Credit Cards') , | |
458 | 'description' => 'array of accepted credit card types', | |
459 | 'default' => 'NULL', | |
522a26c9 | 460 | 'table_name' => 'civicrm_payment_processor', |
461 | 'entity' => 'PaymentProcessor', | |
462 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
cb5962bd | 463 | ) , |
e501603b | 464 | ); |
346aaaba | 465 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 466 | } |
346aaaba | 467 | return Civi::$statics[__CLASS__]['fields']; |
e501603b TO |
468 | } |
469 | /** | |
bd8e0b14 | 470 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
471 | * |
472 | * @return array | |
bd8e0b14 | 473 | * Array(string $name => string $uniqueName). |
e501603b TO |
474 | */ |
475 | static function &fieldKeys() { | |
bd8e0b14 TO |
476 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
477 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 478 | } |
bd8e0b14 | 479 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b TO |
480 | } |
481 | /** | |
482 | * Returns the names of this table | |
483 | * | |
484 | * @return string | |
485 | */ | |
486 | static function getTableName() { | |
487 | return self::$_tableName; | |
488 | } | |
489 | /** | |
490 | * Returns if this table needs to be logged | |
491 | * | |
492 | * @return boolean | |
493 | */ | |
494 | function getLog() { | |
495 | return self::$_log; | |
496 | } | |
497 | /** | |
498 | * Returns the list of fields that can be imported | |
499 | * | |
500 | * @param bool $prefix | |
501 | * | |
502 | * @return array | |
503 | */ | |
504 | static function &import($prefix = false) { | |
60808919 TO |
505 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, array()); |
506 | return $r; | |
e501603b TO |
507 | } |
508 | /** | |
509 | * Returns the list of fields that can be exported | |
510 | * | |
511 | * @param bool $prefix | |
512 | * | |
513 | * @return array | |
514 | */ | |
515 | static function &export($prefix = false) { | |
60808919 TO |
516 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, array()); |
517 | return $r; | |
e501603b TO |
518 | } |
519 | } |