Payment_Process2
[ class tree: Payment_Process2 ] [ index: Payment_Process2 ] [ all elements ]

Class: Payment_Process2_Common

Source Location: /Payment_Process2-0.3.1/Payment/Process2/Common.php

Class Overview


Base class for processor


Author(s):

Version:

  • Release: @package_version@

Copyright:

  • 1997-2005 The PHP Group

Variables

Methods


Child classes:

Payment_Process2_Bibit
Payment_Process2_Bibit
Payment_Process2_ANZ
Driver for the ANZ Bank's eGate Payment Web Service (Merchant-Hosted)
Payment_Process2_PayPal
This is a processor for PayPal's merchant Direct Payment gateway.
Payment_Process2_TrustCommerce
Payment_Process2_TrustCommerce
Payment_Process2_AuthorizeNet
Payment_Process2_AuthorizeNet
Payment_Process2_Dummy
Dummy processor
Payment_Process2_LinkPoint
Payment_Process2_LinkPoint
Payment_Process2_Transfirst
Payment_Process2_Transfirst

Inherited Variables

Inherited Methods


Class Details

[line 63]
Base class for processor


[ Top ]


Class Variables

$action =  ''

[line 152]

Processing action.

This should be set to one of the Payment_Process2::ACTION_* constants.


Type:   int


[ Top ]

$amount =  0

[line 166]

The transaction amount.

Type:   double


[ Top ]

$customerId =  ''

[line 180]

Customer identifier
  • Var: string or int

Type:   mixed


[ Top ]

$description =  ''

[line 159]

A description of the transaction (used by some processors to send information to the client, normally not a required field).

Type:   string


[ Top ]

$invoiceNumber =  ''

[line 173]

An invoice number.
  • Var: string or int

Type:   mixed


[ Top ]

$login =  ''

[line 136]

Your login name to use for authentication to the online processor.

Type:   string


[ Top ]

$password =  ''

[line 143]

Your password to use for authentication to the online processor.

Type:   string


[ Top ]

$transactionSource =

[line 191]

Transaction source.

This should be set to one of the Payment_Process2::SOURCE_* constants.


Type:   int


[ Top ]

$_log =

[line 108]

PEAR::Log instance
  • See: Log
  • Access: protected

Type:   object


[ Top ]

$_payment =  null

[line 128]

Reference to payment type

An internal reference to the Payment_Process2_Type that is currently being processed.


Type:   mixed


[ Top ]

$_typeFieldMap = array()

[line 116]

Mapping between API fields and processors'
  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 210]

Payment_Process2_Common __construct( [array $options = array()], [HTTP_Request2 $request = null])

__construct

PHP 5.x constructor


Overridden in child classes as:

Payment_Process2_Bibit::__construct()
Constructor.
Payment_Process2_ANZ::__construct()
Constructor.
Payment_Process2_PayPal::__construct()
Constructor.
Payment_Process2_TrustCommerce::__construct()
Constructor.
Payment_Process2_AuthorizeNet::__construct()
Constructor.
Payment_Process2_LinkPoint::__construct()
Constructor.
Payment_Process2_Transfirst::__construct()
Constructor.

Parameters:

array   $options   —  Options
HTTP_Request2   $request   — 

[ Top ]

fieldExists   [line 384]

boolean fieldExists( string $field)

Determines if a field exists.
  • Return: TRUE if field exists, FALSE otherwise
  • Author: Ian Eure <ieure@php.net>

Parameters:

string   $field   —  Field to check

[ Top ]

getFields   [line 401]

array getFields( )

Get a list of fields.

This function returns an array containing all the possible fields which may be set.

  • Return: Array of valid fields.
  • Author: Ian Eure <ieure@php.net>
  • Todo: Redo with reflection perhaps?
  • Access: public

[ Top ]

getOption   [line 441]

mixed getOption( string $option)

Get an option value.

Parameters:

string   $option   —  Option to get

[ Top ]

getPayment   [line 279]

Payment_Process2_Type getPayment( )

  • Access: public

[ Top ]

isRequired   [line 370]

boolean isRequired( string $field)

Determine if a field is required.
  • Return: true if required, false if optional.

Parameters:

string   $field   —  Field to check

[ Top ]

set   [line 353]

void set( string $field, string $value)

Set a value.

This will set a value, such as the credit card number. If the requested field is not part of the basic set of supported fields, it is set in $_options.


Parameters:

string   $field   —  The field to set
string   $value   —  The value to set

[ Top ]

setFrom   [line 293]

void setFrom( array $where)

Set many fields.

Parameters:

array   $where   —  Associative array of data to set, in the format 'field' => 'value',

[ Top ]

setOption   [line 457]

mixed setOption( string $option, mixed $value)

Set an option value

Parameters:

string   $option   —  Option name to set
mixed   $value   —  Value to set

[ Top ]

setOptions   [line 423]

void setOptions( [array $options = array()], [array $defaultOptions = array()])

Set class options.

Parameters:

array   $options   —  Options to set
array   $defaultOptions   —  Default options

[ Top ]

setPayment   [line 239]

bool setPayment( Payment_Process2_Type $payment)

Sets payment

Returns false if payment could not be set. This usually means the payment type is not valid or that the payment type is valid, but did not validate. It could also mean that the payment type is not supported by the given processor.


Parameters:

mixed   $payment   —  Object of Payment_Process2_Type

[ Top ]

setRequest   [line 217]

void setRequest( [HTTP_Request2 $request = null])


Parameters:

HTTP_Request2   $request   — 

[ Top ]

validate   [line 312]

boolean validate( )

validate

Validates data before processing. This function may be overloaded by the processor.

  • Return: true if validation succeeded, PEAR_Error if it failed.

Overridden in child classes as:

Payment_Process2_LinkPoint::validate()

[ Top ]


Documentation generated on Mon, 11 Mar 2019 15:40:37 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.