5 * @copyright CiviCRM LLC https://civicrm.org/licensing
7 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:cf330d3d3e18960b1e32a3001d8cd038)
13 * Database access object for the PaymentProcessor entity.
15 class CRM_Financial_DAO_PaymentProcessor
extends CRM_Core_DAO
{
18 * Static instance to hold the table name.
22 public static $_tableName = 'civicrm_payment_processor';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
29 public static $_log = FALSE;
32 * Payment Processor ID
39 * Which Domain is this match entry for
46 * Payment Processor Name.
53 * Payment Processor Descriptive Name.
60 * Payment Processor Description.
69 public $payment_processor_type_id;
72 * Is this processor active?
79 * Is this processor the default?
86 * Is this processor for a test site?
138 * Billing Mode (deprecated)
142 public $billing_mode;
145 * Can process recurring contributions
152 * Payment Type: Credit or Debit (deprecated)
156 public $payment_type;
159 * Payment Instrument ID
163 public $payment_instrument_id;
166 * array of accepted credit card types
170 public $accepted_credit_cards;
175 public function __construct() {
176 $this->__table
= 'civicrm_payment_processor';
177 parent
::__construct();
181 * Returns foreign keys and entity references.
184 * [CRM_Core_Reference_Interface]
186 public static function getReferenceColumns() {
187 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
188 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
189 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
190 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
191 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
193 return Civi
::$statics[__CLASS__
]['links'];
197 * Returns all the column names of this table
201 public static function &fields() {
202 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
203 Civi
::$statics[__CLASS__
]['fields'] = [
206 'type' => CRM_Utils_Type
::T_INT
,
207 'title' => ts('Payment Processor ID'),
208 'description' => ts('Payment Processor ID'),
210 'where' => 'civicrm_payment_processor.id',
211 'table_name' => 'civicrm_payment_processor',
212 'entity' => 'PaymentProcessor',
213 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
217 'name' => 'domain_id',
218 'type' => CRM_Utils_Type
::T_INT
,
219 'title' => ts('Payment Processor Domain'),
220 'description' => ts('Which Domain is this match entry for'),
222 'where' => 'civicrm_payment_processor.domain_id',
223 'table_name' => 'civicrm_payment_processor',
224 'entity' => 'PaymentProcessor',
225 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
227 'FKClassName' => 'CRM_Core_DAO_Domain',
228 'pseudoconstant' => [
229 'table' => 'civicrm_domain',
231 'labelColumn' => 'name',
236 'type' => CRM_Utils_Type
::T_STRING
,
237 'title' => ts('Payment Processor'),
238 'description' => ts('Payment Processor Name.'),
240 'size' => CRM_Utils_Type
::BIG
,
241 'where' => 'civicrm_payment_processor.name',
242 'table_name' => 'civicrm_payment_processor',
243 'entity' => 'PaymentProcessor',
244 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
252 'type' => CRM_Utils_Type
::T_STRING
,
253 'title' => ts('Payment Processor Title'),
254 'description' => ts('Payment Processor Descriptive Name.'),
256 'size' => CRM_Utils_Type
::HUGE
,
257 'where' => 'civicrm_payment_processor.title',
258 'table_name' => 'civicrm_payment_processor',
259 'entity' => 'PaymentProcessor',
260 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
267 'name' => 'description',
268 'type' => CRM_Utils_Type
::T_STRING
,
269 'title' => ts('Processor Description'),
270 'description' => ts('Payment Processor Description.'),
272 'size' => CRM_Utils_Type
::HUGE
,
273 'where' => 'civicrm_payment_processor.description',
274 'table_name' => 'civicrm_payment_processor',
275 'entity' => 'PaymentProcessor',
276 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
282 'payment_processor_type_id' => [
283 'name' => 'payment_processor_type_id',
284 'type' => CRM_Utils_Type
::T_INT
,
285 'title' => ts('Payment Processor Type ID'),
287 'where' => 'civicrm_payment_processor.payment_processor_type_id',
288 'table_name' => 'civicrm_payment_processor',
289 'entity' => 'PaymentProcessor',
290 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
292 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
293 'pseudoconstant' => [
294 'table' => 'civicrm_payment_processor_type',
296 'labelColumn' => 'title',
300 'name' => 'is_active',
301 'type' => CRM_Utils_Type
::T_BOOLEAN
,
302 'title' => ts('Processor is Active?'),
303 'description' => ts('Is this processor active?'),
304 'where' => 'civicrm_payment_processor.is_active',
306 'table_name' => 'civicrm_payment_processor',
307 'entity' => 'PaymentProcessor',
308 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
312 'name' => 'is_default',
313 'type' => CRM_Utils_Type
::T_BOOLEAN
,
314 'title' => ts('Processor Is Default?'),
315 'description' => ts('Is this processor the default?'),
316 'where' => 'civicrm_payment_processor.is_default',
318 'table_name' => 'civicrm_payment_processor',
319 'entity' => 'PaymentProcessor',
320 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
325 'type' => CRM_Utils_Type
::T_BOOLEAN
,
326 'title' => ts('Is Test Processor?'),
327 'description' => ts('Is this processor for a test site?'),
328 'where' => 'civicrm_payment_processor.is_test',
330 'table_name' => 'civicrm_payment_processor',
331 'entity' => 'PaymentProcessor',
332 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
336 'name' => 'user_name',
337 'type' => CRM_Utils_Type
::T_STRING
,
338 'title' => ts('User Name'),
340 'size' => CRM_Utils_Type
::HUGE
,
341 'where' => 'civicrm_payment_processor.user_name',
342 'table_name' => 'civicrm_payment_processor',
343 'entity' => 'PaymentProcessor',
344 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
351 'name' => 'password',
352 'type' => CRM_Utils_Type
::T_STRING
,
353 'title' => ts('Password'),
355 'size' => CRM_Utils_Type
::HUGE
,
356 'where' => 'civicrm_payment_processor.password',
357 'table_name' => 'civicrm_payment_processor',
358 'entity' => 'PaymentProcessor',
359 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
362 'type' => 'Password',
366 'name' => 'signature',
367 'type' => CRM_Utils_Type
::T_TEXT
,
368 'title' => ts('Signature'),
371 'where' => 'civicrm_payment_processor.signature',
372 'table_name' => 'civicrm_payment_processor',
373 'entity' => 'PaymentProcessor',
374 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
377 'type' => 'TextArea',
381 'name' => 'url_site',
382 'type' => CRM_Utils_Type
::T_STRING
,
383 'title' => ts('Site URL'),
385 'size' => CRM_Utils_Type
::HUGE
,
386 'where' => 'civicrm_payment_processor.url_site',
387 'table_name' => 'civicrm_payment_processor',
388 'entity' => 'PaymentProcessor',
389 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
397 'type' => CRM_Utils_Type
::T_STRING
,
398 'title' => ts('API URL'),
400 'size' => CRM_Utils_Type
::HUGE
,
401 'where' => 'civicrm_payment_processor.url_api',
402 'table_name' => 'civicrm_payment_processor',
403 'entity' => 'PaymentProcessor',
404 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
411 'name' => 'url_recur',
412 'type' => CRM_Utils_Type
::T_STRING
,
413 'title' => ts('Recurring Payments URL'),
415 'size' => CRM_Utils_Type
::HUGE
,
416 'where' => 'civicrm_payment_processor.url_recur',
417 'table_name' => 'civicrm_payment_processor',
418 'entity' => 'PaymentProcessor',
419 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
426 'name' => 'url_button',
427 'type' => CRM_Utils_Type
::T_STRING
,
428 'title' => ts('Button URL'),
430 'size' => CRM_Utils_Type
::HUGE
,
431 'where' => 'civicrm_payment_processor.url_button',
432 'table_name' => 'civicrm_payment_processor',
433 'entity' => 'PaymentProcessor',
434 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
442 'type' => CRM_Utils_Type
::T_STRING
,
443 'title' => ts('Subject'),
445 'size' => CRM_Utils_Type
::HUGE
,
446 'where' => 'civicrm_payment_processor.subject',
447 'table_name' => 'civicrm_payment_processor',
448 'entity' => 'PaymentProcessor',
449 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
456 'name' => 'class_name',
457 'type' => CRM_Utils_Type
::T_STRING
,
458 'title' => ts('Suffix for PHP class name implementation'),
460 'size' => CRM_Utils_Type
::HUGE
,
461 'where' => 'civicrm_payment_processor.class_name',
462 'table_name' => 'civicrm_payment_processor',
463 'entity' => 'PaymentProcessor',
464 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
468 'name' => 'billing_mode',
469 'type' => CRM_Utils_Type
::T_INT
,
470 'title' => ts('Processor Billing Mode'),
471 'description' => ts('Billing Mode (deprecated)'),
473 'where' => 'civicrm_payment_processor.billing_mode',
474 'table_name' => 'civicrm_payment_processor',
475 'entity' => 'PaymentProcessor',
476 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
480 'name' => 'is_recur',
481 'type' => CRM_Utils_Type
::T_BOOLEAN
,
482 'title' => ts('Processor Supports Recurring?'),
483 'description' => ts('Can process recurring contributions'),
484 'where' => 'civicrm_payment_processor.is_recur',
485 'table_name' => 'civicrm_payment_processor',
486 'entity' => 'PaymentProcessor',
487 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
491 'name' => 'payment_type',
492 'type' => CRM_Utils_Type
::T_INT
,
493 'title' => ts('Payment Type'),
494 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
495 'where' => 'civicrm_payment_processor.payment_type',
497 'table_name' => 'civicrm_payment_processor',
498 'entity' => 'PaymentProcessor',
499 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
502 'payment_instrument_id' => [
503 'name' => 'payment_instrument_id',
504 'type' => CRM_Utils_Type
::T_INT
,
505 'title' => ts('Payment Method'),
506 'description' => ts('Payment Instrument ID'),
507 'where' => 'civicrm_payment_processor.payment_instrument_id',
509 'table_name' => 'civicrm_payment_processor',
510 'entity' => 'PaymentProcessor',
511 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
513 'pseudoconstant' => [
514 'optionGroupName' => 'payment_instrument',
515 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
518 'accepted_credit_cards' => [
519 'name' => 'accepted_credit_cards',
520 'type' => CRM_Utils_Type
::T_TEXT
,
521 'title' => ts('Accepted Credit Cards'),
522 'description' => ts('array of accepted credit card types'),
523 'where' => 'civicrm_payment_processor.accepted_credit_cards',
525 'table_name' => 'civicrm_payment_processor',
526 'entity' => 'PaymentProcessor',
527 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
529 'serialize' => self
::SERIALIZE_JSON
,
532 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
534 return Civi
::$statics[__CLASS__
]['fields'];
538 * Return a mapping from field-name to the corresponding key (as used in fields()).
541 * Array(string $name => string $uniqueName).
543 public static function &fieldKeys() {
544 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
545 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
547 return Civi
::$statics[__CLASS__
]['fieldKeys'];
551 * Returns the names of this table
555 public static function getTableName() {
556 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
560 * Returns if this table needs to be logged
564 public function getLog() {
569 * Returns the list of fields that can be imported
571 * @param bool $prefix
575 public static function &import($prefix = FALSE) {
576 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
581 * Returns the list of fields that can be exported
583 * @param bool $prefix
587 public static function &export($prefix = FALSE) {
588 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
593 * Returns the list of indices
595 * @param bool $localize
599 public static function indices($localize = TRUE) {
601 'UI_name_test_domain_id' => [
602 'name' => 'UI_name_test_domain_id',
608 'localizable' => FALSE,
610 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
613 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;