3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2017 |
7 +--------------------------------------------------------------------+
8 | This file is a part of CiviCRM. |
10 | CiviCRM is free software; you can copy, modify, and distribute it |
11 | under the terms of the GNU Affero General Public License |
12 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
14 | CiviCRM is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. |
19 | You should have received a copy of the GNU Affero General Public |
20 | License and the CiviCRM Licensing Exception along |
21 | with this program; if not, contact CiviCRM LLC |
22 | at info[AT]civicrm[DOT]org. If you have questions about the |
23 | GNU Affero General Public License or the licensing of CiviCRM, |
24 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
25 +--------------------------------------------------------------------+
29 * @copyright CiviCRM LLC (c) 2004-2017
31 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:0e75917439817823f9c6d99cd640ff98)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
38 * CRM_Financial_DAO_PaymentProcessor constructor.
40 class CRM_Financial_DAO_PaymentProcessor
extends CRM_Core_DAO
{
42 * Static instance to hold the table name.
46 static $_tableName = 'civicrm_payment_processor';
48 * Should CiviCRM log any modifications to this table in the civicrm_log table.
54 * Payment Processor ID
60 * Which Domain is this match entry for
66 * Payment Processor Name.
72 * Payment Processor Description.
81 public $payment_processor_type_id;
83 * Is this processor active?
89 * Is this processor the default?
95 * Is this processor for a test site?
146 * Billing Mode (deprecated)
150 public $billing_mode;
152 * Can process recurring contributions
158 * Payment Type: Credit or Debit (deprecated)
162 public $payment_type;
164 * Payment Instrument ID
168 public $payment_instrument_id;
170 * array of accepted credit card types
174 public $accepted_credit_cards;
178 function __construct() {
179 $this->__table
= 'civicrm_payment_processor';
180 parent
::__construct();
183 * Returns foreign keys and entity references.
186 * [CRM_Core_Reference_Interface]
188 static function getReferenceColumns() {
189 if (!isset(Civi
::$statics[__CLASS__
]['links'])) {
190 Civi
::$statics[__CLASS__
]['links'] = static ::createReferenceColumns(__CLASS__
);
191 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
192 Civi
::$statics[__CLASS__
]['links'][] = new CRM_Core_Reference_Basic(self
::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
193 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'links_callback', Civi
::$statics[__CLASS__
]['links']);
195 return Civi
::$statics[__CLASS__
]['links'];
198 * Returns all the column names of this table
202 static function &fields() {
203 if (!isset(Civi
::$statics[__CLASS__
]['fields'])) {
204 Civi
::$statics[__CLASS__
]['fields'] = array(
207 'type' => CRM_Utils_Type
::T_INT
,
208 'title' => ts('Payment Processor ID') ,
209 'description' => 'Payment Processor ID',
211 'table_name' => 'civicrm_payment_processor',
212 'entity' => 'PaymentProcessor',
213 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
216 'domain_id' => array(
217 'name' => 'domain_id',
218 'type' => CRM_Utils_Type
::T_INT
,
219 'title' => ts('Payment Processor Domain') ,
220 'description' => 'Which Domain is this match entry for',
222 'table_name' => 'civicrm_payment_processor',
223 'entity' => 'PaymentProcessor',
224 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
226 'FKClassName' => 'CRM_Core_DAO_Domain',
227 'pseudoconstant' => array(
228 'table' => 'civicrm_domain',
230 'labelColumn' => 'name',
235 'type' => CRM_Utils_Type
::T_STRING
,
236 'title' => ts('Payment Processor') ,
237 'description' => 'Payment Processor Name.',
239 'size' => CRM_Utils_Type
::BIG
,
240 'table_name' => 'civicrm_payment_processor',
241 'entity' => 'PaymentProcessor',
242 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
248 'description' => array(
249 'name' => 'description',
250 'type' => CRM_Utils_Type
::T_STRING
,
251 'title' => ts('Processor Description') ,
252 'description' => 'Payment Processor Description.',
254 'size' => CRM_Utils_Type
::HUGE
,
255 'table_name' => 'civicrm_payment_processor',
256 'entity' => 'PaymentProcessor',
257 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
260 'payment_processor_type_id' => array(
261 'name' => 'payment_processor_type_id',
262 'type' => CRM_Utils_Type
::T_INT
,
263 'title' => ts('Payment Processor Type ID') ,
264 'table_name' => 'civicrm_payment_processor',
265 'entity' => 'PaymentProcessor',
266 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
268 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
269 'pseudoconstant' => array(
270 'table' => 'civicrm_payment_processor_type',
272 'labelColumn' => 'title',
275 'is_active' => array(
276 'name' => 'is_active',
277 'type' => CRM_Utils_Type
::T_BOOLEAN
,
278 'title' => ts('Processor is Active?') ,
279 'description' => 'Is this processor active?',
280 'table_name' => 'civicrm_payment_processor',
281 'entity' => 'PaymentProcessor',
282 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
285 'is_default' => array(
286 'name' => 'is_default',
287 'type' => CRM_Utils_Type
::T_BOOLEAN
,
288 'title' => ts('Processor Is Default?') ,
289 'description' => 'Is this processor the default?',
290 'table_name' => 'civicrm_payment_processor',
291 'entity' => 'PaymentProcessor',
292 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
297 'type' => CRM_Utils_Type
::T_BOOLEAN
,
298 'title' => ts('Is Test Processor?') ,
299 'description' => 'Is this processor for a test site?',
300 'table_name' => 'civicrm_payment_processor',
301 'entity' => 'PaymentProcessor',
302 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
305 'user_name' => array(
306 'name' => 'user_name',
307 'type' => CRM_Utils_Type
::T_STRING
,
308 'title' => ts('User Name') ,
310 'size' => CRM_Utils_Type
::HUGE
,
311 'table_name' => 'civicrm_payment_processor',
312 'entity' => 'PaymentProcessor',
313 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
320 'name' => 'password',
321 'type' => CRM_Utils_Type
::T_STRING
,
322 'title' => ts('Password') ,
324 'size' => CRM_Utils_Type
::HUGE
,
325 'table_name' => 'civicrm_payment_processor',
326 'entity' => 'PaymentProcessor',
327 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
333 'signature' => array(
334 'name' => 'signature',
335 'type' => CRM_Utils_Type
::T_TEXT
,
336 'title' => ts('Signature') ,
339 'table_name' => 'civicrm_payment_processor',
340 'entity' => 'PaymentProcessor',
341 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
344 'type' => 'TextArea',
348 'name' => 'url_site',
349 'type' => CRM_Utils_Type
::T_STRING
,
350 'title' => ts('Site URL') ,
352 'size' => CRM_Utils_Type
::HUGE
,
353 'table_name' => 'civicrm_payment_processor',
354 'entity' => 'PaymentProcessor',
355 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
363 'type' => CRM_Utils_Type
::T_STRING
,
364 'title' => ts('API URL') ,
366 'size' => CRM_Utils_Type
::HUGE
,
367 'table_name' => 'civicrm_payment_processor',
368 'entity' => 'PaymentProcessor',
369 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
375 'url_recur' => array(
376 'name' => 'url_recur',
377 'type' => CRM_Utils_Type
::T_STRING
,
378 'title' => ts('Recurring Payments URL') ,
380 'size' => CRM_Utils_Type
::HUGE
,
381 'table_name' => 'civicrm_payment_processor',
382 'entity' => 'PaymentProcessor',
383 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
389 'url_button' => array(
390 'name' => 'url_button',
391 'type' => CRM_Utils_Type
::T_STRING
,
392 'title' => ts('Button URL') ,
394 'size' => CRM_Utils_Type
::HUGE
,
395 'table_name' => 'civicrm_payment_processor',
396 'entity' => 'PaymentProcessor',
397 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
405 'type' => CRM_Utils_Type
::T_STRING
,
406 'title' => ts('Subject') ,
408 'size' => CRM_Utils_Type
::HUGE
,
409 'table_name' => 'civicrm_payment_processor',
410 'entity' => 'PaymentProcessor',
411 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
417 'class_name' => array(
418 'name' => 'class_name',
419 'type' => CRM_Utils_Type
::T_STRING
,
420 'title' => ts('Suffix for PHP class name implementation') ,
422 'size' => CRM_Utils_Type
::HUGE
,
423 'table_name' => 'civicrm_payment_processor',
424 'entity' => 'PaymentProcessor',
425 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
428 'billing_mode' => array(
429 'name' => 'billing_mode',
430 'type' => CRM_Utils_Type
::T_INT
,
431 'title' => ts('Processor Billing Mode') ,
432 'description' => 'Billing Mode (deprecated)',
434 'table_name' => 'civicrm_payment_processor',
435 'entity' => 'PaymentProcessor',
436 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
440 'name' => 'is_recur',
441 'type' => CRM_Utils_Type
::T_BOOLEAN
,
442 'title' => ts('Processor Supports Recurring?') ,
443 'description' => 'Can process recurring contributions',
444 'table_name' => 'civicrm_payment_processor',
445 'entity' => 'PaymentProcessor',
446 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
449 'payment_type' => array(
450 'name' => 'payment_type',
451 'type' => CRM_Utils_Type
::T_INT
,
452 'title' => ts('Payment Type') ,
453 'description' => 'Payment Type: Credit or Debit (deprecated)',
455 'table_name' => 'civicrm_payment_processor',
456 'entity' => 'PaymentProcessor',
457 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
460 'payment_instrument_id' => array(
461 'name' => 'payment_instrument_id',
462 'type' => CRM_Utils_Type
::T_INT
,
463 'title' => ts('Payment Method') ,
464 'description' => 'Payment Instrument ID',
466 'table_name' => 'civicrm_payment_processor',
467 'entity' => 'PaymentProcessor',
468 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
470 'pseudoconstant' => array(
471 'optionGroupName' => 'payment_instrument',
472 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
475 'accepted_credit_cards' => array(
476 'name' => 'accepted_credit_cards',
477 'type' => CRM_Utils_Type
::T_TEXT
,
478 'title' => ts('Accepted Credit Cards') ,
479 'description' => 'array of accepted credit card types',
481 'table_name' => 'civicrm_payment_processor',
482 'entity' => 'PaymentProcessor',
483 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
487 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
489 return Civi
::$statics[__CLASS__
]['fields'];
492 * Return a mapping from field-name to the corresponding key (as used in fields()).
495 * Array(string $name => string $uniqueName).
497 static function &fieldKeys() {
498 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
499 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
501 return Civi
::$statics[__CLASS__
]['fieldKeys'];
504 * Returns the names of this table
508 static function getTableName() {
509 return self
::$_tableName;
512 * Returns if this table needs to be logged
520 * Returns the list of fields that can be imported
522 * @param bool $prefix
526 static function &import($prefix = false) {
527 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, array());
531 * Returns the list of fields that can be exported
533 * @param bool $prefix
537 static function &export($prefix = false) {
538 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, array());
542 * Returns the list of indices
544 public static function indices($localize = TRUE) {
546 'UI_name_test_domain_id' => array(
547 'name' => 'UI_name_test_domain_id',
553 'localizable' => false,
555 'sig' => 'civicrm_payment_processor::1::name::is_test::domain_id',
558 return ($localize && !empty($indices)) ? CRM_Core_DAO_AllCoreTables
::multilingualize(__CLASS__
, $indices) : $indices;