\AuthorizeNetCP
Builds and sends an AuthorizeNet CP Request.
Synopsis
class AuthorizeNetCP
extends AuthorizeNetAIM
{
- // constants
- const LIVE_URL = 'https://cardpresent.authorize.net/gateway/transact.dll';
- // Inherited constants from AuthorizeNetAIM
- const LIVE_URL = 'https://secure.authorize.net/gateway/transact.dll';
- const SANDBOX_URL = 'https://test.authorize.net/gateway/transact.dll';
- // members
- public boolean $verify_x_fields = false;
- protected array $_x_post_fields = ;
- private array $_custom_fields = ;
- // Inherited members from AuthorizeNetAIM
- protected array $_x_post_fields;
- public boolean $verify_x_fields;
- // Inherited members from AuthorizeNetRequest
- protected $_api_login;
- protected $_transaction_key;
- protected $_post_string;
- public boolean $VERIFY_PEER;
- protected boolean $_sandbox;
- protected boolean $_log_file;
- // methods
- public void setTrack1Data()
- public void setTrack2Data()
- protected AuthorizeNetAIM_Response _handleResponse()
- // Inherited methods from AuthorizeNetAIM
- public AuthorizeNetAIM_Response authorizeAndCapture()
- public AuthorizeNetAIM_Response priorAuthCapture()
- public AuthorizeNetAIM_Response authorizeOnly()
- public AuthorizeNetAIM_Response void()
- public AuthorizeNetAIM_Response captureOnly()
- public AuthorizeNetAIM_Response credit()
- public void __set()
- public void setFields()
- public void setCustomFields()
- public void addLineItem()
- public void setECheck()
- public void setField()
- public void setCustomField()
- public void unsetField()
- protected AuthorizeNetAIM_Response _handleResponse()
- protected string _getPostUrl()
- protected void _setPostString()
- // Inherited methods from AuthorizeNetRequest
- protected abstract void _setPostString()
- protected abstract void _handleResponse()
- protected abstract void _getPostUrl()
- public void __construct()
- public void setSandbox()
- public void setLogFile()
- public string getPostString()
- protected AuthorizeNetARB_Response _sendRequest()
Hierarchy
Extends
Constants
Name | Value |
---|---|
LIVE_URL | 'https://cardpresent.authorize.net/gateway/transact.dll' |
LIVE_URL | 'https://secure.authorize.net/gateway/transact.dll' |
SANDBOX_URL | 'https://test.authorize.net/gateway/transact.dll' |
Members
private
-
$_custom_fields
Only used if merchant wants to send custom fields.
protected
- $_api_login
- $_log_file
- $_post_string
- $_sandbox
- $_transaction_key
-
$_x_post_fields
Holds all the x_* name/values that will be posted in the request. -
$_x_post_fields
Holds all the x_* name/values that will be posted in the request.
public
- $VERIFY_PEER
- $verify_x_fields
-
$verify_x_fields
Checks to make sure a field is actually in the API before setting.
Methods
protected
public
- setTrack1Data() — Strip sentinels and set track1 field.
- setTrack2Data() — Strip sentinels and set track2 field.
Inherited from AuthorizeNetAIM
protected
- _getPostUrl()
- _handleResponse()
- _setPostString() — Converts the x_post_fields array into a string suitable for posting.
public
- __set() — Alternative syntax for setting x_ fields.
- addLineItem() — Add a line item.
- captureOnly() — Do a CAPTURE_ONLY transaction.
- credit() — Do a CREDIT transaction.
- priorAuthCapture() — Do a PRIOR_AUTH_CAPTURE transaction.
- setCustomField() — Set a custom field. Note: the x_ prefix will not be added to your custom field if you use this method.
- setCustomFields() — Quickly set multiple custom fields.
- setECheck() — Use ECHECK as payment type.
- setField() — Set an individual name/value pair. This will append x_ to the name before posting.
- setFields() — Quickly set multiple fields.
- unsetField() — Unset an x_ field.
- void() — Do a VOID transaction.
Inherited from AuthorizeNetRequest
protected
- _getPostUrl() — Get the post url. We need this because until 5.3 you you could not access child constants in a parent class.
- _handleResponse() — Handle the response string
- _sendRequest() — Posts the request to AuthorizeNet & returns response.
- _setPostString() — Set the _post_string
public
- getPostString() — Return the post string.
- setLogFile() — Set a log file.
- setSandbox() — Alter the gateway url.