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

Class: Payment_Process_Common

Source Location: /Payment_Process-0.6.8/Process/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_Process_Bibit
Payment_Process_Bibit
Payment_Process_PayPal
This is a processor for PayPal's merchant Direct Payment gateway.
Payment_Process_TrustCommerce
Payment_Process_TrustCommerce
Payment_Process_Paycom
Base class for processor
Payment_Process_AuthorizeNet
Payment_Process_AuthorizeNet
Payment_Process_Dummy
Dummy processor
Payment_Process_LinkPoint
Payment_Process_LinkPoint
Payment_Process_Transfirst
Payment_Process_Transfirst

Inherited Variables

Inherited Methods


Class Details

[line 62]
Base class for processor


[ Top ]


Class Variables

$action =  ''

[line 151]

Processing action.

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


Type:   int


[ Top ]

$amount =  0

[line 165]

The transaction amount.

Type:   double


[ Top ]

$customerId =  ''

[line 179]

Customer identifier
  • Var: string or int

Type:   mixed


[ Top ]

$description =  ''

[line 158]

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

An invoice number.
  • Var: string or int

Type:   mixed


[ Top ]

$login =  ''

[line 135]

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

Type:   string


[ Top ]

$password =  ''

[line 142]

Your password to use for authentication to the online processor.

Type:   string


[ Top ]

$transactionSource =

[line 188]

Transaction source.

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


Type:   int


[ Top ]

$_log =

[line 107]

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

Type:   object


[ Top ]

$_payment =  null

[line 127]

Reference to payment type

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


Type:   mixed


[ Top ]

$_typeFieldMap = array()

[line 115]

Mapping between API fields and processors'
  • Access: protected

Type:   mixed


[ Top ]



Method Detail

Payment_Process_Common (Constructor)   [line 217]

Payment_Process_Common Payment_Process_Common( [array $options = false])

Payment_Process_Common

PHP 4.x constructor


Parameters:

array   $options   —  options

[ Top ]

__construct (Constructor)   [line 201]

Payment_Process_Common __construct( [array $options = false])

__construct

PHP 5.x constructor


Overridden in child classes as:

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

Parameters:

array   $options   —  Options

[ Top ]

fieldExists   [line 403]

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

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

mixed getOption( string $option)

Get an option value.

Parameters:

string   $option   —  Option to get

[ Top ]

getResult   [line 486]

mixed getResult( )

Gets transaction result.

This function should be overloaded by the processor.

  • Abstract:

[ Top ]

isRequired   [line 389]

boolean isRequired( string $field)

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

Parameters:

string   $field   —  Field to check

[ Top ]

process   [line 304]

mixed 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_PayPal::process()
Processes the transaction.
Payment_Process_TrustCommerce::process()
Process the transaction.
Payment_Process_Paycom::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 321]

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_PayPal::processCallback()
Processes a callback from payment gateway
Payment_Process_AuthorizeNet::processCallback()
Processes a callback from payment gateway

[ Top ]

set   [line 372]

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

void setFrom( array $where)

Set many fields.

Parameters:

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

[ Top ]

setOption   [line 472]

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

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

Set class options.

Parameters:

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

[ Top ]

setPayment   [line 237]

bool setPayment( 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

[ Top ]

validate   [line 336]

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 15:41:22 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.