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:625ab4ba983447ea3e236b48491eeed6)
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 localized title of this entity.
183 public static function getEntityTitle() {
184 return ts('Payment Processors');
188 * Returns foreign keys and entity references.
191 * [CRM_Core_Reference_Interface]
193 public static function getReferenceColumns() {
194 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
195 Civi
::$statics[__CLASS__
]['links'] = static::createReferenceColumns(__CLASS__
);
196 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
197 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
198 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
200 return Civi
::$statics[__CLASS__
]['links'];
204 * Returns all the column names of this table
208 public static function &fields() {
209 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
210 Civi
::$statics[__CLASS__
]['fields'] = [
213 'type' => CRM_Utils_Type
::T_INT
,
214 'title' => ts('Payment Processor ID'),
215 'description' => ts('Payment Processor ID'),
217 'where' => 'civicrm_payment_processor.id',
218 'table_name' => 'civicrm_payment_processor',
219 'entity' => 'PaymentProcessor',
220 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
225 'name' => 'domain_id',
226 'type' => CRM_Utils_Type
::T_INT
,
227 'title' => ts('Payment Processor Domain'),
228 'description' => ts('Which Domain is this match entry for'),
230 'where' => 'civicrm_payment_processor.domain_id',
231 'table_name' => 'civicrm_payment_processor',
232 'entity' => 'PaymentProcessor',
233 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
235 'FKClassName' => 'CRM_Core_DAO_Domain',
236 'pseudoconstant' => [
237 'table' => 'civicrm_domain',
239 'labelColumn' => 'name',
245 'type' => CRM_Utils_Type
::T_STRING
,
246 'title' => ts('Payment Processor'),
247 'description' => ts('Payment Processor Name.'),
249 'size' => CRM_Utils_Type
::BIG
,
250 'where' => 'civicrm_payment_processor.name',
251 'table_name' => 'civicrm_payment_processor',
252 'entity' => 'PaymentProcessor',
253 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
262 'type' => CRM_Utils_Type
::T_STRING
,
263 'title' => ts('Payment Processor Title'),
264 'description' => ts('Payment Processor Descriptive Name.'),
266 'size' => CRM_Utils_Type
::HUGE
,
267 'where' => 'civicrm_payment_processor.title',
268 'table_name' => 'civicrm_payment_processor',
269 'entity' => 'PaymentProcessor',
270 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
278 'name' => 'description',
279 'type' => CRM_Utils_Type
::T_STRING
,
280 'title' => ts('Processor Description'),
281 'description' => ts('Payment Processor Description.'),
283 'size' => CRM_Utils_Type
::HUGE
,
284 'where' => 'civicrm_payment_processor.description',
285 'table_name' => 'civicrm_payment_processor',
286 'entity' => 'PaymentProcessor',
287 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
294 'payment_processor_type_id' => [
295 'name' => 'payment_processor_type_id',
296 'type' => CRM_Utils_Type
::T_INT
,
297 'title' => ts('Payment Processor Type ID'),
299 'where' => 'civicrm_payment_processor.payment_processor_type_id',
300 'table_name' => 'civicrm_payment_processor',
301 'entity' => 'PaymentProcessor',
302 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
304 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
305 'pseudoconstant' => [
306 'table' => 'civicrm_payment_processor_type',
308 'labelColumn' => 'title',
313 'name' => 'is_active',
314 'type' => CRM_Utils_Type
::T_BOOLEAN
,
315 'title' => ts('Processor is Active?'),
316 'description' => ts('Is this processor active?'),
317 'where' => 'civicrm_payment_processor.is_active',
319 'table_name' => 'civicrm_payment_processor',
320 'entity' => 'PaymentProcessor',
321 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
326 'name' => 'is_default',
327 'type' => CRM_Utils_Type
::T_BOOLEAN
,
328 'title' => ts('Processor Is Default?'),
329 'description' => ts('Is this processor the default?'),
330 'where' => 'civicrm_payment_processor.is_default',
332 'table_name' => 'civicrm_payment_processor',
333 'entity' => 'PaymentProcessor',
334 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
340 'type' => CRM_Utils_Type
::T_BOOLEAN
,
341 'title' => ts('Is Test Processor?'),
342 'description' => ts('Is this processor for a test site?'),
343 'where' => 'civicrm_payment_processor.is_test',
345 'table_name' => 'civicrm_payment_processor',
346 'entity' => 'PaymentProcessor',
347 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
352 'name' => 'user_name',
353 'type' => CRM_Utils_Type
::T_STRING
,
354 'title' => ts('User Name'),
356 'size' => CRM_Utils_Type
::HUGE
,
357 'where' => 'civicrm_payment_processor.user_name',
358 'table_name' => 'civicrm_payment_processor',
359 'entity' => 'PaymentProcessor',
360 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
368 'name' => 'password',
369 'type' => CRM_Utils_Type
::T_STRING
,
370 'title' => ts('Password'),
372 'size' => CRM_Utils_Type
::HUGE
,
373 'where' => 'civicrm_payment_processor.password',
374 'table_name' => 'civicrm_payment_processor',
375 'entity' => 'PaymentProcessor',
376 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
379 'type' => 'Password',
384 'name' => 'signature',
385 'type' => CRM_Utils_Type
::T_TEXT
,
386 'title' => ts('Signature'),
389 'where' => 'civicrm_payment_processor.signature',
390 'table_name' => 'civicrm_payment_processor',
391 'entity' => 'PaymentProcessor',
392 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
395 'type' => 'TextArea',
400 'name' => 'url_site',
401 'type' => CRM_Utils_Type
::T_STRING
,
402 'title' => ts('Site URL'),
404 'size' => CRM_Utils_Type
::HUGE
,
405 'where' => 'civicrm_payment_processor.url_site',
406 'table_name' => 'civicrm_payment_processor',
407 'entity' => 'PaymentProcessor',
408 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
417 'type' => CRM_Utils_Type
::T_STRING
,
418 'title' => ts('API URL'),
420 'size' => CRM_Utils_Type
::HUGE
,
421 'where' => 'civicrm_payment_processor.url_api',
422 'table_name' => 'civicrm_payment_processor',
423 'entity' => 'PaymentProcessor',
424 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
432 'name' => 'url_recur',
433 'type' => CRM_Utils_Type
::T_STRING
,
434 'title' => ts('Recurring Payments URL'),
436 'size' => CRM_Utils_Type
::HUGE
,
437 'where' => 'civicrm_payment_processor.url_recur',
438 'table_name' => 'civicrm_payment_processor',
439 'entity' => 'PaymentProcessor',
440 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
448 'name' => 'url_button',
449 'type' => CRM_Utils_Type
::T_STRING
,
450 'title' => ts('Button URL'),
452 'size' => CRM_Utils_Type
::HUGE
,
453 'where' => 'civicrm_payment_processor.url_button',
454 'table_name' => 'civicrm_payment_processor',
455 'entity' => 'PaymentProcessor',
456 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
465 'type' => CRM_Utils_Type
::T_STRING
,
466 'title' => ts('Subject'),
468 'size' => CRM_Utils_Type
::HUGE
,
469 'where' => 'civicrm_payment_processor.subject',
470 'table_name' => 'civicrm_payment_processor',
471 'entity' => 'PaymentProcessor',
472 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
480 'name' => 'class_name',
481 'type' => CRM_Utils_Type
::T_STRING
,
482 'title' => ts('Suffix for PHP class name implementation'),
484 'size' => CRM_Utils_Type
::HUGE
,
485 'where' => 'civicrm_payment_processor.class_name',
486 'table_name' => 'civicrm_payment_processor',
487 'entity' => 'PaymentProcessor',
488 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
493 'name' => 'billing_mode',
494 'type' => CRM_Utils_Type
::T_INT
,
495 'title' => ts('Processor Billing Mode'),
496 'description' => ts('Billing Mode (deprecated)'),
498 'where' => 'civicrm_payment_processor.billing_mode',
499 'table_name' => 'civicrm_payment_processor',
500 'entity' => 'PaymentProcessor',
501 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
506 'name' => 'is_recur',
507 'type' => CRM_Utils_Type
::T_BOOLEAN
,
508 'title' => ts('Processor Supports Recurring?'),
509 'description' => ts('Can process recurring contributions'),
510 'where' => 'civicrm_payment_processor.is_recur',
511 'table_name' => 'civicrm_payment_processor',
512 'entity' => 'PaymentProcessor',
513 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
518 'name' => 'payment_type',
519 'type' => CRM_Utils_Type
::T_INT
,
520 'title' => ts('Payment Type'),
521 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
522 'where' => 'civicrm_payment_processor.payment_type',
524 'table_name' => 'civicrm_payment_processor',
525 'entity' => 'PaymentProcessor',
526 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
530 'payment_instrument_id' => [
531 'name' => 'payment_instrument_id',
532 'type' => CRM_Utils_Type
::T_INT
,
533 'title' => ts('Payment Method'),
534 'description' => ts('Payment Instrument ID'),
535 'where' => 'civicrm_payment_processor.payment_instrument_id',
537 'table_name' => 'civicrm_payment_processor',
538 'entity' => 'PaymentProcessor',
539 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
541 'pseudoconstant' => [
542 'optionGroupName' => 'payment_instrument',
543 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
547 'accepted_credit_cards' => [
548 'name' => 'accepted_credit_cards',
549 'type' => CRM_Utils_Type
::T_TEXT
,
550 'title' => ts('Accepted Credit Cards'),
551 'description' => ts('array of accepted credit card types'),
552 'where' => 'civicrm_payment_processor.accepted_credit_cards',
554 'table_name' => 'civicrm_payment_processor',
555 'entity' => 'PaymentProcessor',
556 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
558 'serialize' => self
::SERIALIZE_JSON
,
562 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
564 return Civi
::$statics[__CLASS__
]['fields'];
568 * Return a mapping from field-name to the corresponding key (as used in fields()).
571 * Array(string $name => string $uniqueName).
573 public static function &fieldKeys() {
574 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
575 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
577 return Civi
::$statics[__CLASS__
]['fieldKeys'];
581 * Returns the names of this table
585 public static function getTableName() {
586 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
590 * Returns if this table needs to be logged
594 public function getLog() {
599 * Returns the list of fields that can be imported
601 * @param bool $prefix
605 public static function &import($prefix = FALSE) {
606 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
611 * Returns the list of fields that can be exported
613 * @param bool $prefix
617 public static function &export($prefix = FALSE) {
618 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
623 * Returns the list of indices
625 * @param bool $localize
629 public static function indices($localize = TRUE) {
631 'UI_name_test_domain_id' => [
632 'name' => 'UI_name_test_domain_id',
638 'localizable' => FALSE,
640 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
643 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;