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

Class: Payment_Process_Common

Source Location: /Payment_Process-0.6.2/Process/Common.php

Class Overview




Variables

Methods


Child classes:

Payment_Process_Bibit
Payment_Process_Bibit
Payment_Process_TrustCommerce
Payment_Process_TrustCommerce
Payment_Process_AuthorizeNet
Payment_Process_AuthorizeNet
Payment_Process_Dummy
Payment_PAYMENT_PROCESS_Dummy
Payment_Process_LinkPoint
Payment_Process_LinkPoint
Payment_Process_Transfirst
Payment_Process_Transfirst

Inherited Variables

Inherited Methods


Class Details

[line 29]


[ Top ]


Class Variables

$action =  ''

[line 117]

Processing action.

This should be set to one of the PAYMENT_PROCESS_ACTION_* constants.


Type:   int


[ Top ]

$amount =  0

[line 131]

The transaction amount.

Type:   double


[ Top ]

$customerId =  ''

[line 145]

Customer identifier
  • Var: string or int

Type:   mixed


[ Top ]

$description =  ''

[line 124]

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 138]

An invoice number.
  • Var: string or int

Type:   mixed


[ Top ]

$login =  ''

[line 101]

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

Type:   string


[ Top ]

$password =  ''

[line 108]

Your password to use for authentication to the online processor.

Type:   string


[ Top ]

$transactionSource =

[line 154]

Transaction source.

This should be set to one of the PAYMENT_PROCESS_SOURCE_* constants.


Type:   int


[ Top ]

$_log =

[line 73]

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

Type:   object


[ Top ]

$_payment =  null

[line 93]

Reference to payment type

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

  • Var: Instance of Payment_Type
  • See: Payment_Process_Common::setPayment()
  • Access: protected

Type:   mixed


[ Top ]

$_typeFieldMap = array()

[line 81]

Mapping between API fields and processors'
  • Access: protected

Type:   mixed


[ Top ]



Method Detail

__construct (Constructor)   [line 165]

Payment_Process_Common __construct( [ $options = false])

__construct

PHP 5.x constructor


Overridden in child classes as:

Payment_Process_Bibit::__construct()
Constructor.
Payment_Process_TrustCommerce::__construct()
Constructor.
Payment_Process_AuthorizeNet::__construct()
Constructor.
Payment_Process_LinkPoint::__construct()
Constructor.
Payment_Process_Transfirst::__construct()
Constructor.

Parameters:

   $options   — 

[ Top ]

fieldExists   [line 355]

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 371]

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>
  • Access: public

[ Top ]

getOption   [line 405]

mixed getOption( string $option)

Get an option value.

Parameters:

string   $option   —  Option to get

[ Top ]

getResult   [line 430]

void getResult( )

Gets transaction result.

This function should be overloaded by the processor.


[ Top ]

isRequired   [line 342]

boolean isRequired( string $field)

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

Parameters:

string   $field   —  Field to check

[ Top ]

Payemnt_Process_Common   [line 179]

void Payemnt_Process_Common( [ $options = false])

Payment_Process_Common

PHP 4.x constructor


Parameters:

   $options   — 

[ Top ]

process   [line 260]

void process( )

Processes the transaction.

This function should be overloaded by the processor.


Overridden in child classes as:

Payment_Process_Bibit::process()
Process the transaction.
Payment_Process_TrustCommerce::process()
Process the transaction.
Payment_Process_AuthorizeNet::process()
Processes the transaction.
Payment_Process_Dummy::process()
Process the (dummy) transaction
Payment_Process_LinkPoint::process()
Process the transaction.
Payment_Process_Transfirst::process()
Process the transaction.

[ Top ]

processCallback   [line 276]

object Payment_Process_Result &processCallback( )

processCallback

This should be overridden in driver classes. It will be used to process communications from gateways to your application. For instance, the Authorize.net gateway will post information about pending transactions to a URL you specify. This function should handle such requests

  • Return: on success, PEAR_Error on failure

Overridden in child classes as:

Payment_Process_AuthorizeNet::processCallback()
Processes a callback from payment gateway

[ Top ]

set   [line 326]

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 245]

void setFrom( array $where)

Set many fields.

Parameters:

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

[ Top ]

setOption   [line 419]

void setOption( string $option, mixed $value)

Set an option value

Parameters:

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

[ Top ]

setOptions   [line 392]

void setOptions( [Array $options = false], [Array $defaultOptions = false])

Set class options.

Parameters:

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

[ Top ]

setPayment   [line 198]

bool setPayment( &$payment, mixed $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_Process_Type
   &$payment   — 

[ Top ]

validate   [line 291]

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.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:16:04 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.