Overview

Packages

  • currencysymbol
  • MAbout
  • Mage
    • Admin
    • Adminhtml
    • AdminNotification
    • Api
    • Api2
    • Authorizenet
    • Backup
    • Bundle
    • Captcha
    • Catalog
    • CatalogIndex
    • CatalogInventory
    • CatalogRule
    • CatalogSearch
    • Centinel
    • Checkout
    • Cms
    • Compiler
    • Connect
    • Contacts
    • Core
    • Cron
    • CurrencySymbol
    • Customer
    • Dataflow
    • Directory
    • DirtectPost
    • Downloadable
    • Eav
    • GiftMessage
    • GoogleAnalytics
    • GoogleBase
    • GoogleCheckout
    • ImportExport
    • Index
    • Install
    • Log
    • Media
    • Newsletter
    • Oauth
    • Page
    • PageCache
    • Paygate
    • Payment
    • Paypal
    • PaypalUk
    • Persistent
    • Poll
    • ProductAlert
    • Rating
    • Reports
    • Review
    • Rss
    • Rule
    • Sales
    • SalesRule
    • Sedfriend
    • Sendfriend
    • Shipping
    • Sitemap
    • Tag
    • Tax
    • Usa
    • Weee
    • Widget
    • Wishlist
    • XmlConnect
  • None
  • Phoenix
    • Moneybookers
  • PHP
  • Zend
    • Date
    • Mime
    • XmlRpc

Classes

  • Mage_Paygate_Adminhtml_Paygate_Authorizenet_PaymentController
  • Mage_Paygate_Authorizenet_PaymentController
  • Mage_Paygate_Block_Authorizenet_Form_Cc
  • Mage_Paygate_Block_Authorizenet_Info_Cc
  • Mage_Paygate_Helper_Data
  • Mage_Paygate_Model_Authorizenet
  • Mage_Paygate_Model_Authorizenet_Cards
  • Mage_Paygate_Model_Authorizenet_Debug
  • Mage_Paygate_Model_Authorizenet_Result
  • Mage_Paygate_Model_Authorizenet_Source_Cctype
  • Mage_Paygate_Model_Authorizenet_Source_PaymentAction
  • Mage_Paygate_Model_Mysql4_Authorizenet_Debug
  • Mage_Paygate_Model_Mysql4_Authorizenet_Debug_Collection
  • Mage_Paygate_Model_Resource_Authorizenet_Debug
  • Mage_Paygate_Model_Resource_Authorizenet_Debug_Collection
  • Overview
  • Package
  • Class
  • Tree

Class Mage_Paygate_Model_Authorizenet

Magento

NOTICE OF LICENSE

This source file is subject to the Open Software License (OSL 3.0) that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://opensource.org/licenses/osl-3.0.php If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@magentocommerce.com so we can send you a copy immediately.

DISCLAIMER

Do not edit or add to this file if you wish to upgrade Magento to newer versions in the future. If you wish to customize Magento for your needs please refer to http://www.magentocommerce.com for more information.

Varien_Object
Extended by Mage_Payment_Model_Method_Abstract
Extended by Mage_Payment_Model_Method_Cc
Extended by Mage_Paygate_Model_Authorizenet

Direct known subclasses

