3 +--------------------------------------------------------------------+
4 | CiviCRM version 4.7 |
5 +--------------------------------------------------------------------+
6 | Copyright CiviCRM LLC (c) 2004-2016 |
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-2016
31 * Generated from xml/schema/CRM/Financial/PaymentProcessor.xml
32 * DO NOT EDIT. Generated by CRM_Core_CodeGen
33 * (GenCodeChecksum:a4b8d42c9958ae7f2ebf42fe036c3f3e)
35 require_once 'CRM/Core/DAO.php';
36 require_once 'CRM/Utils/Type.php';
37 class CRM_Financial_DAO_PaymentProcessor
extends CRM_Core_DAO
{
39 * static instance to hold the table name
43 static $_tableName = 'civicrm_payment_processor';
45 * static instance to hold the field values
49 static $_fields = null;
51 * static instance to hold the keys used in $_fields for each field.
55 static $_fieldKeys = null;
57 * static instance to hold the FK relationships
61 static $_links = null;
63 * static instance to hold the values that can
68 static $_import = null;
70 * static instance to hold the values that can
75 static $_export = null;
77 * static value to see if we should log any modifications to
78 * this table in the civicrm_log table
84 * Payment Processor ID
90 * Which Domain is this match entry for
96 * Payment Processor Name.
102 * Payment Processor Description.
111 public $payment_processor_type_id;
113 * Is this processor active?
119 * Is this processor the default?
125 * Is this processor for a test site?
176 * Billing Mode (deprecated)
180 public $billing_mode;
182 * Can process recurring contributions
188 * Payment Type: Credit or Debit (deprecated)
192 public $payment_type;
194 * Payment Instrument ID
198 public $payment_instrument_id;
202 * @return civicrm_payment_processor
204 function __construct() {
205 $this->__table
= 'civicrm_payment_processor';
206 parent
::__construct();
209 * Returns foreign keys and entity references
212 * [CRM_Core_Reference_Interface]
214 static function getReferenceColumns() {
215 if (!self
::$_links) {
216 self
::$_links = static ::createReferenceColumns(__CLASS__
);
217 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'domain_id', 'civicrm_domain', 'id');
218 self
::$_links[] = new CRM_Core_Reference_Basic(self
::getTableName() , 'payment_processor_type_id', 'civicrm_payment_processor_type', 'id');
220 return self
::$_links;
223 * Returns all the column names of this table
227 static function &fields() {
228 if (!(self
::$_fields)) {
229 self
::$_fields = array(
232 'type' => CRM_Utils_Type
::T_INT
,
233 'title' => ts('Payment Processor ID') ,
234 'description' => 'Payment Processor ID',
237 'domain_id' => array(
238 'name' => 'domain_id',
239 'type' => CRM_Utils_Type
::T_INT
,
240 'title' => ts('Payment Processor Domain') ,
241 'description' => 'Which Domain is this match entry for',
243 'FKClassName' => 'CRM_Core_DAO_Domain',
244 'pseudoconstant' => array(
245 'table' => 'civicrm_domain',
247 'labelColumn' => 'name',
252 'type' => CRM_Utils_Type
::T_STRING
,
253 'title' => ts('Payment Processor') ,
254 'description' => 'Payment Processor Name.',
256 'size' => CRM_Utils_Type
::BIG
,
258 'description' => array(
259 'name' => 'description',
260 'type' => CRM_Utils_Type
::T_STRING
,
261 'title' => ts('Processor Description') ,
262 'description' => 'Payment Processor Description.',
264 'size' => CRM_Utils_Type
::HUGE
,
266 'payment_processor_type_id' => array(
267 'name' => 'payment_processor_type_id',
268 'type' => CRM_Utils_Type
::T_INT
,
269 'title' => ts('Payment Processor Type ID') ,
270 'FKClassName' => 'CRM_Financial_DAO_PaymentProcessorType',
271 'pseudoconstant' => array(
272 'table' => 'civicrm_payment_processor_type',
274 'labelColumn' => 'title',
277 'is_active' => array(
278 'name' => 'is_active',
279 'type' => CRM_Utils_Type
::T_BOOLEAN
,
280 'title' => ts('Processor is Active?') ,
281 'description' => 'Is this processor active?',
283 'is_default' => array(
284 'name' => 'is_default',
285 'type' => CRM_Utils_Type
::T_BOOLEAN
,
286 'title' => ts('Processor Is Default?') ,
287 'description' => 'Is this processor the default?',
291 'type' => CRM_Utils_Type
::T_BOOLEAN
,
292 'title' => ts('Is Test Processor?') ,
293 'description' => 'Is this processor for a test site?',
295 'user_name' => array(
296 'name' => 'user_name',
297 'type' => CRM_Utils_Type
::T_STRING
,
298 'title' => ts('User Name') ,
300 'size' => CRM_Utils_Type
::HUGE
,
303 'name' => 'password',
304 'type' => CRM_Utils_Type
::T_STRING
,
305 'title' => ts('Password') ,
307 'size' => CRM_Utils_Type
::HUGE
,
309 'signature' => array(
310 'name' => 'signature',
311 'type' => CRM_Utils_Type
::T_TEXT
,
312 'title' => ts('Signature') ,
315 'name' => 'url_site',
316 'type' => CRM_Utils_Type
::T_STRING
,
317 'title' => ts('Site URL') ,
319 'size' => CRM_Utils_Type
::HUGE
,
323 'type' => CRM_Utils_Type
::T_STRING
,
324 'title' => ts('API URL') ,
326 'size' => CRM_Utils_Type
::HUGE
,
328 'url_recur' => array(
329 'name' => 'url_recur',
330 'type' => CRM_Utils_Type
::T_STRING
,
331 'title' => ts('Recurring Payments URL') ,
333 'size' => CRM_Utils_Type
::HUGE
,
335 'url_button' => array(
336 'name' => 'url_button',
337 'type' => CRM_Utils_Type
::T_STRING
,
338 'title' => ts('Button URL') ,
340 'size' => CRM_Utils_Type
::HUGE
,
344 'type' => CRM_Utils_Type
::T_STRING
,
345 'title' => ts('Subject') ,
347 'size' => CRM_Utils_Type
::HUGE
,
349 'class_name' => array(
350 'name' => 'class_name',
351 'type' => CRM_Utils_Type
::T_STRING
,
352 'title' => ts('Suffix for PHP class name implementation') ,
354 'size' => CRM_Utils_Type
::HUGE
,
356 'billing_mode' => array(
357 'name' => 'billing_mode',
358 'type' => CRM_Utils_Type
::T_INT
,
359 'title' => ts('Processor Billing Mode') ,
360 'description' => 'Billing Mode (deprecated)',
364 'name' => 'is_recur',
365 'type' => CRM_Utils_Type
::T_BOOLEAN
,
366 'title' => ts('Processor Supports Recurring?') ,
367 'description' => 'Can process recurring contributions',
369 'payment_type' => array(
370 'name' => 'payment_type',
371 'type' => CRM_Utils_Type
::T_INT
,
372 'title' => ts('Payment Type') ,
373 'description' => 'Payment Type: Credit or Debit (deprecated)',
376 'payment_instrument_id' => array(
377 'name' => 'payment_instrument_id',
378 'type' => CRM_Utils_Type
::T_INT
,
379 'title' => ts('Payment Method') ,
380 'description' => 'Payment Instrument ID',
382 'pseudoconstant' => array(
383 'optionGroupName' => 'payment_instrument',
384 'optionEditPath' => 'civicrm/admin/options/payment_instrument',
389 return self
::$_fields;
392 * Returns an array containing, for each field, the arary key used for that
393 * field in self::$_fields.
397 static function &fieldKeys() {
398 if (!(self
::$_fieldKeys)) {
399 self
::$_fieldKeys = array(
401 'domain_id' => 'domain_id',
403 'description' => 'description',
404 'payment_processor_type_id' => 'payment_processor_type_id',
405 'is_active' => 'is_active',
406 'is_default' => 'is_default',
407 'is_test' => 'is_test',
408 'user_name' => 'user_name',
409 'password' => 'password',
410 'signature' => 'signature',
411 'url_site' => 'url_site',
412 'url_api' => 'url_api',
413 'url_recur' => 'url_recur',
414 'url_button' => 'url_button',
415 'subject' => 'subject',
416 'class_name' => 'class_name',
417 'billing_mode' => 'billing_mode',
418 'is_recur' => 'is_recur',
419 'payment_type' => 'payment_type',
420 'payment_instrument_id' => 'payment_instrument_id',
423 return self
::$_fieldKeys;
426 * Returns the names of this table
430 static function getTableName() {
431 return self
::$_tableName;
434 * Returns if this table needs to be logged
442 * Returns the list of fields that can be imported
444 * @param bool $prefix
448 static function &import($prefix = false) {
449 if (!(self
::$_import)) {
450 self
::$_import = array();
451 $fields = self
::fields();
452 foreach($fields as $name => $field) {
453 if (CRM_Utils_Array
::value('import', $field)) {
455 self
::$_import['payment_processor'] = & $fields[$name];
457 self
::$_import[$name] = & $fields[$name];
462 return self
::$_import;
465 * Returns the list of fields that can be exported
467 * @param bool $prefix
471 static function &export($prefix = false) {
472 if (!(self
::$_export)) {
473 self
::$_export = array();
474 $fields = self
::fields();
475 foreach($fields as $name => $field) {
476 if (CRM_Utils_Array
::value('export', $field)) {
478 self
::$_export['payment_processor'] = & $fields[$name];
480 self
::$_export[$name] = & $fields[$name];
485 return self
::$_export;