5 * @copyright CiviCRM LLC (c) 2004-2019
7 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:6d3b0b9b13fae223bc45c6c1e4ce7b94)
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',
279 'payment_processor_type_id' => [
280 'name' => 'payment_processor_type_id',
281 'type' => CRM_Utils_Type
::T_INT
,
282 'title' => ts('Payment Processor Type ID'),
283 'where' => 'civicrm_payment_processor.payment_processor_type_id',
284 'table_name' => 'civicrm_payment_processor',
285 'entity' => 'PaymentProcessor',
286 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
288 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
289 'pseudoconstant' => [
290 'table' => 'civicrm_payment_processor_type',
292 'labelColumn' => 'title',
296 'name' => 'is_active',
297 'type' => CRM_Utils_Type
::T_BOOLEAN
,
298 'title' => ts('Processor is Active?'),
299 'description' => ts('Is this processor active?'),
300 'where' => 'civicrm_payment_processor.is_active',
301 'table_name' => 'civicrm_payment_processor',
302 'entity' => 'PaymentProcessor',
303 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
307 'name' => 'is_default',
308 'type' => CRM_Utils_Type
::T_BOOLEAN
,
309 'title' => ts('Processor Is Default?'),
310 'description' => ts('Is this processor the default?'),
311 'where' => 'civicrm_payment_processor.is_default',
312 'table_name' => 'civicrm_payment_processor',
313 'entity' => 'PaymentProcessor',
314 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
319 'type' => CRM_Utils_Type
::T_BOOLEAN
,
320 'title' => ts('Is Test Processor?'),
321 'description' => ts('Is this processor for a test site?'),
322 'where' => 'civicrm_payment_processor.is_test',
323 'table_name' => 'civicrm_payment_processor',
324 'entity' => 'PaymentProcessor',
325 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
329 'name' => 'user_name',
330 'type' => CRM_Utils_Type
::T_STRING
,
331 'title' => ts('User Name'),
333 'size' => CRM_Utils_Type
::HUGE
,
334 'where' => 'civicrm_payment_processor.user_name',
335 'table_name' => 'civicrm_payment_processor',
336 'entity' => 'PaymentProcessor',
337 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
344 'name' => 'password',
345 'type' => CRM_Utils_Type
::T_STRING
,
346 'title' => ts('Password'),
348 'size' => CRM_Utils_Type
::HUGE
,
349 'where' => 'civicrm_payment_processor.password',
350 'table_name' => 'civicrm_payment_processor',
351 'entity' => 'PaymentProcessor',
352 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
355 'type' => 'Password',
359 'name' => 'signature',
360 'type' => CRM_Utils_Type
::T_TEXT
,
361 'title' => ts('Signature'),
364 'where' => 'civicrm_payment_processor.signature',
365 'table_name' => 'civicrm_payment_processor',
366 'entity' => 'PaymentProcessor',
367 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
370 'type' => 'TextArea',
374 'name' => 'url_site',
375 'type' => CRM_Utils_Type
::T_STRING
,
376 'title' => ts('Site URL'),
378 'size' => CRM_Utils_Type
::HUGE
,
379 'where' => 'civicrm_payment_processor.url_site',
380 'table_name' => 'civicrm_payment_processor',
381 'entity' => 'PaymentProcessor',
382 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
390 'type' => CRM_Utils_Type
::T_STRING
,
391 'title' => ts('API URL'),
393 'size' => CRM_Utils_Type
::HUGE
,
394 'where' => 'civicrm_payment_processor.url_api',
395 'table_name' => 'civicrm_payment_processor',
396 'entity' => 'PaymentProcessor',
397 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
404 'name' => 'url_recur',
405 'type' => CRM_Utils_Type
::T_STRING
,
406 'title' => ts('Recurring Payments URL'),
408 'size' => CRM_Utils_Type
::HUGE
,
409 'where' => 'civicrm_payment_processor.url_recur',
410 'table_name' => 'civicrm_payment_processor',
411 'entity' => 'PaymentProcessor',
412 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
419 'name' => 'url_button',
420 'type' => CRM_Utils_Type
::T_STRING
,
421 'title' => ts('Button URL'),
423 'size' => CRM_Utils_Type
::HUGE
,
424 'where' => 'civicrm_payment_processor.url_button',
425 'table_name' => 'civicrm_payment_processor',
426 'entity' => 'PaymentProcessor',
427 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
435 'type' => CRM_Utils_Type
::T_STRING
,
436 'title' => ts('Subject'),
438 'size' => CRM_Utils_Type
::HUGE
,
439 'where' => 'civicrm_payment_processor.subject',
440 'table_name' => 'civicrm_payment_processor',
441 'entity' => 'PaymentProcessor',
442 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
449 'name' => 'class_name',
450 'type' => CRM_Utils_Type
::T_STRING
,
451 'title' => ts('Suffix for PHP class name implementation'),
453 'size' => CRM_Utils_Type
::HUGE
,
454 'where' => 'civicrm_payment_processor.class_name',
455 'table_name' => 'civicrm_payment_processor',
456 'entity' => 'PaymentProcessor',
457 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
461 'name' => 'billing_mode',
462 'type' => CRM_Utils_Type
::T_INT
,
463 'title' => ts('Processor Billing Mode'),
464 'description' => ts('Billing Mode (deprecated)'),
466 'where' => 'civicrm_payment_processor.billing_mode',
467 'table_name' => 'civicrm_payment_processor',
468 'entity' => 'PaymentProcessor',
469 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
473 'name' => 'is_recur',
474 'type' => CRM_Utils_Type
::T_BOOLEAN
,
475 'title' => ts('Processor Supports Recurring?'),
476 'description' => ts('Can process recurring contributions'),
477 'where' => 'civicrm_payment_processor.is_recur',
478 'table_name' => 'civicrm_payment_processor',
479 'entity' => 'PaymentProcessor',
480 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
484 'name' => 'payment_type',
485 'type' => CRM_Utils_Type
::T_INT
,
486 'title' => ts('Payment Type'),
487 'description' => ts('Payment Type: Credit or Debit (deprecated)'),
488 'where' => 'civicrm_payment_processor.payment_type',
490 'table_name' => 'civicrm_payment_processor',
491 'entity' => 'PaymentProcessor',
492 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
495 'payment_instrument_id' => [
496 'name' => 'payment_instrument_id',
497 'type' => CRM_Utils_Type
::T_INT
,
498 'title' => ts('Payment Method'),
499 'description' => ts('Payment Instrument ID'),
500 'where' => 'civicrm_payment_processor.payment_instrument_id',
502 'table_name' => 'civicrm_payment_processor',
503 'entity' => 'PaymentProcessor',
504 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
506 'pseudoconstant' => [
507 'optionGroupName' => 'payment_instrument',
508 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
511 'accepted_credit_cards' => [
512 'name' => 'accepted_credit_cards',
513 'type' => CRM_Utils_Type
::T_TEXT
,
514 'title' => ts('Accepted Credit Cards'),
515 'description' => ts('array of accepted credit card types'),
516 'where' => 'civicrm_payment_processor.accepted_credit_cards',
518 'table_name' => 'civicrm_payment_processor',
519 'entity' => 'PaymentProcessor',
520 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
522 'serialize' => self
::SERIALIZE_JSON
,
525 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
527 return Civi
::$statics[__CLASS__
]['fields'];
531 * Return a mapping from field-name to the corresponding key (as used in fields()).
534 * Array(string $name => string $uniqueName).
536 public static function &fieldKeys() {
537 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
538 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
540 return Civi
::$statics[__CLASS__
]['fieldKeys'];
544 * Returns the names of this table
548 public static function getTableName() {
549 return CRM_Core_DAO
::getLocaleTableName(self
::$_tableName);
553 * Returns if this table needs to be logged
557 public function getLog() {
562 * Returns the list of fields that can be imported
564 * @param bool $prefix
568 public static function &import($prefix = FALSE) {
569 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
574 * Returns the list of fields that can be exported
576 * @param bool $prefix
580 public static function &export($prefix = FALSE) {
581 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
586 * Returns the list of indices
588 * @param bool $localize
592 public static function indices($localize = TRUE) {
594 'UI_name_test_domain_id' => [
595 'name' => 'UI_name_test_domain_id',
601 'localizable' => FALSE,
603 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
606 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;