AuthorizeNetCP

Extends \AuthorizeNetAIM

Builds and sends an AuthorizeNet CP Request.

package

AuthorizeNet

subpackage

AuthorizeNetCP

Methods

Strip sentinels and set track1 field.

setTrack1Data(string $track1data) 

Arguments

$track1data

string

Strip sentinels and set track2 field.

setTrack2Data(string $track2data) 

Arguments

$track2data

string

_handleResponse

_handleResponse(string $response) : \AuthorizeNetAIM_Response

Arguments

$response

string

Response

\AuthorizeNetAIM_Response

Do an AUTH_CAPTURE transaction.

authorizeAndCapture(string $amount = false, string $card_num = false, string $exp_date = false) : \AuthorizeNetAIM_Response
inherited

Required "x_" fields: card_num, exp_date, amount

Arguments

$amount

string

The dollar amount to charge

$card_num

string

The credit card number

$exp_date

string

CC expiration date

Response

\AuthorizeNetAIM_Response

Do a PRIOR_AUTH_CAPTURE transaction.

priorAuthCapture(string $trans_id = false, string $amount = false) : \AuthorizeNetAIM_Response
inherited

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)

Arguments

$trans_id

string

Transaction id to charge

$amount

string

Dollar amount to charge if lesser than auth

Response

\AuthorizeNetAIM_Response

Do an AUTH_ONLY transaction.

authorizeOnly(string $amount = false, string $card_num = false, string $exp_date = false) : \AuthorizeNetAIM_Response
inherited

Required "x_" fields: card_num, exp_date, amount

Arguments

$amount

string

The dollar amount to charge

$card_num

string

The credit card number

$exp_date

string

CC expiration date

Response

\AuthorizeNetAIM_Response

Do a VOID transaction.

void(string $trans_id = false) : \AuthorizeNetAIM_Response
inherited

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

Arguments

$trans_id

string

Transaction id to void

Response

\AuthorizeNetAIM_Response

Do a CAPTURE_ONLY transaction.

captureOnly(string $auth_code = false, string $amount = false, string $card_num = false, string $exp_date = false) : \AuthorizeNetAIM_Response
inherited

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

Arguments

$auth_code

string

The auth code

$amount

string

The dollar amount to charge

$card_num

string

The last 4 of credit card number

$exp_date

string

CC expiration date

Response

\AuthorizeNetAIM_Response

Do a CREDIT transaction.

credit(string $trans_id = false, string $amount = false, string $card_num = false) : \AuthorizeNetAIM_Response
inherited

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

Arguments

$trans_id

string

Transaction id to credit

$amount

string

The dollar amount to credit

$card_num

string

The last 4 of credit card number

Response

\AuthorizeNetAIM_Response

Alternative syntax for setting x_ fields.

__set(string $name, string $value) 
inherited

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

Arguments

$name

string

$value

string

Quickly set multiple fields.

setFields(array $fields) 
inherited

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.

Arguments

$fields

array

Takes an array or object.

Quickly set multiple custom fields.

setCustomFields(array $fields) 
inherited

Arguments

$fields

array

Add a line item.

addLineItem(string $item_id, string $item_name, string $item_description, string $item_quantity, string $item_unit_price, string $item_taxable) 
inherited

Arguments

$item_id

string

$item_name

string

$item_description

string

$item_quantity

string

$item_unit_price

string

$item_taxable

string

Use ECHECK as payment type.

setECheck($bank_aba_code, $bank_acct_num, $bank_acct_type, $bank_name, $bank_acct_name, $echeck_type = 'WEB') 
inherited

Arguments

$bank_aba_code

$bank_acct_num

$bank_acct_type

$bank_name

$bank_acct_name

$echeck_type

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

setField(string $name, string $value) 
inherited

Arguments

$name

string

$value

string

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

setCustomField(string $name, string $value) 
inherited

Arguments

$name

string

$value

string

Unset an x_ field.

unsetField(string $name) 
inherited

Arguments

$name

string

Field to unset.

_getPostUrl

_getPostUrl() : string
inherited

Response

string

Converts the x_post_fields array into a string suitable for posting.

_setPostString() 
inherited

Constants

LIVE_URL

LIVE_URL

SANDBOX_URL

SANDBOX_URL
inherited

Properties

verify_x_fields

verify_x_fields

Holds all the x_* name/values that will be posted in the request.

_x_post_fields

Default values are provided for best practice fields.

Only used if merchant wants to send multiple line items about the charge.

_additional_line_items
inherited

Only used if merchant wants to send custom fields.

_custom_fields
inherited

A list of all fields in the AIM API.

_all_aim_fields
inherited

Used to warn user if they try to set a field not offered in the API.