Mage_Authorizenet_Model_Directpost
Package: Mage\Paygate
Category: Mage
Copyright: Copyright (c) 2012 Magento Inc. (http://www.magentocommerce.com)
License: Open Software License (OSL 3.0)
Located at code/core/Mage/Paygate/Model/Authorizenet.php
Methods summary
public boolean
# canUseForCurrency( string $currencyCode )

Check method for processing with base currency

Check method for processing with base currency

Parameters

$currencyCode
string
$currencyCode

Returns

boolean

Overrides

Mage_Payment_Model_Method_Abstract::canUseForCurrency()
public array
# getAcceptedCurrencyCodes( )

Return array of currency codes supplied by Payment Gateway

Return array of currency codes supplied by Payment Gateway

Returns

array
public boolean
# canCapture( )

Check capture availability

Check capture availability

Returns

boolean

Overrides

Mage_Payment_Model_Method_Abstract::canCapture()
public boolean
# canRefund( )

Check refund availability

Check refund availability

Returns

boolean

Overrides

Mage_Payment_Model_Method_Abstract::canRefund()
public boolean
# canVoid( Varien_Object $payment )

Check void availability

Check void availability

Parameters

$payment
Varien_Object
$invoicePayment

Returns

boolean

Overrides

Mage_Payment_Model_Method_Abstract::canVoid()
public Mage_Paygate_Model_Authorizenet
# setPartialAuthorizationLastActionState( string $state )

Set partial authorization last action state into session

Set partial authorization last action state into session

Parameters

$state
string
$message

Returns

Mage_Paygate_Model_Authorizenet
public string
# getPartialAuthorizationLastActionState( )

Return partial authorization last action state from session

Return partial authorization last action state from session

Returns

string
public Mage_Paygate_Model_Authorizenet
# unsetPartialAuthorizationLastActionState( )

Unset partial authorization last action state in session

Unset partial authorization last action state in session

Returns

Mage_Paygate_Model_Authorizenet
public Mage_Paygate_Model_Authorizenet
# authorize( Varien_Object $payment, decimal $amount )

Send authorize request to gateway

Send authorize request to gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
decimal
$amount

Returns

Mage_Paygate_Model_Authorizenet

Overrides

Mage_Payment_Model_Method_Abstract::authorize()
public Mage_Paygate_Model_Authorizenet
# capture( Varien_Object $payment, decimal $amount )

Send capture request to gateway

Send capture request to gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
decimal
$amount

Returns

Mage_Paygate_Model_Authorizenet

Overrides

Mage_Payment_Model_Method_Abstract::capture()
public Mage_Paygate_Model_Authorizenet
# void( Varien_Object $payment )

Void the payment through gateway

Void the payment through gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

Mage_Paygate_Model_Authorizenet

Overrides

Mage_Payment_Model_Method_Abstract::void()
public Mage_Paygate_Model_Authorizenet
# cancel( Varien_Object $payment )

Cancel the payment through gateway

Cancel the payment through gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

Mage_Paygate_Model_Authorizenet

Overrides

Mage_Payment_Model_Method_Abstract::cancel()
public Mage_Paygate_Model_Authorizenet
# refund( Varien_Object $payment, decimal $requestedAmount )

Refund the amount with transaction id

Refund the amount with transaction id

Parameters

$payment
Mage_Payment_Model_Info
$payment
$requestedAmount
decimal
$amount

Returns

Mage_Paygate_Model_Authorizenet

Throws

Mage_Core_Exception

Overrides

Mage_Payment_Model_Method_Abstract::refund()
public
# cancelPartialAuthorization( Mage_Payment_Model_Info $payment )

Cancel partial authorizations and flush current split_tender_id record

Cancel partial authorizations and flush current split_tender_id record

Parameters

$payment
Mage_Payment_Model_Info
$payment
protected Mage_Paygate_Model_Authorizenet
# _place( Mage_Payment_Model_Info $payment, decimal $amount, string $requestType )

Send request with new payment to gateway

Send request with new payment to gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
decimal
$amount
$requestType
string
$requestType

Returns

Mage_Paygate_Model_Authorizenet

Throws

Mage_Core_Exception
protected Mage_Paygate_Model_Authorizenet
# _partialAuthorization( Mage_Payment_Model_Info $payment, decimal $amount, string $requestType )

Send request with new payment to gateway during partial authorization process

Send request with new payment to gateway during partial authorization process

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
decimal
$amount
$requestType
string
$requestType

Returns

Mage_Paygate_Model_Authorizenet
protected boolean
# _isPreauthorizeCapture( Mage_Payment_Model_Info $payment )

Return true if there are authorized transactions

Return true if there are authorized transactions

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

boolean
protected Mage_Paygate_Model_Authorizenet
# _preauthorizeCapture( Mage_Payment_Model_Info $payment, decimal $requestedAmount )

Send capture request to gateway for capture authorized transactions

Send capture request to gateway for capture authorized transactions

Parameters

$payment
Mage_Payment_Model_Info
$payment
$requestedAmount
decimal
$amount

Returns

Mage_Paygate_Model_Authorizenet
protected Mage_Sales_Model_Order_Payment_Transaction
# _preauthorizeCaptureCardTransaction( Mage_Payment_Model_Info $payment, decimal $amount, Varien_Object $card )

Send capture request to gateway for capture authorized transactions of card

Send capture request to gateway for capture authorized transactions of card

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
decimal
$amount
$card
Varien_Object
$card

Returns

Mage_Sales_Model_Order_Payment_Transaction
protected Mage_Sales_Model_Order_Payment_Transaction
# _voidCardTransaction( Mage_Payment_Model_Info $payment, Varien_Object $card )

Void the card transaction through gateway

Void the card transaction through gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment
$card
Varien_Object
$card

Returns

Mage_Sales_Model_Order_Payment_Transaction
protected boolean
# _isTransactionExpired( string $realAuthTransactionId )

Check if transaction is expired

Check if transaction is expired

Parameters

$realAuthTransactionId
string
$realAuthTransactionId

Returns

boolean
protected Mage_Sales_Model_Order_Payment_Transaction
# _refundCardTransaction( Mage_Payment_Model_Info $payment, Varien_Object $amount, mixed $card )

Refund the card transaction through gateway

Refund the card transaction through gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment
$amount
Varien_Object
$card
$card

Returns

Mage_Sales_Model_Order_Payment_Transaction
protected
# _initCardsStorage( Mage_Payment_Model_Info $payment )

Init cards storage model

Init cards storage model

Parameters

$payment
Mage_Payment_Model_Info
$payment
public Mage_Paygate_Model_Authorizenet_Cards
# getCardsStorage( Mage_Payment_Model_Info $payment = null )

Return cards storage model

Return cards storage model

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

Mage_Paygate_Model_Authorizenet_Cards
public boolean
# isPartialAuthorization( Mage_Payment_Model_Info $payment = null )

If parial authorization is started method will returne true

If parial authorization is started method will returne true

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

boolean
public Mage_Payment_Model_Method_Abstract
# processInvoice( Mage_Sales_Model_Order_Invoice $invoice, Mage_Sales_Model_Order_Payment $payment )

Mock capture transaction id in invoice

Mock capture transaction id in invoice

Parameters

$invoice
Mage_Sales_Model_Order_Invoice
$invoice
$payment
Mage_Sales_Model_Order_Payment
$payment

Returns

Mage_Payment_Model_Method_Abstract

Overrides

Mage_Payment_Model_Method_Abstract::processInvoice()
public Mage_Payment_Model_Method_Abstract
# processCreditmemo( Mage_Sales_Model_Order_Creditmemo $creditmemo, Mage_Sales_Model_Order_Payment $payment )

Set transaction ID into creditmemo for informational purposes

Set transaction ID into creditmemo for informational purposes

Parameters

$creditmemo
Mage_Sales_Model_Order_Creditmemo
$creditmemo
$payment
Mage_Sales_Model_Order_Payment
$payment

Returns

Mage_Payment_Model_Method_Abstract

Overrides

Mage_Payment_Model_Method_Abstract::processCreditmemo()
public array
# fetchTransactionInfo( Mage_Payment_Model_Info $payment, string $transactionId )

Fetch transaction details info

Fetch transaction details info

Update transaction info if there is one placing transaction only

Parameters

$payment
Mage_Payment_Model_Info
$payment
$transactionId
string
$transactionId

Returns

array

Overrides

Mage_Payment_Model_Method_Abstract::fetchTransactionInfo()
protected boolean
# _processPartialAuthorizationResponse( Varien_Object $response, Mage_Sales_Model_Order_Payment $orderPayment )

Set split_tender_id to quote payment if neeeded

Set split_tender_id to quote payment if neeeded

Parameters

$response
Varien_Object
$response
$orderPayment
Mage_Sales_Model_Order_Payment
$payment

Returns

boolean
protected Mage_Paygate_Model_Authorizenet_Request
# _getRequest( )

Return authorize payment request

Return authorize payment request

Returns

Mage_Paygate_Model_Authorizenet_Request
protected Mage_Paygate_Model_Authorizenet_Request
# _buildRequest( Varien_Object $payment )

Prepare request to gateway

Prepare request to gateway

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

Mage_Paygate_Model_Authorizenet_Request

Link

http://www.authorize.net/support/AIM_guide.pdf
protected Mage_Paygate_Model_Authorizenet_Result
# _postRequest( Varien_Object $request )

Post request to gateway and return responce

Post request to gateway and return responce

Parameters

$request
Mage_Paygate_Model_Authorizenet_Request
$request)

