Class AuthorizeNetAIM

Description

Builds and sends an AuthorizeNet AIM Request.

Located in /lib/AuthorizeNetAIM.php (line 42)

AuthorizeNetRequest
   |
   --AuthorizeNetAIM
Class Constant Summary
 LIVE_URL = 'https://secure.authorize.net/gateway/transact.dll'
 SANDBOX_URL = 'https://test.authorize.net/gateway/transact.dll'
Variable Summary
Method Summary
void addLineItem (string $item_id, string $item_name, string $item_description, string $item_quantity, string $item_unit_price, string $item_taxable)
AuthorizeNetAIM_Response authorizeAndCapture ([string $amount = false], [string $card_num = false], [string $exp_date = false])
AuthorizeNetAIM_Response authorizeOnly ([string $amount = false], [string $card_num = false], [string $exp_date = false])
AuthorizeNetAIM_Response captureOnly ([string $auth_code = false], [string $amount = false], [string $card_num = false], [string $exp_date = false])
AuthorizeNetAIM_Response credit ([string $trans_id = false], [string $amount = false], [string $card_num = false])
AuthorizeNetAIM_Response priorAuthCapture ([string $trans_id = false], [string $amount = false])
void setCustomField (string $name, string $value)
void setCustomFields (array $fields)
void setECheck ( $bank_aba_code,  $bank_acct_num,  $bank_acct_type,  $bank_name,  $bank_acct_name, [ $echeck_type = 'WEB'])
void setField (string $name, string $value)
void setFields (array $fields)
void unsetField (string $name)
AuthorizeNetAIM_Response void ([string $trans_id = false])
string _getPostUrl ()
void _setPostString ()
void __set (string $name, string $value)
Variables
mixed $verify_x_fields = true (line 74)

Checks to make sure a field is actually in the API before setting.

Set to false to skip this check.

  • access: public

Inherited Variables

Inherited from AuthorizeNetRequest

AuthorizeNetRequest::$VERIFY_PEER
AuthorizeNetRequest::$_api_login
AuthorizeNetRequest::$_log_file
AuthorizeNetRequest::$_post_string
AuthorizeNetRequest::$_sandbox
AuthorizeNetRequest::$_transaction_key
Methods
addLineItem (line 266)

Add a line item.

  • access: public
void addLineItem (string $item_id, string $item_name, string $item_description, string $item_quantity, string $item_unit_price, string $item_taxable)
  • string $item_id
  • string $item_name
  • string $item_description
  • string $item_quantity
  • string $item_unit_price
  • string $item_taxable
authorizeAndCapture (line 106)

Do an AUTH_CAPTURE transaction.

Required "x_" fields: card_num, exp_date, amount

  • access: public
AuthorizeNetAIM_Response authorizeAndCapture ([string $amount = false], [string $card_num = false], [string $exp_date = false])
  • string $amount: The dollar amount to charge
  • string $card_num: The credit card number
  • string $exp_date: CC expiration date
authorizeOnly (line 146)

Do an AUTH_ONLY transaction.

Required "x_" fields: card_num, exp_date, amount

  • access: public
AuthorizeNetAIM_Response authorizeOnly ([string $amount = false], [string $card_num = false], [string $exp_date = false])
  • string $amount: The dollar amount to charge
  • string $card_num: The credit card number
  • string $exp_date: CC expiration date
captureOnly (line 184)

Do a CAPTURE_ONLY transaction.

Required "x_" fields: auth_code, amount, card_num , exp_date

  • access: public
AuthorizeNetAIM_Response captureOnly ([string $auth_code = false], [string $amount = false], [string $card_num = false], [string $exp_date = false])
  • string $auth_code: The auth code
  • string $amount: The dollar amount to charge
  • string $card_num: The last 4 of credit card number
  • string $exp_date: CC expiration date
credit (line 205)

Do a CREDIT transaction.

Required "x_" fields: trans_id, amount, card_num (just the last 4)

  • access: public
