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