Returns

Mage_Paygate_Model_Authorizenet_Result
protected string
# _wrapGatewayError( string $text )

Gateway response wrapper

Gateway response wrapper

Parameters

$text
string
$text

Returns

string
protected Mage_Core_Model_Session_Abstract
# _getSession( )

Retrieve session object

Retrieve session object

Returns

Mage_Core_Model_Session_Abstract
protected Varien_Object
# _registerCard( Varien_Object $response, Mage_Sales_Model_Order_Payment $payment )

It sets card`s data into additional information of payment model

It sets card`s data into additional information of payment model

Parameters

$response
Mage_Paygate_Model_Authorizenet_Result
$response
$payment
Mage_Sales_Model_Order_Payment
$payment

Returns

Varien_Object
private Mage_Paygate_Model_Authorizenet
# _clearAssignedData( Mage_Payment_Model_Info $payment )

Reset assigned data in payment info model

Reset assigned data in payment info model

Parameters

$payment
Mage_Payment_Model_Info

Returns

Mage_Paygate_Model_Authorizenet
protected null|Mage_Sales_Model_Order_Payment_Transaction
# _addTransaction( Mage_Sales_Model_Order_Payment $payment, string $transactionId, string $transactionType, array $transactionDetails = array(), array $transactionAdditionalInfo = array(), mixed $message = false )

