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:8277056355c9f16ae28f69ba3298730e)
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';
20 * Static instance to hold the table name.
24 public static $_tableName = 'civicrm_payment_processor';
27 * Should CiviCRM log any modifications to this table in the civicrm_log table.
31 public static $_log = FALSE;
34 * Payment Processor ID
41 * Which Domain is this match entry for
48 * Payment Processor Name.
55 * Payment Processor Descriptive Name.
62 * Payment Processor Description.
71 public $payment_processor_type_id;
74 * Is this processor active?
81 * Is this processor the default?
88 * Is this processor for a test site?
140 * Billing Mode (deprecated)
144 public $billing_mode;
147 * Can process recurring contributions
154 * Payment Type: Credit or Debit (deprecated)
158 public $payment_type;
161 * Payment Instrument ID
165 public $payment_instrument_id;
168 * array of accepted credit card types
172 public $accepted_credit_cards;
177 public function __construct() {
178 $this->__table
= 'civicrm_payment_processor';
179 parent
::__construct();
183 * Returns localized title of this entity.
185 * @param bool $plural
186 * Whether to return the plural version of the title.
188 public static function getEntityTitle($plural = FALSE) {
189 return $plural ?
ts('Payment Processors') : ts('Payment Processor');
193 * Returns foreign keys and entity references.
196 * [CRM_Core_Reference_Interface]
198 public static function getReferenceColumns() {
199 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
200 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
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');
203 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
205 return Civi
::$statics[__CLASS__
]['links'];
209 * Returns all the column names of this table
213 public static function &fields() {
214 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
215 Civi
::$statics[__CLASS__
]['fields'] = [
218 'type' => CRM_Utils_Type
::T_INT
,
219 'title' => ts('Payment Processor ID'),
220 'description' => ts('Payment Processor ID'),
222 'where' => 'civicrm_payment_processor.id',
223 'table_name' => 'civicrm_payment_processor',
224 'entity' => 'PaymentProcessor',
225 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
230 'name' => 'domain_id',
231 'type' => CRM_Utils_Type
::T_INT
,
232 'title' => ts('Payment Processor Domain'),
233 'description' => ts('Which Domain is this match entry for'),
235 'where' => 'civicrm_payment_processor.domain_id',
236 'table_name' => 'civicrm_payment_processor',
237 'entity' => 'PaymentProcessor',
238 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
240 'FKClassName' => 'CRM_Core_DAO_Domain',
241 'pseudoconstant' => [
242 'table' => 'civicrm_domain',
244 'labelColumn' => 'name',
250 'type' => CRM_Utils_Type
::T_STRING
,
251 'title' => ts('Payment Processor'),
252 'description' => ts('Payment Processor Name.'),
254 'size' => CRM_Utils_Type
::BIG
,
255 'where' => 'civicrm_payment_processor.name',
256 'table_name' => 'civicrm_payment_processor',
257 'entity' => 'PaymentProcessor',
258 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
267 'type' => CRM_Utils_Type
::T_STRING
,
268 'title' => ts('Payment Processor Title'),
269 'description' => ts('Payment Processor Descriptive Name.'),
271 'size' => CRM_Utils_Type
::HUGE
,
272 'where' => 'civicrm_payment_processor.title',
273 'table_name' => 'civicrm_payment_processor',
274 'entity' => 'PaymentProcessor',
275 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
283 'name' => 'description',
284 'type' => CRM_Utils_Type
::T_STRING
,
285 'title' => ts('Processor Description'),
286 'description' => ts('Payment Processor Description.'),
288 'size' => CRM_Utils_Type
::HUGE
,
289 'where' => 'civicrm_payment_processor.description',
290 'table_name' => 'civicrm_payment_processor',
291 'entity' => 'PaymentProcessor',
292 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
299 'payment_processor_type_id' => [
300 'name' => 'payment_processor_type_id',
301 'type' => CRM_Utils_Type
::T_INT
,
302 'title' => ts('Payment Processor Type ID'),
304 'where' => 'civicrm_payment_processor.payment_processor_type_id',
305 'table_name' => 'civicrm_payment_processor',
306 'entity' => 'PaymentProcessor',
307 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
309 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
310 'pseudoconstant' => [
311 'table' => 'civicrm_payment_processor_type',
313 'labelColumn' => 'title',
318 'name' => 'is_active',
319 'type' => CRM_Utils_Type
::T_BOOLEAN
,
320 'title' => ts('Processor is Active?'),
321 'description' => ts('Is this processor active?'),
322 'where' => 'civicrm_payment_processor.is_active',
324 'table_name' => 'civicrm_payment_processor',
325 'entity' => 'PaymentProcessor',
326 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
331 'name' => 'is_default',
332 'type' => CRM_Utils_Type
::T_BOOLEAN
,
333 'title' => ts('Processor Is Default?'),
334 'description' => ts('Is this processor the default?'),
335 'where' => 'civicrm_payment_processor.is_default',
337 'table_name' => 'civicrm_payment_processor',
338 'entity' => 'PaymentProcessor',
339 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
345 'type' => CRM_Utils_Type
::T_BOOLEAN
,
346 'title' => ts('Is Test Processor?'),
347 'description' => ts('Is this processor for a test site?'),
348 'where' => 'civicrm_payment_processor.is_test',
350 'table_name' => 'civicrm_payment_processor',
351 'entity' => 'PaymentProcessor',
352 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
357 'name' => 'user_name',
358 'type' => CRM_Utils_Type
::T_STRING
,
359 'title' => ts('User Name'),
361 'size' => CRM_Utils_Type
::HUGE
,
362 'where' => 'civicrm_payment_processor.user_name',
363 'table_name' => 'civicrm_payment_processor',
364 'entity' => 'PaymentProcessor',
365 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
373 'name' => 'password',
374 'type' => CRM_Utils_Type
::T_STRING
,
375 'title' => ts('Password'),
377 'size' => CRM_Utils_Type
::HUGE
,
378 'where' => 'civicrm_payment_processor.password',
379 'table_name' => 'civicrm_payment_processor',
380 'entity' => 'PaymentProcessor',
381 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
384 'type' => 'Password',
389 'name' => 'signature',
390 'type' => CRM_Utils_Type
::T_TEXT
,
391 'title' => ts('Signature'),
394 'where' => 'civicrm_payment_processor.signature',
395 'table_name' => 'civicrm_payment_processor',
396 'entity' => 'PaymentProcessor',
397 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
400 'type' => 'TextArea',
405 'name' => 'url_site',
406 'type' => CRM_Utils_Type
::T_STRING
,
407 'title' => ts('Site URL'),
409 'size' => CRM_Utils_Type
::HUGE
,
410 'where' => 'civicrm_payment_processor.url_site',
411 'table_name' => 'civicrm_payment_processor',
412 'entity' => 'PaymentProcessor',
413 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
422 'type' => CRM_Utils_Type
::T_STRING
,
423 'title' => ts('API URL'),
425 'size' => CRM_Utils_Type
::HUGE
,
426 'where' => 'civicrm_payment_processor.url_api',
427 'table_name' => 'civicrm_payment_processor',
428 'entity' => 'PaymentProcessor',
429 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
437 'name' => 'url_recur',
438 'type' => CRM_Utils_Type
::T_STRING
,
439 'title' => ts('Recurring Payments URL'),
441 'size' => CRM_Utils_Type
::HUGE
,
442 'where' => 'civicrm_payment_processor.url_recur',
443 'table_name' => 'civicrm_payment_processor',
444 'entity' => 'PaymentProcessor',
445 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
453 'name' => 'url_button',
454 'type' => CRM_Utils_Type
::T_STRING
,
455 'title' => ts('Button URL'),
457 'size' => CRM_Utils_Type
::HUGE
,
458 'where' => 'civicrm_payment_processor.url_button',
459 'table_name' => 'civicrm_payment_processor',
460 'entity' => 'PaymentProcessor',
461 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
470 'type' => CRM_Utils_Type
::T_STRING
,
471 'title' => ts('Subject'),
473 'size' => CRM_Utils_Type
::HUGE
,
474 'where' => 'civicrm_payment_processor.subject',
475 'table_name' => 'civicrm_payment_processor',
476 'entity' => 'PaymentProcessor',
477 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
485 'name' => 'class_name',
486 'type' => CRM_Utils_Type
::T_STRING
,
487 'title' => ts('Suffix for PHP class name implementation'),
489 'size' => CRM_Utils_Type
::HUGE
,
490 'where' => 'civicrm_payment_processor.class_name',
491 'table_name' => 'civicrm_payment_processor',
492 'entity' => 'PaymentProcessor',
493 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
498 'name' => 'billing_mode',
499 'type' => CRM_Utils_Type
::T_INT
,
500 'title' => ts('Processor Billing Mode'),
501 'description' => ts('Billing Mode (deprecated)'),
503 'where' => 'civicrm_payment_processor.billing_mode',
504 'table_name' => 'civicrm_payment_processor',
505 'entity' => 'PaymentProcessor',
506 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
511 'name' => 'is_recur',
512 'type' => CRM_Utils_Type
::T_BOOLEAN
,
513 'title' => ts('Processor Supports Recurring?'),
514 'description' => ts('Can process recurring contributions'),
515 'where' => 'civicrm_payment_processor.is_recur',
516 'table_name' => 'civicrm_payment_processor',
517 'entity' => 'PaymentProcessor',
518 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
523 'name' => 'payment_type',
524 'type' => CRM_Utils_Type
::T_INT
,
525 'title' => ts('Payment Type'),
526 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
527 'where' => 'civicrm_payment_processor.payment_type',
529 'table_name' => 'civicrm_payment_processor',
530 'entity' => 'PaymentProcessor',
531 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
535 'payment_instrument_id' => [
536 'name' => 'payment_instrument_id',
537 'type' => CRM_Utils_Type
::T_INT
,
538 'title' => ts('Payment Method'),
539 'description' => ts('Payment Instrument ID'),
540 'where' => 'civicrm_payment_processor.payment_instrument_id',
542 'table_name' => 'civicrm_payment_processor',
543 'entity' => 'PaymentProcessor',
544 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
546 'pseudoconstant' => [
547 'optionGroupName' => 'payment_instrument',
548 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
552 'accepted_credit_cards' => [
553 'name' => 'accepted_credit_cards',
554 'type' => CRM_Utils_Type
::T_TEXT
,
555 'title' => ts('Accepted Credit Cards'),
556 'description' => ts('array of accepted credit card types'),
557 'where' => 'civicrm_payment_processor.accepted_credit_cards',
559 'table_name' => 'civicrm_payment_processor',
560 'entity' => 'PaymentProcessor',
561 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
563 'serialize' => self
::SERIALIZE_JSON
,
567 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
569 return Civi
::$statics[__CLASS__
]['fields'];
573 * Return a mapping from field-name to the corresponding key (as used in fields()).
576 * Array(string $name => string $uniqueName).
578 public static function &fieldKeys() {
579 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
580 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
582 return Civi
::$statics[__CLASS__
]['fieldKeys'];
586 * Returns the names of this table
590 public static function getTableName() {
591 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
595 * Returns if this table needs to be logged
599 public function getLog() {
604 * Returns the list of fields that can be imported
606 * @param bool $prefix
610 public static function &import($prefix = FALSE) {
611 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
616 * Returns the list of fields that can be exported
618 * @param bool $prefix
622 public static function &export($prefix = FALSE) {
623 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
628 * Returns the list of indices
630 * @param bool $localize
634 public static function indices($localize = TRUE) {
636 'UI_name_test_domain_id' => [
637 'name' => 'UI_name_test_domain_id',
643 'localizable' => FALSE,
645 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
648 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;