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:a541d72f9435b6ae2706d98cc01b1598)
13 * Database access object for the PaymentProcessor entity.
15 class CRM_Financial_DAO_PaymentProcessor
extends CRM_Core_DAO
{
16 const EXT
= 'civicrm';
17 const TABLE_ADDED
= '1.8';
18 const COMPONENT
= 'CiviContribute';
21 * Static instance to hold the table name.
25 public static $_tableName = 'civicrm_payment_processor';
28 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 public static $_log = FALSE;
35 * Payment Processor ID
42 * Which Domain is this match entry for
49 * Payment Processor Name.
56 * Payment Processor Descriptive Name.
63 * Payment Processor Description.
72 public $payment_processor_type_id;
75 * Is this processor active?
82 * Is this processor the default?
89 * Is this processor for a test site?
141 * Billing Mode (deprecated)
145 public $billing_mode;
148 * Can process recurring contributions
155 * Payment Type: Credit or Debit (deprecated)
159 public $payment_type;
162 * Payment Instrument ID
166 public $payment_instrument_id;
169 * array of accepted credit card types
173 public $accepted_credit_cards;
178 public function __construct() {
179 $this->__table
= 'civicrm_payment_processor';
180 parent
::__construct();
184 * Returns localized title of this entity.
186 * @param bool $plural
187 * Whether to return the plural version of the title.
189 public static function getEntityTitle($plural = FALSE) {
190 return $plural ?
ts('Payment Processors') : ts('Payment Processor');
194 * Returns foreign keys and entity references.
197 * [CRM_Core_Reference_Interface]
199 public static function getReferenceColumns() {
200 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
201 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
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');
204 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
206 return Civi
::$statics[__CLASS__
]['links'];
210 * Returns all the column names of this table
214 public static function &fields() {
215 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
216 Civi
::$statics[__CLASS__
]['fields'] = [
219 'type' => CRM_Utils_Type
::T_INT
,
220 'title' => ts('Payment Processor ID'),
221 'description' => ts('Payment Processor ID'),
223 'where' => 'civicrm_payment_processor.id',
224 'table_name' => 'civicrm_payment_processor',
225 'entity' => 'PaymentProcessor',
226 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
235 'name' => 'domain_id',
236 'type' => CRM_Utils_Type
::T_INT
,
237 'title' => ts('Domain ID'),
238 'description' => ts('Which Domain is this match entry for'),
240 'where' => 'civicrm_payment_processor.domain_id',
241 'table_name' => 'civicrm_payment_processor',
242 'entity' => 'PaymentProcessor',
243 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
245 'FKClassName' => 'CRM_Core_DAO_Domain',
247 'label' => ts("Domain"),
249 'pseudoconstant' => [
250 'table' => 'civicrm_domain',
252 'labelColumn' => 'name',
258 'type' => CRM_Utils_Type
::T_STRING
,
259 'title' => ts('Payment Processor'),
260 'description' => ts('Payment Processor Name.'),
262 'size' => CRM_Utils_Type
::BIG
,
263 'where' => 'civicrm_payment_processor.name',
264 'table_name' => 'civicrm_payment_processor',
265 'entity' => 'PaymentProcessor',
266 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
275 'type' => CRM_Utils_Type
::T_STRING
,
276 'title' => ts('Payment Processor Title'),
277 'description' => ts('Payment Processor Descriptive Name.'),
279 'size' => CRM_Utils_Type
::HUGE
,
280 'where' => 'civicrm_payment_processor.title',
281 'table_name' => 'civicrm_payment_processor',
282 'entity' => 'PaymentProcessor',
283 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
291 'name' => 'description',
292 'type' => CRM_Utils_Type
::T_STRING
,
293 'title' => ts('Processor Description'),
294 'description' => ts('Payment Processor Description.'),
296 'size' => CRM_Utils_Type
::HUGE
,
297 'where' => 'civicrm_payment_processor.description',
298 'table_name' => 'civicrm_payment_processor',
299 'entity' => 'PaymentProcessor',
300 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
307 'payment_processor_type_id' => [
308 'name' => 'payment_processor_type_id',
309 'type' => CRM_Utils_Type
::T_INT
,
310 'title' => ts('Type ID'),
312 'where' => 'civicrm_payment_processor.payment_processor_type_id',
313 'table_name' => 'civicrm_payment_processor',
314 'entity' => 'PaymentProcessor',
315 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
317 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
319 'label' => ts("Type"),
321 'pseudoconstant' => [
322 'table' => 'civicrm_payment_processor_type',
324 'labelColumn' => 'title',
329 'name' => 'is_active',
330 'type' => CRM_Utils_Type
::T_BOOLEAN
,
331 'title' => ts('Processor is Active?'),
332 'description' => ts('Is this processor active?'),
333 'where' => 'civicrm_payment_processor.is_active',
335 'table_name' => 'civicrm_payment_processor',
336 'entity' => 'PaymentProcessor',
337 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
342 'name' => 'is_default',
343 'type' => CRM_Utils_Type
::T_BOOLEAN
,
344 'title' => ts('Processor Is Default?'),
345 'description' => ts('Is this processor the default?'),
346 'where' => 'civicrm_payment_processor.is_default',
348 'table_name' => 'civicrm_payment_processor',
349 'entity' => 'PaymentProcessor',
350 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
356 'type' => CRM_Utils_Type
::T_BOOLEAN
,
357 'title' => ts('Is Test Processor?'),
358 'description' => ts('Is this processor for a test site?'),
359 'where' => 'civicrm_payment_processor.is_test',
361 'table_name' => 'civicrm_payment_processor',
362 'entity' => 'PaymentProcessor',
363 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
368 'name' => 'user_name',
369 'type' => CRM_Utils_Type
::T_STRING
,
370 'title' => ts('User Name'),
372 'size' => CRM_Utils_Type
::HUGE
,
373 'where' => 'civicrm_payment_processor.user_name',
374 'table_name' => 'civicrm_payment_processor',
375 'entity' => 'PaymentProcessor',
376 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
384 'name' => 'password',
385 'type' => CRM_Utils_Type
::T_STRING
,
386 'title' => ts('Password'),
388 'size' => CRM_Utils_Type
::HUGE
,
389 'where' => 'civicrm_payment_processor.password',
390 'table_name' => 'civicrm_payment_processor',
391 'entity' => 'PaymentProcessor',
392 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
395 'type' => 'Password',
400 'name' => 'signature',
401 'type' => CRM_Utils_Type
::T_TEXT
,
402 'title' => ts('Signature'),
405 'where' => 'civicrm_payment_processor.signature',
406 'table_name' => 'civicrm_payment_processor',
407 'entity' => 'PaymentProcessor',
408 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
411 'type' => 'TextArea',
416 'name' => 'url_site',
417 'type' => CRM_Utils_Type
::T_STRING
,
418 'title' => ts('Site URL'),
420 'size' => CRM_Utils_Type
::HUGE
,
421 'where' => 'civicrm_payment_processor.url_site',
422 'table_name' => 'civicrm_payment_processor',
423 'entity' => 'PaymentProcessor',
424 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
433 'type' => CRM_Utils_Type
::T_STRING
,
434 'title' => ts('API URL'),
436 'size' => CRM_Utils_Type
::HUGE
,
437 'where' => 'civicrm_payment_processor.url_api',
438 'table_name' => 'civicrm_payment_processor',
439 'entity' => 'PaymentProcessor',
440 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
448 'name' => 'url_recur',
449 'type' => CRM_Utils_Type
::T_STRING
,
450 'title' => ts('Recurring Payments URL'),
452 'size' => CRM_Utils_Type
::HUGE
,
453 'where' => 'civicrm_payment_processor.url_recur',
454 'table_name' => 'civicrm_payment_processor',
455 'entity' => 'PaymentProcessor',
456 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
464 'name' => 'url_button',
465 'type' => CRM_Utils_Type
::T_STRING
,
466 'title' => ts('Button URL'),
468 'size' => CRM_Utils_Type
::HUGE
,
469 'where' => 'civicrm_payment_processor.url_button',
470 'table_name' => 'civicrm_payment_processor',
471 'entity' => 'PaymentProcessor',
472 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
481 'type' => CRM_Utils_Type
::T_STRING
,
482 'title' => ts('Subject'),
484 'size' => CRM_Utils_Type
::HUGE
,
485 'where' => 'civicrm_payment_processor.subject',
486 'table_name' => 'civicrm_payment_processor',
487 'entity' => 'PaymentProcessor',
488 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
496 'name' => 'class_name',
497 'type' => CRM_Utils_Type
::T_STRING
,
498 'title' => ts('Suffix for PHP class name implementation'),
500 'size' => CRM_Utils_Type
::HUGE
,
501 'where' => 'civicrm_payment_processor.class_name',
502 'table_name' => 'civicrm_payment_processor',
503 'entity' => 'PaymentProcessor',
504 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
509 'name' => 'billing_mode',
510 'type' => CRM_Utils_Type
::T_INT
,
511 'title' => ts('Processor Billing Mode'),
512 'description' => ts('Billing Mode (deprecated)'),
514 'where' => 'civicrm_payment_processor.billing_mode',
515 'table_name' => 'civicrm_payment_processor',
516 'entity' => 'PaymentProcessor',
517 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
522 'name' => 'is_recur',
523 'type' => CRM_Utils_Type
::T_BOOLEAN
,
524 'title' => ts('Processor Supports Recurring?'),
525 'description' => ts('Can process recurring contributions'),
526 'where' => 'civicrm_payment_processor.is_recur',
527 'table_name' => 'civicrm_payment_processor',
528 'entity' => 'PaymentProcessor',
529 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
534 'name' => 'payment_type',
535 'type' => CRM_Utils_Type
::T_INT
,
536 'title' => ts('Payment Type'),
537 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
538 'where' => 'civicrm_payment_processor.payment_type',
540 'table_name' => 'civicrm_payment_processor',
541 'entity' => 'PaymentProcessor',
542 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
546 'payment_instrument_id' => [
547 'name' => 'payment_instrument_id',
548 'type' => CRM_Utils_Type
::T_INT
,
549 'title' => ts('Payment Method'),
550 'description' => ts('Payment Instrument ID'),
551 'where' => 'civicrm_payment_processor.payment_instrument_id',
553 'table_name' => 'civicrm_payment_processor',
554 'entity' => 'PaymentProcessor',
555 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
557 'pseudoconstant' => [
558 'optionGroupName' => 'payment_instrument',
559 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
563 'accepted_credit_cards' => [
564 'name' => 'accepted_credit_cards',
565 'type' => CRM_Utils_Type
::T_TEXT
,
566 'title' => ts('Accepted Credit Cards'),
567 'description' => ts('array of accepted credit card types'),
568 'where' => 'civicrm_payment_processor.accepted_credit_cards',
570 'table_name' => 'civicrm_payment_processor',
571 'entity' => 'PaymentProcessor',
572 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
574 'serialize' => self
::SERIALIZE_JSON
,
578 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
580 return Civi
::$statics[__CLASS__
]['fields'];
584 * Return a mapping from field-name to the corresponding key (as used in fields()).
587 * Array(string $name => string $uniqueName).
589 public static function &fieldKeys() {
590 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
591 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
593 return Civi
::$statics[__CLASS__
]['fieldKeys'];
597 * Returns the names of this table
601 public static function getTableName() {
602 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
606 * Returns if this table needs to be logged
610 public function getLog() {
615 * Returns the list of fields that can be imported
617 * @param bool $prefix
621 public static function &import($prefix = FALSE) {
622 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
627 * Returns the list of fields that can be exported
629 * @param bool $prefix
633 public static function &export($prefix = FALSE) {
634 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
639 * Returns the list of indices
641 * @param bool $localize
645 public static function indices($localize = TRUE) {
647 'UI_name_test_domain_id' => [
648 'name' => 'UI_name_test_domain_id',
654 'localizable' => FALSE,
656 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
659 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;