Add payment transaction

Add payment transaction

Parameters

$payment
Mage_Sales_Model_Order_Payment
$payment
$transactionId
string
$transactionId
$transactionType
string
$transactionType
$transactionDetails
array
$transactionDetails
$transactionAdditionalInfo
array
$transactionAdditionalInfo
$message

Returns

null|Mage_Sales_Model_Order_Payment_Transaction
protected string|float
# _formatAmount( string|float $amount, boolean $asFloat = false )

Round up and cast specified amount to float or string

Round up and cast specified amount to float or string

Parameters

$amount
string|float
$amount
$asFloat
boolean
$asFloat

Returns

string|float
protected boolean
# _isGatewayActionsLocked( Mage_Payment_Model_Info $payment )

If gateway actions are locked return true

If gateway actions are locked return true

Parameters

$payment
Mage_Payment_Model_Info
$payment

Returns

boolean
protected
# _processFailureMultitransactionAction( Mage_Payment_Model_Info $payment, string $messages, boolean $isSuccessfulTransactions )

Process exceptions for gateway action with a lot of transactions

Process exceptions for gateway action with a lot of transactions

Parameters

$payment
Mage_Payment_Model_Info
$payment
$messages
string
$messages
$isSuccessfulTransactions
boolean
$isSuccessfulTransactions
protected string
# _generateChecksum( Varien_Object $object, array $checkSumDataKeys = array() )

Generate checksum for object

Generate checksum for object

Parameters

$object
Varien_Object
$object
$checkSumDataKeys
array
$checkSumDataKeys

Returns

string
protected Varien_Object
# _getTransactionDetails( string $transactionId )

This function returns full transaction details for a specified transaction ID.

This function returns full transaction details for a specified transaction ID.

Parameters

$transactionId
string
$transactionId

Returns

Varien_Object

Link

