Class AuthNetGateway

Description

This class encapsulates transaction processing with Authorize.Net.

  • author: Richard Sharp
  • version: 3.5
  • copyright: 2005-2010
Variable Summary
string $Address
decimal $Amount
string $ApprovalCode
string $CardNumber
string $City
string $Country
string $Custom
string $CustomerID
string $Description
string $Email
string $FirstName
string $LastError
string $LastName
string $LastRequest
string $LastResponse
string $Phone
string $SecurityCode
string $State
string $Test
string $Zip
Method Summary
Variables
string $Address = "" (line 28)

Required. Sets the billing street address.

decimal $Amount (line 34)

Required. Sets the Amount to Charge

string $ApprovalCode = "" (line 40)

Gets the returned apprival code.

string $AuthNetLoginID = "" (line 46)

Required. Sets the Authorize.Net API Login ID

string $AuthNetTransactionKey = "" (line 52)

Required. Sets the Authorize.Net API Transaction Key

string $CardNumber = "" (line 58)

Required. Sets the Credit Card Number. All non-numeric characters will be removed.

string $City = "" (line 64)

Required. Sets the billing city.

string $Country = "US" (line 70)

Optional. Sets the billing country.

string $Custom = "" (line 76)

Optional. Sets any custom information to be sent to Authorize.Net.

string $CustomerID = "" (line 82)

Options. Sets the Customer ID.

string $Description = "" (line 88)

Required. Sets the transaction description.

string $DuplicateWindow = 120 (line 94)

Optional. Sets the time window (in seconds) to prevent duplicate transactions. Default is 120 seconds.

string $Email = "" (line 100)

Optional. Sets the billing email address.

string $ExpirationDate = "" (line 106)

Required. Sets the credit card expiration date. Format: MMYY.

string $FirstName = "" (line 112)

Required. Sets the billing first name.

string $InvoiceNumber = "" (line 118)

Optional. Sets the invoice number.

string $LastError = "" (line 124)

Gets the error returned, if any.

string $LastName = "" (line 130)

Required. Sets the billing last name.

string $LastRequest = "" (line 136)

Gets the raw text of the last request sent to Authorize.Net

string $LastResponse = "" (line 142)

Gets the raw text of the last response from Authorize.Net

string $MerchantReceiptEmail = "" (line 160)

Optional. Sets an email address to receive a copy of the confirmation.

string $Phone = "" (line 148)

Optional. The billing phone number.

string $ResponseReason = "" (line 154)

Gets the reason for the last response.

string $SecurityCode = "" (line 166)

Required. Sets the credit card security code.

string $State = "" (line 172)

Required. Sets the billing state.

string $Test = false (line 178)

Optional. If true, the transaction will be processed in test mode.

string $TransactionID = "" (line 184)

Gets the returned Transaction ID.

string $TransactionType = "AUTH_CAPTURE" (line 190)

Required. Gets the transaction Type. Possible values are: AUTH_CAPTURE, AUTH_ONLY, CAPTURE_ONLY, CREDIT, VOID, PRIOR_AUTH_CAPTURE

string $Zip = "" (line 196)

Sets the billing zip code.

Methods
Constructor AuthNetGateway (line 224)

Constructor for the class.

void AuthNetGateway ()
ProcessTransaction (line 230)

Processes the transaction

  • return: Returns true on success, false on error.
bool ProcessTransaction ()