5 * @copyright CiviCRM LLC (c) 2004-2017
7 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
8 * DO NOT EDIT. Generated by CRM_Core_CodeGen
9 * (GenCodeChecksum:5a228384ec4b687a6961505b12d40512)
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 static $_tableName = 'civicrm_payment_processor';
25 * Should CiviCRM log any modifications to this table in the civicrm_log table.
32 * Payment Processor ID
39 * Which Domain is this match entry for
46 * Payment Processor Name.
53 * Payment Processor Description.
62 public $payment_processor_type_id;
65 * Is this processor active?
72 * Is this processor the default?
79 * Is this processor for a test site?
131 * Billing Mode (deprecated)
135 public $billing_mode;
138 * Can process recurring contributions
145 * Payment Type: Credit or Debit (deprecated)
149 public $payment_type;
152 * Payment Instrument ID
156 public $payment_instrument_id;
159 * array of accepted credit card types
163 public $accepted_credit_cards;
168 public function __construct() {
169 $this->__table
= 'civicrm_payment_processor';
170 parent
::__construct();
174 * Returns foreign keys and entity references.
177 * [CRM_Core_Reference_Interface]
179 public static function getReferenceColumns() {
180 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
181 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
182 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'domain_id', 'civicrm_domain', 'id');
183 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName(), 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
184 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
186 return Civi
::$statics[__CLASS__
]['links'];
190 * Returns all the column names of this table
194 public static function &fields() {
195 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
196 Civi
::$statics[__CLASS__
]['fields'] = [
199 'type' => CRM_Utils_Type
::T_INT
,
200 'title' => ts('Payment Processor ID'),
201 'description' => 'Payment Processor ID',
203 'table_name' => 'civicrm_payment_processor',
204 'entity' => 'PaymentProcessor',
205 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
209 'name' => 'domain_id',
210 'type' => CRM_Utils_Type
::T_INT
,
211 'title' => ts('Payment Processor Domain'),
212 'description' => 'Which Domain is this match entry for',
214 'table_name' => 'civicrm_payment_processor',
215 'entity' => 'PaymentProcessor',
216 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
218 'FKClassName' => 'CRM_Core_DAO_Domain',
219 'pseudoconstant' => [
220 'table' => 'civicrm_domain',
222 'labelColumn' => 'name',
227 'type' => CRM_Utils_Type
::T_STRING
,
228 'title' => ts('Payment Processor'),
229 'description' => 'Payment Processor Name.',
231 'size' => CRM_Utils_Type
::BIG
,
232 'table_name' => 'civicrm_payment_processor',
233 'entity' => 'PaymentProcessor',
234 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
241 'name' => 'description',
242 'type' => CRM_Utils_Type
::T_STRING
,
243 'title' => ts('Processor Description'),
244 'description' => 'Payment Processor Description.',
246 'size' => CRM_Utils_Type
::HUGE
,
247 'table_name' => 'civicrm_payment_processor',
248 'entity' => 'PaymentProcessor',
249 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
252 'payment_processor_type_id' => [
253 'name' => 'payment_processor_type_id',
254 'type' => CRM_Utils_Type
::T_INT
,
255 'title' => ts('Payment Processor Type ID'),
256 'table_name' => 'civicrm_payment_processor',
257 'entity' => 'PaymentProcessor',
258 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
260 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
261 'pseudoconstant' => [
262 'table' => 'civicrm_payment_processor_type',
264 'labelColumn' => 'title',
268 'name' => 'is_active',
269 'type' => CRM_Utils_Type
::T_BOOLEAN
,
270 'title' => ts('Processor is Active?'),
271 'description' => 'Is this processor active?',
272 'table_name' => 'civicrm_payment_processor',
273 'entity' => 'PaymentProcessor',
274 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
278 'name' => 'is_default',
279 'type' => CRM_Utils_Type
::T_BOOLEAN
,
280 'title' => ts('Processor Is Default?'),
281 'description' => 'Is this processor the default?',
282 'table_name' => 'civicrm_payment_processor',
283 'entity' => 'PaymentProcessor',
284 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
289 'type' => CRM_Utils_Type
::T_BOOLEAN
,
290 'title' => ts('Is Test Processor?'),
291 'description' => 'Is this processor for a test site?',
292 'table_name' => 'civicrm_payment_processor',
293 'entity' => 'PaymentProcessor',
294 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
298 'name' => 'user_name',
299 'type' => CRM_Utils_Type
::T_STRING
,
300 'title' => ts('User Name'),
302 'size' => CRM_Utils_Type
::HUGE
,
303 'table_name' => 'civicrm_payment_processor',
304 'entity' => 'PaymentProcessor',
305 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
312 'name' => 'password',
313 'type' => CRM_Utils_Type
::T_STRING
,
314 'title' => ts('Password'),
316 'size' => CRM_Utils_Type
::HUGE
,
317 'table_name' => 'civicrm_payment_processor',
318 'entity' => 'PaymentProcessor',
319 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
322 'type' => 'Password',
326 'name' => 'signature',
327 'type' => CRM_Utils_Type
::T_TEXT
,
328 'title' => ts('Signature'),
331 'table_name' => 'civicrm_payment_processor',
332 'entity' => 'PaymentProcessor',
333 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
336 'type' => 'TextArea',
340 'name' => 'url_site',
341 'type' => CRM_Utils_Type
::T_STRING
,
342 'title' => ts('Site URL'),
344 'size' => CRM_Utils_Type
::HUGE
,
345 'table_name' => 'civicrm_payment_processor',
346 'entity' => 'PaymentProcessor',
347 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
355 'type' => CRM_Utils_Type
::T_STRING
,
356 'title' => ts('API URL'),
358 'size' => CRM_Utils_Type
::HUGE
,
359 'table_name' => 'civicrm_payment_processor',
360 'entity' => 'PaymentProcessor',
361 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
368 'name' => 'url_recur',
369 'type' => CRM_Utils_Type
::T_STRING
,
370 'title' => ts('Recurring Payments URL'),
372 'size' => CRM_Utils_Type
::HUGE
,
373 'table_name' => 'civicrm_payment_processor',
374 'entity' => 'PaymentProcessor',
375 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
382 'name' => 'url_button',
383 'type' => CRM_Utils_Type
::T_STRING
,
384 'title' => ts('Button URL'),
386 'size' => CRM_Utils_Type
::HUGE
,
387 'table_name' => 'civicrm_payment_processor',
388 'entity' => 'PaymentProcessor',
389 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
397 'type' => CRM_Utils_Type
::T_STRING
,
398 'title' => ts('Subject'),
400 'size' => CRM_Utils_Type
::HUGE
,
401 'table_name' => 'civicrm_payment_processor',
402 'entity' => 'PaymentProcessor',
403 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
410 'name' => 'class_name',
411 'type' => CRM_Utils_Type
::T_STRING
,
412 'title' => ts('Suffix for PHP class name implementation'),
414 'size' => CRM_Utils_Type
::HUGE
,
415 'table_name' => 'civicrm_payment_processor',
416 'entity' => 'PaymentProcessor',
417 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
421 'name' => 'billing_mode',
422 'type' => CRM_Utils_Type
::T_INT
,
423 'title' => ts('Processor Billing Mode'),
424 'description' => 'Billing Mode (deprecated)',
426 'table_name' => 'civicrm_payment_processor',
427 'entity' => 'PaymentProcessor',
428 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
432 'name' => 'is_recur',
433 'type' => CRM_Utils_Type
::T_BOOLEAN
,
434 'title' => ts('Processor Supports Recurring?'),
435 'description' => 'Can process recurring contributions',
436 'table_name' => 'civicrm_payment_processor',
437 'entity' => 'PaymentProcessor',
438 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
442 'name' => 'payment_type',
443 'type' => CRM_Utils_Type
::T_INT
,
444 'title' => ts('Payment Type'),
445 'description' => 'Payment Type: Credit or Debit (deprecated)',
447 'table_name' => 'civicrm_payment_processor',
448 'entity' => 'PaymentProcessor',
449 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
452 'payment_instrument_id' => [
453 'name' => 'payment_instrument_id',
454 'type' => CRM_Utils_Type
::T_INT
,
455 'title' => ts('Payment Method'),
456 'description' => 'Payment Instrument ID',
458 'table_name' => 'civicrm_payment_processor',
459 'entity' => 'PaymentProcessor',
460 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
462 'pseudoconstant' => [
463 'optionGroupName' => 'payment_instrument',
464 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
467 'accepted_credit_cards' => [
468 'name' => 'accepted_credit_cards',
469 'type' => CRM_Utils_Type
::T_TEXT
,
470 'title' => ts('Accepted Credit Cards'),
471 'description' => 'array of accepted credit card types',
473 'table_name' => 'civicrm_payment_processor',
474 'entity' => 'PaymentProcessor',
475 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
477 'serialize' => self
::SERIALIZE_JSON
,
480 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
482 return Civi
::$statics[__CLASS__
]['fields'];
486 * Return a mapping from field-name to the corresponding key (as used in fields()).
489 * Array(string $name => string $uniqueName).
491 public static function &fieldKeys() {
492 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
493 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
495 return Civi
::$statics[__CLASS__
]['fieldKeys'];
499 * Returns the names of this table
503 public static function getTableName() {
504 return self
::$_tableName;
508 * Returns if this table needs to be logged
512 public function getLog() {
517 * Returns the list of fields that can be imported
519 * @param bool $prefix
523 public static function &import($prefix = FALSE) {
524 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, []);
529 * Returns the list of fields that can be exported
531 * @param bool $prefix
535 public static function &export($prefix = FALSE) {
536 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, []);
541 * Returns the list of indices
543 * @param bool $localize
547 public static function indices($localize = TRUE) {
549 'UI_name_test_domain_id' => [
550 'name' => 'UI_name_test_domain_id',
556 'localizable' => FALSE,
558 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
561 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;