http://www.authorize.net/support/ReportingGuide_XML.pdf
http://developer.authorize.net/api/transaction_details/
Methods inherited from Mage_Payment_Model_Method_Cc
OtherCcType(), _validateExpDate(), assignData(), getCentinelValidationData(), getCentinelValidator(), getIsCentinelValidationEnabled(), getVerificationRegEx(), hasVerification(), isAvailable(), prepareSave(), validate(), validateCcNum(), validateCcNumOther()
Methods inherited from Mage_Payment_Model_Method_Abstract
__construct(), _debug(), _getHelper(), acceptPayment(), canAuthorize(), canCapturePartial(), canCreateBillingAgreement(), canEdit(), canFetchTransactionInfo(), canManageBillingAgreements(), canManageRecurringProfiles(), canOrder(), canRefundPartialPerInvoice(), canReviewPayment(), canUseCheckout(), canUseForCountry(), canUseForMultishipping(), canUseInternal(), debugData(), denyPayment(), getCode(), getConfigData(), getConfigPaymentAction(), getDebugFlag(), getFormBlockType(), getInfoBlockType(), getInfoInstance(), getTitle(), initialize(), isGateway(), isInitializeNeeded(), order(), processBeforeRefund()
Constants summary
string CGI_URL 'https://secure.authorize.net/gateway/transact.dll'
#
string CGI_URL_TD 'https://apitest.authorize.net/xml/v1/request.api'
#
string REQUEST_METHOD_CC 'CC'
#
string REQUEST_METHOD_ECHECK 'ECHECK'
#
string REQUEST_TYPE_AUTH_CAPTURE 'AUTH_CAPTURE'
#
string REQUEST_TYPE_AUTH_ONLY 'AUTH_ONLY'
#
string REQUEST_TYPE_CAPTURE_ONLY 'CAPTURE_ONLY'
#
string REQUEST_TYPE_CREDIT 'CREDIT'
#
string REQUEST_TYPE_VOID 'VOID'
#
string REQUEST_TYPE_PRIOR_AUTH_CAPTURE 'PRIOR_AUTH_CAPTURE'
#
string ECHECK_ACCT_TYPE_CHECKING 'CHECKING'
#
string ECHECK_ACCT_TYPE_BUSINESS 'BUSINESSCHECKING'
#
string ECHECK_ACCT_TYPE_SAVINGS 'SAVINGS'
#
string ECHECK_TRANS_TYPE_CCD 'CCD'
#
string ECHECK_TRANS_TYPE_PPD 'PPD'
#
string ECHECK_TRANS_TYPE_TEL 'TEL'
#
string ECHECK_TRANS_TYPE_WEB 'WEB'
#
string RESPONSE_DELIM_CHAR '(~)'
#
integer RESPONSE_CODE_APPROVED 1
#
integer RESPONSE_CODE_DECLINED 2
#
integer RESPONSE_CODE_ERROR 3
#
integer RESPONSE_CODE_HELD 4
#
integer RESPONSE_REASON_CODE_APPROVED 1
#
integer RESPONSE_REASON_CODE_NOT_FOUND 16
#
integer RESPONSE_REASON_CODE_PARTIAL_APPROVE 295
#
integer RESPONSE_REASON_CODE_PENDING_REVIEW_AUTHORIZED 252
#
integer RESPONSE_REASON_CODE_PENDING_REVIEW 253
#
integer RESPONSE_REASON_CODE_PENDING_REVIEW_DECLINED 254
#
integer PARTIAL_AUTH_CARDS_LIMIT 5
#
string PARTIAL_AUTH_LAST_SUCCESS 'last_success'
#
string PARTIAL_AUTH_LAST_DECLINED 'last_declined'
#
string PARTIAL_AUTH_ALL_CANCELED 'all_canceled'
#
string PARTIAL_AUTH_CARDS_LIMIT_EXCEEDED 'card_limit_exceeded'
#
string PARTIAL_AUTH_DATA_CHANGED 'data_changed'
#
string METHOD_CODE 'authorizenet'
#
string TRANSACTION_STATUS_EXPIRED 'expired'
#
Constants inherited from Mage_Payment_Model_Method_Abstract
ACTION_AUTHORIZE, ACTION_AUTHORIZE_CAPTURE, ACTION_ORDER, STATUS_APPROVED, STATUS_DECLINED, STATUS_ERROR, STATUS_SUCCESS, STATUS_UNKNOWN, STATUS_VOID
Properties summary
protected string $_code Mage_Paygate_Model_Authorizenet::METHOD_CODE
#
protected string $_formBlockType 'paygate/authorizenet_form_cc'
#

