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

Class: Payment_Process_Result

Source Location: /Payment_Process-0.5.8/Process.php

Class Overview


Payment_Process_Result


Author(s):

Version:

  • @version@

Variables

Methods


Child classes:

Payment_Process_Result_AuthorizeNet
Payment_Process_Result
Payment_Process_Result_Transfirst
Payment_Process_Result
Payment_Process_Result_TrustCommerce
Payment_Process_Result
Payment_Process_Result_Dummy
Payment_Process_Result

Inherited Variables

Inherited Methods


Class Details

[line 430]
Payment_Process_Result

The core result class that should be returned from each driver's process() function. This should be extended as Payment_Process_Result_DriverName and then have the appropriate fields mapped out accordingly.

Take special care to appropriately create a parse() function in your result class. You can then call _mapFields() with a resultArray (ie. exploded result) to map your results from parse() into the member variables.

Please note that this class keeps your original codes intact so they can be accessed directly and then uses the function wrappers to return uniform Payment_Process codes.



[ Top ]


Class Variables

$approvalCode =

[line 505]

Authorization/Approval code

Type:   string


[ Top ]

$avsCode =

[line 522]

Address verification code

The AVS code returned from your gateway. This should then be mapped to the appropriate PAYMENT_PROCESS_AVS_* code using $_avsCodeMap. This value should also be mapped to the appropriate textual message via the $_avsCodeMessages array.


Type:   string


[ Top ]

$code =

[line 467]

The approval/decline code

The value returned by your gateway as approved/declined should be mapped into this variable. Valid results should then be mapped into the appropriate PAYMENT_PROCESS_RESULT_* code using the $_statusCodeMap array. Values returned into $code should be mapped as keys in the map with PAYMENT_PROCESS_RESULT_* as the values.


Type:   mixed


[ Top ]

$customerId =

[line 560]

Customer ID

Unique internall customer ID (ie. your company's customer ID used to track individual customers).


Type:   string


[ Top ]

$cvvCode =  PAYMENT_PROCESS_CVV_NOAPPLY

[line 573]

CVV Code

The CVV code is the 3-4 digit number on the back of most credit cards. This value should be mapped via the $_cvvCodeMap variable to the appropriate PAYMENT_PROCESS_CVV_* values.


Type:   string


[ Top ]

$cvvMessage =  'No CVV message from gateway'

[line 586]

CVV Message

Your cvvCode value should be mapped to appropriate messages via the $_cvvCodeMessage array. This value is merely here to hold the value returned from the gateway (if any).


Type:   string


[ Top ]

$invoiceNumber =

[line 548]

Invoice Number

Unique internal invoiceNumber (ie. your company's order/invoice number that you assign each order as it is processed). It is always a good idea to pass this to the gateway (which is usually then echo'd back).


Type:   string


[ Top ]

$message =  'No message from gateway'

[line 496]

Message from gateway

Map the textual message from the gateway into this variable. It is not currently returned or used (in favor of the $_statusCodeMessages map, but can be accessed directly for debugging purposes.


Type:   string


[ Top ]

$messageCode =

[line 482]

Message/Response Code

Along with the response (yes/no) you usually get a response/message code that translates into why it was approved/declined. This is where you map that code into. Your $_statusCodeMessages would then be keyed by valid messageCode values.


Type:   mixed


[ Top ]

$transactionId =

[line 535]

Transaction ID

This is the unique transaction ID, which is used by gateways to modify transactions (credit, update, etc.). Map the appropriate value into this variable.


Type:   string


[ Top ]

$_rawResponse =  null

[line 450]

The raw response (ie. from cURL)

Type:   string


[ Top ]



Method Detail

Payment_Process_Result (Constructor)   [line 588]

Payment_Process_Result Payment_Process_Result( mixed $rawResponse)


[ Top ]

factory   [line 593]

void &factory( mixed $type, mixed $rawResponse)


[ Top ]

getAVSCode   [line 695]

void getAVSCode( )


[ Top ]

getAVSMessage   [line 700]

void getAVSMessage( )


[ Top ]

getCode   [line 662]

void getCode( )

getCode

Overridden in child classes as:

Payment_Process_Result_Transfirst::getCode()

[ Top ]

getCvvCode   [line 705]

void getCvvCode( )


[ Top ]

getCvvMessage   [line 710]

void getCvvMessage( )


[ Top ]

getMessage   [line 683]

string getMessage( )

getMessage

Return the message from the code map, or return the raw message if there is one. Otherwise, return a worthless message.


[ Top ]

parse   [line 648]

void parse( )

parse

Overridden in child classes as:

Payment_Process_Result_AuthorizeNet::parse()
Payment_Process_Result_TrustCommerce::parse()

[ Top ]

validate   [line 611]

mixed validate( )

validate

[ Top ]


Documentation generated on Mon, 11 Apr 2005 14:35:38 -0400 by phpDocumentor 1.2.3. PEAR Logo Copyright © PHP Group 2004.