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:d638c879011835041875c04db5831748)
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',
215 'domain_id' => array(
216 'name' => 'domain_id',
217 'type' => CRM_Utils_Type
::T_INT
,
218 'title' => ts('Payment Processor Domain') ,
219 'description' => 'Which Domain is this match entry for',
221 'table_name' => 'civicrm_payment_processor',
222 'entity' => 'PaymentProcessor',
223 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
224 'FKClassName' => 'CRM_Core_DAO_Domain',
225 'pseudoconstant' => array(
226 'table' => 'civicrm_domain',
228 'labelColumn' => 'name',
233 'type' => CRM_Utils_Type
::T_STRING
,
234 'title' => ts('Payment Processor') ,
235 'description' => 'Payment Processor Name.',
237 'size' => CRM_Utils_Type
::BIG
,
238 'table_name' => 'civicrm_payment_processor',
239 'entity' => 'PaymentProcessor',
240 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
245 'description' => array(
246 'name' => 'description',
247 'type' => CRM_Utils_Type
::T_STRING
,
248 'title' => ts('Processor Description') ,
249 'description' => 'Payment Processor Description.',
251 'size' => CRM_Utils_Type
::HUGE
,
252 'table_name' => 'civicrm_payment_processor',
253 'entity' => 'PaymentProcessor',
254 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
256 'payment_processor_type_id' => array(
257 'name' => 'payment_processor_type_id',
258 'type' => CRM_Utils_Type
::T_INT
,
259 'title' => ts('Payment Processor Type ID') ,
260 'table_name' => 'civicrm_payment_processor',
261 'entity' => 'PaymentProcessor',
262 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
263 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
264 'pseudoconstant' => array(
265 'table' => 'civicrm_payment_processor_type',
267 'labelColumn' => 'title',
270 'is_active' => array(
271 'name' => 'is_active',
272 'type' => CRM_Utils_Type
::T_BOOLEAN
,
273 'title' => ts('Processor is Active?') ,
274 'description' => 'Is this processor active?',
275 'table_name' => 'civicrm_payment_processor',
276 'entity' => 'PaymentProcessor',
277 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
279 'is_default' => array(
280 'name' => 'is_default',
281 'type' => CRM_Utils_Type
::T_BOOLEAN
,
282 'title' => ts('Processor Is Default?') ,
283 'description' => 'Is this processor the default?',
284 'table_name' => 'civicrm_payment_processor',
285 'entity' => 'PaymentProcessor',
286 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
290 'type' => CRM_Utils_Type
::T_BOOLEAN
,
291 'title' => ts('Is Test Processor?') ,
292 'description' => 'Is this processor for a test site?',
293 'table_name' => 'civicrm_payment_processor',
294 'entity' => 'PaymentProcessor',
295 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
297 'user_name' => array(
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',
311 'name' => 'password',
312 'type' => CRM_Utils_Type
::T_STRING
,
313 'title' => ts('Password') ,
315 'size' => CRM_Utils_Type
::HUGE
,
316 'table_name' => 'civicrm_payment_processor',
317 'entity' => 'PaymentProcessor',
318 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
323 'signature' => array(
324 'name' => 'signature',
325 'type' => CRM_Utils_Type
::T_TEXT
,
326 'title' => ts('Signature') ,
329 'table_name' => 'civicrm_payment_processor',
330 'entity' => 'PaymentProcessor',
331 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
333 'type' => 'TextArea',
337 'name' => 'url_site',
338 'type' => CRM_Utils_Type
::T_STRING
,
339 'title' => ts('Site URL') ,
341 'size' => CRM_Utils_Type
::HUGE
,
342 'table_name' => 'civicrm_payment_processor',
343 'entity' => 'PaymentProcessor',
344 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
351 'type' => CRM_Utils_Type
::T_STRING
,
352 'title' => ts('API URL') ,
354 'size' => CRM_Utils_Type
::HUGE
,
355 'table_name' => 'civicrm_payment_processor',
356 'entity' => 'PaymentProcessor',
357 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
362 'url_recur' => array(
363 'name' => 'url_recur',
364 'type' => CRM_Utils_Type
::T_STRING
,
365 'title' => ts('Recurring Payments URL') ,
367 'size' => CRM_Utils_Type
::HUGE
,
368 'table_name' => 'civicrm_payment_processor',
369 'entity' => 'PaymentProcessor',
370 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
375 'url_button' => array(
376 'name' => 'url_button',
377 'type' => CRM_Utils_Type
::T_STRING
,
378 'title' => ts('Button URL') ,
380 'size' => CRM_Utils_Type
::HUGE
,
381 'table_name' => 'civicrm_payment_processor',
382 'entity' => 'PaymentProcessor',
383 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
390 'type' => CRM_Utils_Type
::T_STRING
,
391 'title' => ts('Subject') ,
393 'size' => CRM_Utils_Type
::HUGE
,
394 'table_name' => 'civicrm_payment_processor',
395 'entity' => 'PaymentProcessor',
396 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
401 'class_name' => array(
402 'name' => 'class_name',
403 'type' => CRM_Utils_Type
::T_STRING
,
404 'title' => ts('Suffix for PHP class name implementation') ,
406 'size' => CRM_Utils_Type
::HUGE
,
407 'table_name' => 'civicrm_payment_processor',
408 'entity' => 'PaymentProcessor',
409 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
411 'billing_mode' => array(
412 'name' => 'billing_mode',
413 'type' => CRM_Utils_Type
::T_INT
,
414 'title' => ts('Processor Billing Mode') ,
415 'description' => 'Billing Mode (deprecated)',
417 'table_name' => 'civicrm_payment_processor',
418 'entity' => 'PaymentProcessor',
419 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
422 'name' => 'is_recur',
423 'type' => CRM_Utils_Type
::T_BOOLEAN
,
424 'title' => ts('Processor Supports Recurring?') ,
425 'description' => 'Can process recurring contributions',
426 'table_name' => 'civicrm_payment_processor',
427 'entity' => 'PaymentProcessor',
428 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
430 'payment_type' => array(
431 'name' => 'payment_type',
432 'type' => CRM_Utils_Type
::T_INT
,
433 'title' => ts('Payment Type') ,
434 'description' => 'Payment Type: Credit or Debit (deprecated)',
436 'table_name' => 'civicrm_payment_processor',
437 'entity' => 'PaymentProcessor',
438 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
440 'payment_instrument_id' => array(
441 'name' => 'payment_instrument_id',
442 'type' => CRM_Utils_Type
::T_INT
,
443 'title' => ts('Payment Method') ,
444 'description' => 'Payment Instrument ID',
446 'table_name' => 'civicrm_payment_processor',
447 'entity' => 'PaymentProcessor',
448 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
449 'pseudoconstant' => array(
450 'optionGroupName' => 'payment_instrument',
451 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
454 'accepted_credit_cards' => array(
455 'name' => 'accepted_credit_cards',
456 'type' => CRM_Utils_Type
::T_TEXT
,
457 'title' => ts('Accepted Credit Cards') ,
458 'description' => 'array of accepted credit card types',
460 'table_name' => 'civicrm_payment_processor',
461 'entity' => 'PaymentProcessor',
462 'bao' => 'CRM_Financial_BAO_PaymentProcessor',
465 CRM_Core_DAO_AllCoreTables
::invoke(__CLASS__
, 'fields_callback', Civi
::$statics[__CLASS__
]['fields']);
467 return Civi
::$statics[__CLASS__
]['fields'];
470 * Return a mapping from field-name to the corresponding key (as used in fields()).
473 * Array(string $name => string $uniqueName).
475 static function &fieldKeys() {
476 if (!isset(Civi
::$statics[__CLASS__
]['fieldKeys'])) {
477 Civi
::$statics[__CLASS__
]['fieldKeys'] = array_flip(CRM_Utils_Array
::collect('name', self
::fields()));
479 return Civi
::$statics[__CLASS__
]['fieldKeys'];
482 * Returns the names of this table
486 static function getTableName() {
487 return self
::$_tableName;
490 * Returns if this table needs to be logged
498 * Returns the list of fields that can be imported
500 * @param bool $prefix
504 static function &import($prefix = false) {
505 $r = CRM_Core_DAO_AllCoreTables
::getImports(__CLASS__
, 'payment_processor', $prefix, array());
509 * Returns the list of fields that can be exported
511 * @param bool $prefix
515 static function &export($prefix = false) {
516 $r = CRM_Core_DAO_AllCoreTables
::getExports(__CLASS__
, 'payment_processor', $prefix, array());