Form block type

Form block type

protected string $_infoBlockType 'paygate/authorizenet_info_cc'
#

Info block type

Info block type

protected boolean $_isGateway true
#

Availability options

Availability options

protected boolean $_canAuthorize true
#
protected boolean $_canCapture true
#
protected boolean $_canCapturePartial false
#
protected boolean $_canRefund true
#
protected boolean $_canRefundInvoicePartial true
#
protected boolean $_canVoid true
#
protected boolean $_canUseInternal true
#
protected boolean $_canUseCheckout true
#
protected boolean $_canUseForMultishipping true
#
protected boolean $_canSaveCc false
#
protected boolean $_canFetchTransactionInfo true
#
protected array $_allowCurrencyCode array('USD')
#
protected array $_debugReplacePrivateDataKeys array('x_login', 'x_tran_key', 'x_card_num', 'x_exp_date', 'x_card_code', 'x_bank_aba_code', 'x_bank_name', 'x_bank_acct_num', 'x_bank_acct_type','x_bank_acct_name', 'x_echeck_type')
#

Fields that should be replaced in debug with '***'

Fields that should be replaced in debug with '***'

protected string $_isTransactionFraud 'is_transaction_fraud'
#

Key for storing fraud transaction flag in additional information of payment model

Key for storing fraud transaction flag in additional information of payment model

protected string $_realTransactionIdKey 'real_transaction_id'
#

Key for storing transaction id in additional information of payment model

Key for storing transaction id in additional information of payment model

protected string $_splitTenderIdKey 'split_tender_id'
#

Key for storing split tender id in additional information of payment model

Key for storing split tender id in additional information of payment model

protected string $_isGatewayActionsLockedKey 'is_gateway_actions_locked'
#

Key for storing locking gateway actions flag in additional information of payment model

Key for storing locking gateway actions flag in additional information of payment model

protected string $_partialAuthorizationLastActionStateSessionKey 'paygate_authorizenet_last_action_state'
#

Key for storing partial authorization last action state in session

Key for storing partial authorization last action state in session

protected string $_partialAuthorizationChecksumSessionKey 'paygate_authorizenet_checksum'
#

Key for storing partial authorization checksum in session

Key for storing partial authorization checksum in session

protected array $_partialAuthorizationChecksumDataKeys array( 'x_version', 'x_test_request', 'x_login', 'x_test_request', 'x_allow_partial_auth', 'x_amount', 'x_currency_code', 'x_type', 'x_first_name', 'x_last_name', 'x_company', 'x_address', 'x_city', 'x_state', 'x_zip', 'x_country', 'x_phone', 'x_fax', 'x_cust_id', 'x_customer_ip', 'x_customer_tax_id', 'x_email', 'x_email_customer', 'x_merchant_email', 'x_ship_to_first_name', 'x_ship_to_last_name', 'x_ship_to_company', 'x_ship_to_address', 'x_ship_to_city', 'x_ship_to_state', 'x_ship_to_zip', 'x_ship_to_country', 'x_po_num', 'x_tax', 'x_freight' )
#

Fields for creating place request checksum

Fields for creating place request checksum

protected array $_centinelFieldMap array( 'centinel_cavv' => 'x_cardholder_authentication_value', 'centinel_eci' => 'x_authentication_indicator' )
#

Centinel cardinal fields map

Centinel cardinal fields map

Properties inherited from Mage_Payment_Model_Method_Abstract
$_canCancelInvoice, $_canCreateBillingAgreement, $_canManageRecurringProfiles, $_canOrder, $_canReviewPayment, $_isInitializeNeeded
Magento 1.7.0.2 API documentation generated by ApiGen 2.8.0