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

Class: Payment_Process_Result

Source Location: /Payment_Process-0.5.7/Process.php

Class Overview


Payment_Process_Result


Author(s):

Version:

  • @version@

Variables

Methods


Child classes:

Payment_Process_Result_Dpilink
Payment_Process_Result
Payment_Process_Result_AuthorizeNet
Payment_Process_Result
Payment_Process_Result_Dummy
Payment_Process_Result

Inherited Variables

Inherited Methods


Class Details

[line 412]
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 487]

Authorization/Approval code

Type:   string


[ Top ]

$avsCode =

[line 504]

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

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

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

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

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

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

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

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

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

The raw response (ie. from cURL)

Type:   string


[ Top ]



Method Detail

Payment_Process_Result (Constructor)   [line 570]

Payment_Process_Result Payment_Process_Result( $rawResponse)


Parameters:

   $rawResponse   — 

[ Top ]

factory   [line 575]

void &factory( $type, $rawResponse)


Parameters:

   $type   — 
   $rawResponse   — 

[ Top ]

getAVSCode   [line 677]

void getAVSCode( )


[ Top ]

getAVSMessage   [line 682]

void getAVSMessage( )


[ Top ]

getCode   [line 644]

void getCode( )

getCode

Overridden in child classes as:

Payment_Process_Result_Dpilink::getCode()

[ Top ]

getCvvCode   [line 687]

void getCvvCode( )


[ Top ]

getCvvMessage   [line 692]

void getCvvMessage( )


[ Top ]

getMessage   [line 665]

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

void parse( )

parse

Overridden in child classes as:

Payment_Process_Result_AuthorizeNet::parse()

[ Top ]

validate   [line 593]

mixed validate( )

validate

[ Top ]


Documentation generated on Mon, 11 Mar 2019 13:51:27 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.