Commit | Line | Data |
---|---|---|
e501603b | 1 | <?php |
c3fc2621 | 2 | |
e501603b TO |
3 | /** |
4 | * @package CRM | |
ca5cec67 | 5 | * @copyright CiviCRM LLC https://civicrm.org/licensing |
e501603b TO |
6 | * |
7 | * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml | |
8 | * DO NOT EDIT. Generated by CRM_Core_CodeGen | |
7b66c3b5 | 9 | * (GenCodeChecksum:8277056355c9f16ae28f69ba3298730e) |
e501603b | 10 | */ |
c3fc2621 | 11 | |
f41f0342 | 12 | /** |
c3fc2621 | 13 | * Database access object for the PaymentProcessor entity. |
f41f0342 | 14 | */ |
e501603b | 15 | class CRM_Financial_DAO_PaymentProcessor extends CRM_Core_DAO { |
929a1c14 CW |
16 | const EXT = 'civicrm'; |
17 | const TABLE_ADDED = '1.8'; | |
c3fc2621 | 18 | |
e501603b | 19 | /** |
f41f0342 | 20 | * Static instance to hold the table name. |
e501603b TO |
21 | * |
22 | * @var string | |
23 | */ | |
fa45b5b9 | 24 | public static $_tableName = 'civicrm_payment_processor'; |
c3fc2621 | 25 | |
e501603b | 26 | /** |
f41f0342 | 27 | * Should CiviCRM log any modifications to this table in the civicrm_log table. |
e501603b | 28 | * |
c3fc2621 | 29 | * @var bool |
e501603b | 30 | */ |
fa45b5b9 | 31 | public static $_log = FALSE; |
c3fc2621 | 32 | |
e501603b TO |
33 | /** |
34 | * Payment Processor ID | |
35 | * | |
e6ca0a57 | 36 | * @var int |
e501603b TO |
37 | */ |
38 | public $id; | |
c3fc2621 | 39 | |
e501603b TO |
40 | /** |
41 | * Which Domain is this match entry for | |
42 | * | |
e6ca0a57 | 43 | * @var int |
e501603b TO |
44 | */ |
45 | public $domain_id; | |
c3fc2621 | 46 | |
e501603b TO |
47 | /** |
48 | * Payment Processor Name. | |
49 | * | |
50 | * @var string | |
51 | */ | |
52 | public $name; | |
c3fc2621 | 53 | |
63b162c6 | 54 | /** |
55 | * Payment Processor Descriptive Name. | |
56 | * | |
57 | * @var string | |
58 | */ | |
59 | public $title; | |
60 | ||
e501603b TO |
61 | /** |
62 | * Payment Processor Description. | |
63 | * | |
64 | * @var string | |
65 | */ | |
66 | public $description; | |
c3fc2621 | 67 | |
e501603b | 68 | /** |
e6ca0a57 | 69 | * @var int |
e501603b TO |
70 | */ |
71 | public $payment_processor_type_id; | |
c3fc2621 | 72 | |
e501603b TO |
73 | /** |
74 | * Is this processor active? | |
75 | * | |
e6ca0a57 | 76 | * @var bool |
e501603b TO |
77 | */ |
78 | public $is_active; | |
c3fc2621 | 79 | |
e501603b TO |
80 | /** |
81 | * Is this processor the default? | |
82 | * | |
e6ca0a57 | 83 | * @var bool |
e501603b TO |
84 | */ |
85 | public $is_default; | |
c3fc2621 | 86 | |
e501603b TO |
87 | /** |
88 | * Is this processor for a test site? | |
89 | * | |
e6ca0a57 | 90 | * @var bool |
e501603b TO |
91 | */ |
92 | public $is_test; | |
c3fc2621 | 93 | |
e501603b | 94 | /** |
e501603b TO |
95 | * @var string |
96 | */ | |
97 | public $user_name; | |
c3fc2621 | 98 | |
e501603b | 99 | /** |
e501603b TO |
100 | * @var string |
101 | */ | |
102 | public $password; | |
c3fc2621 | 103 | |
e501603b | 104 | /** |
e501603b TO |
105 | * @var text |
106 | */ | |
107 | public $signature; | |
c3fc2621 | 108 | |
e501603b | 109 | /** |
e501603b TO |
110 | * @var string |
111 | */ | |
112 | public $url_site; | |
c3fc2621 | 113 | |
e501603b | 114 | /** |
e501603b TO |
115 | * @var string |
116 | */ | |
117 | public $url_api; | |
c3fc2621 | 118 | |
e501603b | 119 | /** |
e501603b TO |
120 | * @var string |
121 | */ | |
122 | public $url_recur; | |
c3fc2621 | 123 | |
e501603b | 124 | /** |
e501603b TO |
125 | * @var string |
126 | */ | |
127 | public $url_button; | |
c3fc2621 | 128 | |
e501603b | 129 | /** |
e501603b TO |
130 | * @var string |
131 | */ | |
132 | public $subject; | |
c3fc2621 | 133 | |
e501603b | 134 | /** |
e501603b TO |
135 | * @var string |
136 | */ | |
137 | public $class_name; | |
c3fc2621 | 138 | |
e501603b TO |
139 | /** |
140 | * Billing Mode (deprecated) | |
141 | * | |
e6ca0a57 | 142 | * @var int |
e501603b TO |
143 | */ |
144 | public $billing_mode; | |
c3fc2621 | 145 | |
e501603b TO |
146 | /** |
147 | * Can process recurring contributions | |
148 | * | |
e6ca0a57 | 149 | * @var bool |
e501603b TO |
150 | */ |
151 | public $is_recur; | |
c3fc2621 | 152 | |
e501603b TO |
153 | /** |
154 | * Payment Type: Credit or Debit (deprecated) | |
155 | * | |
e6ca0a57 | 156 | * @var int |
e501603b TO |
157 | */ |
158 | public $payment_type; | |
c3fc2621 | 159 | |
e501603b TO |
160 | /** |
161 | * Payment Instrument ID | |
162 | * | |
e6ca0a57 | 163 | * @var int |
e501603b TO |
164 | */ |
165 | public $payment_instrument_id; | |
c3fc2621 | 166 | |
cb5962bd SL |
167 | /** |
168 | * array of accepted credit card types | |
169 | * | |
170 | * @var text | |
171 | */ | |
172 | public $accepted_credit_cards; | |
c3fc2621 | 173 | |
e501603b | 174 | /** |
f41f0342 | 175 | * Class constructor. |
e501603b | 176 | */ |
c3fc2621 | 177 | public function __construct() { |
e501603b TO |
178 | $this->__table = 'civicrm_payment_processor'; |
179 | parent::__construct(); | |
180 | } | |
c3fc2621 | 181 | |
449c4e6b CW |
182 | /** |
183 | * Returns localized title of this entity. | |
7b66c3b5 AH |
184 | * |
185 | * @param bool $plural | |
186 | * Whether to return the plural version of the title. | |
449c4e6b | 187 | */ |
7b66c3b5 AH |
188 | public static function getEntityTitle($plural = FALSE) { |
189 | return $plural ? ts('Payment Processors') : ts('Payment Processor'); | |
449c4e6b CW |
190 | } |
191 | ||
e501603b | 192 | /** |
f41f0342 | 193 | * Returns foreign keys and entity references. |
e501603b TO |
194 | * |
195 | * @return array | |
196 | * [CRM_Core_Reference_Interface] | |
197 | */ | |
c3fc2621 | 198 | public static function getReferenceColumns() { |
346aaaba | 199 | if (!isset(Civi::$statics[__CLASS__]['links'])) { |
fa45b5b9 | 200 | Civi::$statics[__CLASS__]['links'] = static::createReferenceColumns(__CLASS__); |
c3fc2621 CW |
201 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'domain_id', 'civicrm_domain', 'id'); |
202 | Civi::$statics[__CLASS__]['links'][] = new CRM_Core_Reference_Basic(self::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id'); | |
346aaaba | 203 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'links_callback', Civi::$statics[__CLASS__]['links']); |
e501603b | 204 | } |
346aaaba | 205 | return Civi::$statics[__CLASS__]['links']; |
e501603b | 206 | } |
c3fc2621 | 207 | |
e501603b TO |
208 | /** |
209 | * Returns all the column names of this table | |
210 | * | |
211 | * @return array | |
212 | */ | |
c3fc2621 | 213 | public static function &fields() { |
346aaaba | 214 | if (!isset(Civi::$statics[__CLASS__]['fields'])) { |
c3fc2621 CW |
215 | Civi::$statics[__CLASS__]['fields'] = [ |
216 | 'id' => [ | |
e501603b TO |
217 | 'name' => 'id', |
218 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 219 | 'title' => ts('Payment Processor ID'), |
215b423e | 220 | 'description' => ts('Payment Processor ID'), |
c3fc2621 | 221 | 'required' => TRUE, |
a36434b9 | 222 | 'where' => 'civicrm_payment_processor.id', |
522a26c9 | 223 | 'table_name' => 'civicrm_payment_processor', |
224 | 'entity' => 'PaymentProcessor', | |
225 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 226 | 'localizable' => 0, |
a9d0587b | 227 | 'add' => '1.8', |
c3fc2621 CW |
228 | ], |
229 | 'domain_id' => [ | |
e501603b TO |
230 | 'name' => 'domain_id', |
231 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 232 | 'title' => ts('Payment Processor Domain'), |
215b423e | 233 | 'description' => ts('Which Domain is this match entry for'), |
c3fc2621 | 234 | 'required' => TRUE, |
a36434b9 | 235 | 'where' => 'civicrm_payment_processor.domain_id', |
522a26c9 | 236 | 'table_name' => 'civicrm_payment_processor', |
237 | 'entity' => 'PaymentProcessor', | |
238 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 239 | 'localizable' => 0, |
e501603b | 240 | 'FKClassName' => 'CRM_Core_DAO_Domain', |
c3fc2621 | 241 | 'pseudoconstant' => [ |
e501603b TO |
242 | 'table' => 'civicrm_domain', |
243 | 'keyColumn' => 'id', | |
244 | 'labelColumn' => 'name', | |
e6ca0a57 | 245 | ], |
a9d0587b | 246 | 'add' => '3.0', |
c3fc2621 CW |
247 | ], |
248 | 'name' => [ | |
e501603b TO |
249 | 'name' => 'name', |
250 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 251 | 'title' => ts('Payment Processor'), |
215b423e | 252 | 'description' => ts('Payment Processor Name.'), |
e501603b TO |
253 | 'maxlength' => 64, |
254 | 'size' => CRM_Utils_Type::BIG, | |
a36434b9 | 255 | 'where' => 'civicrm_payment_processor.name', |
522a26c9 | 256 | 'table_name' => 'civicrm_payment_processor', |
257 | 'entity' => 'PaymentProcessor', | |
258 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
63b162c6 | 259 | 'localizable' => 0, |
260 | 'html' => [ | |
261 | 'type' => 'Text', | |
262 | ], | |
a9d0587b | 263 | 'add' => '1.8', |
63b162c6 | 264 | ], |
265 | 'title' => [ | |
266 | 'name' => 'title', | |
267 | 'type' => CRM_Utils_Type::T_STRING, | |
268 | 'title' => ts('Payment Processor Title'), | |
269 | 'description' => ts('Payment Processor Descriptive Name.'), | |
270 | 'maxlength' => 127, | |
271 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 272 | 'where' => 'civicrm_payment_processor.title', |
63b162c6 | 273 | 'table_name' => 'civicrm_payment_processor', |
274 | 'entity' => 'PaymentProcessor', | |
275 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
4c257e17 | 276 | 'localizable' => 1, |
c3fc2621 | 277 | 'html' => [ |
1d2a585a | 278 | 'type' => 'Text', |
c3fc2621 | 279 | ], |
a9d0587b | 280 | 'add' => '5.13', |
c3fc2621 CW |
281 | ], |
282 | 'description' => [ | |
e501603b TO |
283 | 'name' => 'description', |
284 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 285 | 'title' => ts('Processor Description'), |
215b423e | 286 | 'description' => ts('Payment Processor Description.'), |
e501603b TO |
287 | 'maxlength' => 255, |
288 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 289 | 'where' => 'civicrm_payment_processor.description', |
522a26c9 | 290 | 'table_name' => 'civicrm_payment_processor', |
291 | 'entity' => 'PaymentProcessor', | |
292 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 293 | 'localizable' => 0, |
83376469 | 294 | 'html' => [ |
295 | 'type' => 'Text', | |
296 | ], | |
a9d0587b | 297 | 'add' => '1.8', |
c3fc2621 CW |
298 | ], |
299 | 'payment_processor_type_id' => [ | |
e501603b TO |
300 | 'name' => 'payment_processor_type_id', |
301 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 302 | 'title' => ts('Payment Processor Type ID'), |
2f859d0a | 303 | 'required' => TRUE, |
a36434b9 | 304 | 'where' => 'civicrm_payment_processor.payment_processor_type_id', |
522a26c9 | 305 | 'table_name' => 'civicrm_payment_processor', |
306 | 'entity' => 'PaymentProcessor', | |
307 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 308 | 'localizable' => 0, |
e501603b | 309 | 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType', |
c3fc2621 | 310 | 'pseudoconstant' => [ |
e501603b TO |
311 | 'table' => 'civicrm_payment_processor_type', |
312 | 'keyColumn' => 'id', | |
313 | 'labelColumn' => 'title', | |
e6ca0a57 | 314 | ], |
a9d0587b | 315 | 'add' => '4.3', |
c3fc2621 CW |
316 | ], |
317 | 'is_active' => [ | |
e501603b TO |
318 | 'name' => 'is_active', |
319 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 320 | 'title' => ts('Processor is Active?'), |
215b423e | 321 | 'description' => ts('Is this processor active?'), |
a36434b9 | 322 | 'where' => 'civicrm_payment_processor.is_active', |
2f859d0a | 323 | 'default' => '1', |
522a26c9 | 324 | 'table_name' => 'civicrm_payment_processor', |
325 | 'entity' => 'PaymentProcessor', | |
326 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 327 | 'localizable' => 0, |
a9d0587b | 328 | 'add' => '1.8', |
c3fc2621 CW |
329 | ], |
330 | 'is_default' => [ | |
e501603b TO |
331 | 'name' => 'is_default', |
332 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 333 | 'title' => ts('Processor Is Default?'), |
215b423e | 334 | 'description' => ts('Is this processor the default?'), |
a36434b9 | 335 | 'where' => 'civicrm_payment_processor.is_default', |
2f859d0a | 336 | 'default' => '0', |
522a26c9 | 337 | 'table_name' => 'civicrm_payment_processor', |
338 | 'entity' => 'PaymentProcessor', | |
339 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 340 | 'localizable' => 0, |
a9d0587b | 341 | 'add' => '1.8', |
c3fc2621 CW |
342 | ], |
343 | 'is_test' => [ | |
e501603b TO |
344 | 'name' => 'is_test', |
345 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 346 | 'title' => ts('Is Test Processor?'), |
215b423e | 347 | 'description' => ts('Is this processor for a test site?'), |
a36434b9 | 348 | 'where' => 'civicrm_payment_processor.is_test', |
2f859d0a | 349 | 'default' => '0', |
522a26c9 | 350 | 'table_name' => 'civicrm_payment_processor', |
351 | 'entity' => 'PaymentProcessor', | |
352 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 353 | 'localizable' => 0, |
a9d0587b | 354 | 'add' => '1.8', |
c3fc2621 CW |
355 | ], |
356 | 'user_name' => [ | |
e501603b TO |
357 | 'name' => 'user_name', |
358 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 359 | 'title' => ts('User Name'), |
e501603b TO |
360 | 'maxlength' => 255, |
361 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 362 | 'where' => 'civicrm_payment_processor.user_name', |
522a26c9 | 363 | 'table_name' => 'civicrm_payment_processor', |
364 | 'entity' => 'PaymentProcessor', | |
365 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 366 | 'localizable' => 0, |
c3fc2621 | 367 | 'html' => [ |
1d2a585a | 368 | 'type' => 'Text', |
c3fc2621 | 369 | ], |
a9d0587b | 370 | 'add' => '1.8', |
c3fc2621 CW |
371 | ], |
372 | 'password' => [ | |
e501603b TO |
373 | 'name' => 'password', |
374 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 375 | 'title' => ts('Password'), |
e501603b TO |
376 | 'maxlength' => 255, |
377 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 378 | 'where' => 'civicrm_payment_processor.password', |
522a26c9 | 379 | 'table_name' => 'civicrm_payment_processor', |
380 | 'entity' => 'PaymentProcessor', | |
381 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 382 | 'localizable' => 0, |
c3fc2621 | 383 | 'html' => [ |
dbb62458 | 384 | 'type' => 'Password', |
c3fc2621 | 385 | ], |
a9d0587b | 386 | 'add' => '1.8', |
c3fc2621 CW |
387 | ], |
388 | 'signature' => [ | |
e501603b TO |
389 | 'name' => 'signature', |
390 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 391 | 'title' => ts('Signature'), |
1d2a585a | 392 | 'rows' => 4, |
393 | 'cols' => 40, | |
a36434b9 | 394 | 'where' => 'civicrm_payment_processor.signature', |
522a26c9 | 395 | 'table_name' => 'civicrm_payment_processor', |
396 | 'entity' => 'PaymentProcessor', | |
397 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 398 | 'localizable' => 0, |
c3fc2621 | 399 | 'html' => [ |
1d2a585a | 400 | 'type' => 'TextArea', |
c3fc2621 | 401 | ], |
a9d0587b | 402 | 'add' => '1.8', |
c3fc2621 CW |
403 | ], |
404 | 'url_site' => [ | |
e501603b TO |
405 | 'name' => 'url_site', |
406 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 407 | 'title' => ts('Site URL'), |
e501603b TO |
408 | 'maxlength' => 255, |
409 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 410 | 'where' => 'civicrm_payment_processor.url_site', |
522a26c9 | 411 | 'table_name' => 'civicrm_payment_processor', |
412 | 'entity' => 'PaymentProcessor', | |
413 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 414 | 'localizable' => 0, |
c3fc2621 | 415 | 'html' => [ |
1d2a585a | 416 | 'type' => 'Text', |
c3fc2621 | 417 | ], |
a9d0587b | 418 | 'add' => '1.8', |
c3fc2621 CW |
419 | ], |
420 | 'url_api' => [ | |
e501603b TO |
421 | 'name' => 'url_api', |
422 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 423 | 'title' => ts('API URL'), |
e501603b TO |
424 | 'maxlength' => 255, |
425 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 426 | 'where' => 'civicrm_payment_processor.url_api', |
522a26c9 | 427 | 'table_name' => 'civicrm_payment_processor', |
428 | 'entity' => 'PaymentProcessor', | |
429 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 430 | 'localizable' => 0, |
c3fc2621 | 431 | 'html' => [ |
1d2a585a | 432 | 'type' => 'Text', |
c3fc2621 | 433 | ], |
a9d0587b | 434 | 'add' => '1.8', |
c3fc2621 CW |
435 | ], |
436 | 'url_recur' => [ | |
e501603b TO |
437 | 'name' => 'url_recur', |
438 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 439 | 'title' => ts('Recurring Payments URL'), |
e501603b TO |
440 | 'maxlength' => 255, |
441 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 442 | 'where' => 'civicrm_payment_processor.url_recur', |
522a26c9 | 443 | 'table_name' => 'civicrm_payment_processor', |
444 | 'entity' => 'PaymentProcessor', | |
445 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 446 | 'localizable' => 0, |
c3fc2621 | 447 | 'html' => [ |
1d2a585a | 448 | 'type' => 'Text', |
c3fc2621 | 449 | ], |
a9d0587b | 450 | 'add' => '1.8', |
c3fc2621 CW |
451 | ], |
452 | 'url_button' => [ | |
e501603b TO |
453 | 'name' => 'url_button', |
454 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 455 | 'title' => ts('Button URL'), |
e501603b TO |
456 | 'maxlength' => 255, |
457 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 458 | 'where' => 'civicrm_payment_processor.url_button', |
522a26c9 | 459 | 'table_name' => 'civicrm_payment_processor', |
460 | 'entity' => 'PaymentProcessor', | |
461 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 462 | 'localizable' => 0, |
c3fc2621 | 463 | 'html' => [ |
1d2a585a | 464 | 'type' => 'Text', |
c3fc2621 | 465 | ], |
a9d0587b | 466 | 'add' => '1.8', |
c3fc2621 CW |
467 | ], |
468 | 'subject' => [ | |
e501603b TO |
469 | 'name' => 'subject', |
470 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 471 | 'title' => ts('Subject'), |
e501603b TO |
472 | 'maxlength' => 255, |
473 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 474 | 'where' => 'civicrm_payment_processor.subject', |
522a26c9 | 475 | 'table_name' => 'civicrm_payment_processor', |
476 | 'entity' => 'PaymentProcessor', | |
477 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 478 | 'localizable' => 0, |
c3fc2621 | 479 | 'html' => [ |
1d2a585a | 480 | 'type' => 'Text', |
c3fc2621 | 481 | ], |
a9d0587b | 482 | 'add' => '1.8', |
c3fc2621 CW |
483 | ], |
484 | 'class_name' => [ | |
e501603b TO |
485 | 'name' => 'class_name', |
486 | 'type' => CRM_Utils_Type::T_STRING, | |
c3fc2621 | 487 | 'title' => ts('Suffix for PHP class name implementation'), |
e501603b TO |
488 | 'maxlength' => 255, |
489 | 'size' => CRM_Utils_Type::HUGE, | |
a36434b9 | 490 | 'where' => 'civicrm_payment_processor.class_name', |
522a26c9 | 491 | 'table_name' => 'civicrm_payment_processor', |
492 | 'entity' => 'PaymentProcessor', | |
493 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 494 | 'localizable' => 0, |
a9d0587b | 495 | 'add' => '1.8', |
c3fc2621 CW |
496 | ], |
497 | 'billing_mode' => [ | |
e501603b TO |
498 | 'name' => 'billing_mode', |
499 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 500 | 'title' => ts('Processor Billing Mode'), |
215b423e | 501 | 'description' => ts('Billing Mode (deprecated)'), |
c3fc2621 | 502 | 'required' => TRUE, |
a36434b9 | 503 | 'where' => 'civicrm_payment_processor.billing_mode', |
522a26c9 | 504 | 'table_name' => 'civicrm_payment_processor', |
505 | 'entity' => 'PaymentProcessor', | |
506 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 507 | 'localizable' => 0, |
a9d0587b | 508 | 'add' => '1.8', |
c3fc2621 CW |
509 | ], |
510 | 'is_recur' => [ | |
e501603b TO |
511 | 'name' => 'is_recur', |
512 | 'type' => CRM_Utils_Type::T_BOOLEAN, | |
c3fc2621 | 513 | 'title' => ts('Processor Supports Recurring?'), |
215b423e | 514 | 'description' => ts('Can process recurring contributions'), |
a36434b9 | 515 | 'where' => 'civicrm_payment_processor.is_recur', |
522a26c9 | 516 | 'table_name' => 'civicrm_payment_processor', |
517 | 'entity' => 'PaymentProcessor', | |
518 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 519 | 'localizable' => 0, |
a9d0587b | 520 | 'add' => '1.8', |
c3fc2621 CW |
521 | ], |
522 | 'payment_type' => [ | |
e501603b TO |
523 | 'name' => 'payment_type', |
524 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 525 | 'title' => ts('Payment Type'), |
215b423e | 526 | 'description' => ts('Payment Type: Credit or Debit (deprecated)'), |
a36434b9 | 527 | 'where' => 'civicrm_payment_processor.payment_type', |
e501603b | 528 | 'default' => '1', |
522a26c9 | 529 | 'table_name' => 'civicrm_payment_processor', |
530 | 'entity' => 'PaymentProcessor', | |
531 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 532 | 'localizable' => 0, |
a9d0587b | 533 | 'add' => '3.0', |
c3fc2621 CW |
534 | ], |
535 | 'payment_instrument_id' => [ | |
e501603b TO |
536 | 'name' => 'payment_instrument_id', |
537 | 'type' => CRM_Utils_Type::T_INT, | |
c3fc2621 | 538 | 'title' => ts('Payment Method'), |
215b423e | 539 | 'description' => ts('Payment Instrument ID'), |
a36434b9 | 540 | 'where' => 'civicrm_payment_processor.payment_instrument_id', |
e501603b | 541 | 'default' => '1', |
522a26c9 | 542 | 'table_name' => 'civicrm_payment_processor', |
543 | 'entity' => 'PaymentProcessor', | |
544 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 545 | 'localizable' => 0, |
c3fc2621 | 546 | 'pseudoconstant' => [ |
e501603b TO |
547 | 'optionGroupName' => 'payment_instrument', |
548 | 'optionEditPath' => 'civicrm/admin/options/payment_instrument', | |
e6ca0a57 | 549 | ], |
a9d0587b | 550 | 'add' => '4.7', |
c3fc2621 CW |
551 | ], |
552 | 'accepted_credit_cards' => [ | |
cb5962bd SL |
553 | 'name' => 'accepted_credit_cards', |
554 | 'type' => CRM_Utils_Type::T_TEXT, | |
c3fc2621 | 555 | 'title' => ts('Accepted Credit Cards'), |
215b423e | 556 | 'description' => ts('array of accepted credit card types'), |
a36434b9 | 557 | 'where' => 'civicrm_payment_processor.accepted_credit_cards', |
cb5962bd | 558 | 'default' => 'NULL', |
522a26c9 | 559 | 'table_name' => 'civicrm_payment_processor', |
560 | 'entity' => 'PaymentProcessor', | |
561 | 'bao' => 'CRM_Financial_BAO_PaymentProcessor', | |
6a7e5e5d | 562 | 'localizable' => 0, |
2a5c9b4d | 563 | 'serialize' => self::SERIALIZE_JSON, |
a9d0587b | 564 | 'add' => '4.7', |
c3fc2621 CW |
565 | ], |
566 | ]; | |
346aaaba | 567 | CRM_Core_DAO_AllCoreTables::invoke(__CLASS__, 'fields_callback', Civi::$statics[__CLASS__]['fields']); |
e501603b | 568 | } |
346aaaba | 569 | return Civi::$statics[__CLASS__]['fields']; |
e501603b | 570 | } |
c3fc2621 | 571 | |
e501603b | 572 | /** |
bd8e0b14 | 573 | * Return a mapping from field-name to the corresponding key (as used in fields()). |
e501603b TO |
574 | * |
575 | * @return array | |
bd8e0b14 | 576 | * Array(string $name => string $uniqueName). |
e501603b | 577 | */ |
c3fc2621 | 578 | public static function &fieldKeys() { |
bd8e0b14 TO |
579 | if (!isset(Civi::$statics[__CLASS__]['fieldKeys'])) { |
580 | Civi::$statics[__CLASS__]['fieldKeys'] = array_flip(CRM_Utils_Array::collect('name', self::fields())); | |
e501603b | 581 | } |
bd8e0b14 | 582 | return Civi::$statics[__CLASS__]['fieldKeys']; |
e501603b | 583 | } |
c3fc2621 | 584 | |
e501603b TO |
585 | /** |
586 | * Returns the names of this table | |
587 | * | |
588 | * @return string | |
589 | */ | |
c3fc2621 | 590 | public static function getTableName() { |
4c257e17 | 591 | return CRM_Core_DAO::getLocaleTableName(self::$_tableName); |
e501603b | 592 | } |
c3fc2621 | 593 | |
e501603b TO |
594 | /** |
595 | * Returns if this table needs to be logged | |
596 | * | |
c3fc2621 | 597 | * @return bool |
e501603b | 598 | */ |
c3fc2621 | 599 | public function getLog() { |
e501603b TO |
600 | return self::$_log; |
601 | } | |
c3fc2621 | 602 | |
e501603b TO |
603 | /** |
604 | * Returns the list of fields that can be imported | |
605 | * | |
606 | * @param bool $prefix | |
607 | * | |
608 | * @return array | |
609 | */ | |
c3fc2621 CW |
610 | public static function &import($prefix = FALSE) { |
611 | $r = CRM_Core_DAO_AllCoreTables::getImports(__CLASS__, 'payment_processor', $prefix, []); | |
60808919 | 612 | return $r; |
e501603b | 613 | } |
c3fc2621 | 614 | |
e501603b TO |
615 | /** |
616 | * Returns the list of fields that can be exported | |
617 | * | |
618 | * @param bool $prefix | |
619 | * | |
620 | * @return array | |
621 | */ | |
c3fc2621 CW |
622 | public static function &export($prefix = FALSE) { |
623 | $r = CRM_Core_DAO_AllCoreTables::getExports(__CLASS__, 'payment_processor', $prefix, []); | |
60808919 | 624 | return $r; |
e501603b | 625 | } |
c3fc2621 | 626 | |
e7a6b91a AS |
627 | /** |
628 | * Returns the list of indices | |
c3fc2621 CW |
629 | * |
630 | * @param bool $localize | |
631 | * | |
632 | * @return array | |
e7a6b91a AS |
633 | */ |
634 | public static function indices($localize = TRUE) { | |
c3fc2621 CW |
635 | $indices = [ |
636 | 'UI_name_test_domain_id' => [ | |
e7a6b91a | 637 | 'name' => 'UI_name_test_domain_id', |
c3fc2621 | 638 | 'field' => [ |
e7a6b91a AS |
639 | 0 => 'name', |
640 | 1 => 'is_test', | |
641 | 2 => 'domain_id', | |
c3fc2621 CW |
642 | ], |
643 | 'localizable' => FALSE, | |
644 | 'unique' => TRUE, | |
e7a6b91a | 645 | 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id', |
c3fc2621 CW |
646 | ], |
647 | ]; | |
e7a6b91a AS |
648 | return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables::multilingualize(__CLASS__, $indices) : $indices; |
649 | } | |
c3fc2621 | 650 | |
e501603b | 651 | } |