AuthorizeNetAIM_Response credit ([string $trans_id = false], [string $amount = false], [string $card_num = false])
  • string $trans_id: Transaction id to credit
  • string $amount: The dollar amount to credit
  • string $card_num: The last 4 of credit card number
priorAuthCapture (line 127)

Do a PRIOR_AUTH_CAPTURE transaction.

Required "x_" field: trans_id(The transaction id of the prior auth, unless split tender, then set x_split_tender_id manually.) amount (only if lesser than original auth)

  • access: public
AuthorizeNetAIM_Response priorAuthCapture ([string $trans_id = false], [string $amount = false])
  • string $trans_id: Transaction id to charge
  • string $amount: Dollar amount to charge if lesser than auth
setCustomField (line 323)

Set a custom field. Note: the x_ prefix will not be added to your custom field if you use this method.

  • access: public
void setCustomField (string $name, string $value)
  • string $name
  • string $value
setCustomFields (line 248)

Quickly set multiple custom fields.

  • access: public
void setCustomFields (array $fields)
  • array $fields
setECheck (line 280)

Use ECHECK as payment type.

  • access: public
void setECheck ( $bank_aba_code,  $bank_acct_num,  $bank_acct_type,  $bank_name,  $bank_acct_name, [ $echeck_type = 'WEB'])
  • $bank_aba_code
  • $bank_acct_num
  • $bank_acct_type
  • $bank_name
  • $bank_acct_name
  • $echeck_type
setField (line 302)

Set an individual name/value pair. This will append x_ to the name before posting.

  • access: public
void setField (string $name, string $value)
  • string $name
  • string $value
setFields (line 235)

Quickly set multiple fields.

Note: The prefix x_ will be added to all fields. If you want to set a custom field without the x_ prefix, use setCustomField or setCustomFields.

  • access: public
void setFields (array $fields)
  • array $fields: Takes an array or object.
unsetField (line 333)

Unset an x_ field.

  • access: public
void unsetField (string $name)
  • string $name: Field to unset.
void (line 165)

Do a VOID transaction.

Required "x_" field: trans_id(The transaction id of the prior auth, unless split tender, then set x_split_tender_id manually.)

  • access: public
AuthorizeNetAIM_Response void ([string $trans_id = false])
  • string $trans_id: Transaction id to void
_getPostUrl (line 353)
  • access: protected
string _getPostUrl ()

Redefinition of:
AuthorizeNetRequest::_getPostUrl()
Get the post url. We need this because until 5.3 you you could not access child constants in a parent class.
_handleResponse (line 345)
  • access: protected
AuthorizeNetAIM_Response _handleResponse (string $response)
  • string $response

Redefinition of:
AuthorizeNetRequest::_handleResponse()
Handle the response string
_setPostString (line 361)

Converts the x_post_fields array into a string suitable for posting.

  • access: protected
void _setPostString ()

Redefinition of:
AuthorizeNetRequest::_setPostString()
Set the _post_string
__set (line 222)

Alternative syntax for setting x_ fields.

Usage: $sale->method = "echeck";

  • access: public
void __set (string $name, string $value)
  • string $name
  • string $value

Inherited Methods

Inherited From AuthorizeNetRequest

AuthorizeNetRequest::__construct()
AuthorizeNetRequest::getPostString()
AuthorizeNetRequest::setLogFile()
AuthorizeNetRequest::setSandbox()
AuthorizeNetRequest::_getPostUrl()
AuthorizeNetRequest::_handleResponse()
AuthorizeNetRequest::_sendRequest()
AuthorizeNetRequest::_setPostString()
Class Constants
LIVE_URL = 'https://secure.authorize.net/gateway/transact.dll' (line 45)
SANDBOX_URL = 'https://test.authorize.net/gateway/transact.dll' (line 46)

Documentation generated on Thu, 21 Oct 2010 17:30:58 +0000 by phpDocumentor 1.4.3