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:8c42ca973c4031a67a5052682c3d73e7)
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',
231 'name' => 'domain_id',
232 'type' => CRM_Utils_Type
::T_INT
,
233 'title' => ts('Payment Processor Domain'),
234 'description' => ts('Which Domain is this match entry for'),
236 'where' => 'civicrm_payment_processor.domain_id',
237 'table_name' => 'civicrm_payment_processor',
238 'entity' => 'PaymentProcessor',
239 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
241 'FKClassName' => 'CRM_Core_DAO_Domain',
242 'pseudoconstant' => [
243 'table' => 'civicrm_domain',
245 'labelColumn' => 'name',
251 'type' => CRM_Utils_Type
::T_STRING
,
252 'title' => ts('Payment Processor'),
253 'description' => ts('Payment Processor Name.'),
255 'size' => CRM_Utils_Type
::BIG
,
256 'where' => 'civicrm_payment_processor.name',
257 'table_name' => 'civicrm_payment_processor',
258 'entity' => 'PaymentProcessor',
259 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
268 'type' => CRM_Utils_Type
::T_STRING
,
269 'title' => ts('Payment Processor Title'),
270 'description' => ts('Payment Processor Descriptive Name.'),
272 'size' => CRM_Utils_Type
::HUGE
,
273 'where' => 'civicrm_payment_processor.title',
274 'table_name' => 'civicrm_payment_processor',
275 'entity' => 'PaymentProcessor',
276 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
284 'name' => 'description',
285 'type' => CRM_Utils_Type
::T_STRING
,
286 'title' => ts('Processor Description'),
287 'description' => ts('Payment Processor Description.'),
289 'size' => CRM_Utils_Type
::HUGE
,
290 'where' => 'civicrm_payment_processor.description',
291 'table_name' => 'civicrm_payment_processor',
292 'entity' => 'PaymentProcessor',
293 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
300 'payment_processor_type_id' => [
301 'name' => 'payment_processor_type_id',
302 'type' => CRM_Utils_Type
::T_INT
,
303 'title' => ts('Payment Processor Type ID'),
305 'where' => 'civicrm_payment_processor.payment_processor_type_id',
306 'table_name' => 'civicrm_payment_processor',
307 'entity' => 'PaymentProcessor',
308 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
310 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
311 'pseudoconstant' => [
312 'table' => 'civicrm_payment_processor_type',
314 'labelColumn' => 'title',
319 'name' => 'is_active',
320 'type' => CRM_Utils_Type
::T_BOOLEAN
,
321 'title' => ts('Processor is Active?'),
322 'description' => ts('Is this processor active?'),
323 'where' => 'civicrm_payment_processor.is_active',
325 'table_name' => 'civicrm_payment_processor',
326 'entity' => 'PaymentProcessor',
327 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
332 'name' => 'is_default',
333 'type' => CRM_Utils_Type
::T_BOOLEAN
,
334 'title' => ts('Processor Is Default?'),
335 'description' => ts('Is this processor the default?'),
336 'where' => 'civicrm_payment_processor.is_default',
338 'table_name' => 'civicrm_payment_processor',
339 'entity' => 'PaymentProcessor',
340 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
346 'type' => CRM_Utils_Type
::T_BOOLEAN
,
347 'title' => ts('Is Test Processor?'),
348 'description' => ts('Is this processor for a test site?'),
349 'where' => 'civicrm_payment_processor.is_test',
351 'table_name' => 'civicrm_payment_processor',
352 'entity' => 'PaymentProcessor',
353 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
358 'name' => 'user_name',
359 'type' => CRM_Utils_Type
::T_STRING
,
360 'title' => ts('User Name'),
362 'size' => CRM_Utils_Type
::HUGE
,
363 'where' => 'civicrm_payment_processor.user_name',
364 'table_name' => 'civicrm_payment_processor',
365 'entity' => 'PaymentProcessor',
366 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
374 'name' => 'password',
375 'type' => CRM_Utils_Type
::T_STRING
,
376 'title' => ts('Password'),
378 'size' => CRM_Utils_Type
::HUGE
,
379 'where' => 'civicrm_payment_processor.password',
380 'table_name' => 'civicrm_payment_processor',
381 'entity' => 'PaymentProcessor',
382 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
385 'type' => 'Password',
390 'name' => 'signature',
391 'type' => CRM_Utils_Type
::T_TEXT
,
392 'title' => ts('Signature'),
395 'where' => 'civicrm_payment_processor.signature',
396 'table_name' => 'civicrm_payment_processor',
397 'entity' => 'PaymentProcessor',
398 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
401 'type' => 'TextArea',
406 'name' => 'url_site',
407 'type' => CRM_Utils_Type
::T_STRING
,
408 'title' => ts('Site URL'),
410 'size' => CRM_Utils_Type
::HUGE
,
411 'where' => 'civicrm_payment_processor.url_site',
412 'table_name' => 'civicrm_payment_processor',
413 'entity' => 'PaymentProcessor',
414 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
423 'type' => CRM_Utils_Type
::T_STRING
,
424 'title' => ts('API URL'),
426 'size' => CRM_Utils_Type
::HUGE
,
427 'where' => 'civicrm_payment_processor.url_api',
428 'table_name' => 'civicrm_payment_processor',
429 'entity' => 'PaymentProcessor',
430 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
438 'name' => 'url_recur',
439 'type' => CRM_Utils_Type
::T_STRING
,
440 'title' => ts('Recurring Payments URL'),
442 'size' => CRM_Utils_Type
::HUGE
,
443 'where' => 'civicrm_payment_processor.url_recur',
444 'table_name' => 'civicrm_payment_processor',
445 'entity' => 'PaymentProcessor',
446 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
454 'name' => 'url_button',
455 'type' => CRM_Utils_Type
::T_STRING
,
456 'title' => ts('Button URL'),
458 'size' => CRM_Utils_Type
::HUGE
,
459 'where' => 'civicrm_payment_processor.url_button',
460 'table_name' => 'civicrm_payment_processor',
461 'entity' => 'PaymentProcessor',
462 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
471 'type' => CRM_Utils_Type
::T_STRING
,
472 'title' => ts('Subject'),
474 'size' => CRM_Utils_Type
::HUGE
,
475 'where' => 'civicrm_payment_processor.subject',
476 'table_name' => 'civicrm_payment_processor',
477 'entity' => 'PaymentProcessor',
478 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
486 'name' => 'class_name',
487 'type' => CRM_Utils_Type
::T_STRING
,
488 'title' => ts('Suffix for PHP class name implementation'),
490 'size' => CRM_Utils_Type
::HUGE
,
491 'where' => 'civicrm_payment_processor.class_name',
492 'table_name' => 'civicrm_payment_processor',
493 'entity' => 'PaymentProcessor',
494 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
499 'name' => 'billing_mode',
500 'type' => CRM_Utils_Type
::T_INT
,
501 'title' => ts('Processor Billing Mode'),
502 'description' => ts('Billing Mode (deprecated)'),
504 'where' => 'civicrm_payment_processor.billing_mode',
505 'table_name' => 'civicrm_payment_processor',
506 'entity' => 'PaymentProcessor',
507 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
512 'name' => 'is_recur',
513 'type' => CRM_Utils_Type
::T_BOOLEAN
,
514 'title' => ts('Processor Supports Recurring?'),
515 'description' => ts('Can process recurring contributions'),
516 'where' => 'civicrm_payment_processor.is_recur',
517 'table_name' => 'civicrm_payment_processor',
518 'entity' => 'PaymentProcessor',
519 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
524 'name' => 'payment_type',
525 'type' => CRM_Utils_Type
::T_INT
,
526 'title' => ts('Payment Type'),
527 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
528 'where' => 'civicrm_payment_processor.payment_type',
530 'table_name' => 'civicrm_payment_processor',
531 'entity' => 'PaymentProcessor',
532 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
536 'payment_instrument_id' => [
537 'name' => 'payment_instrument_id',
538 'type' => CRM_Utils_Type
::T_INT
,
539 'title' => ts('Payment Method'),
540 'description' => ts('Payment Instrument ID'),
541 'where' => 'civicrm_payment_processor.payment_instrument_id',
543 'table_name' => 'civicrm_payment_processor',
544 'entity' => 'PaymentProcessor',
545 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
547 'pseudoconstant' => [
548 'optionGroupName' => 'payment_instrument',
549 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
553 'accepted_credit_cards' => [
554 'name' => 'accepted_credit_cards',
555 'type' => CRM_Utils_Type
::T_TEXT
,
556 'title' => ts('Accepted Credit Cards'),
557 'description' => ts('array of accepted credit card types'),
558 'where' => 'civicrm_payment_processor.accepted_credit_cards',
560 'table_name' => 'civicrm_payment_processor',
561 'entity' => 'PaymentProcessor',
562 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
564 'serialize' => self
::SERIALIZE_JSON
,
568 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
570 return Civi
::$statics[__CLASS__
]['fields'];
574 * Return a mapping from field-name to the corresponding key (as used in fields()).
577 * Array(string $name => string $uniqueName).
579 public static function &fieldKeys() {
580 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
581 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
583 return Civi
::$statics[__CLASS__
]['fieldKeys'];
587 * Returns the names of this table
591 public static function getTableName() {
592 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
596 * Returns if this table needs to be logged
600 public function getLog() {
605 * Returns the list of fields that can be imported
607 * @param bool $prefix
611 public static function &import($prefix = FALSE) {
612 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
617 * Returns the list of fields that can be exported
619 * @param bool $prefix
623 public static function &export($prefix = FALSE) {
624 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
629 * Returns the list of indices
631 * @param bool $localize
635 public static function indices($localize = TRUE) {
637 'UI_name_test_domain_id' => [
638 'name' => 'UI_name_test_domain_id',
644 'localizable' => FALSE,
646 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
649 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;