Introduction
The Authorize.Net Config ($config) is an associative array; it is populated by the properties from the Feed Object . It is used to ensure hooks which were available in the pre-framework versions of the plugin remain backwards compatible, simply making the new Feed Object available to these hooks instead could break existing code.
$config = array(
'id' => 5,
'form_id' => 10,
'is_active' => true,
'meta' => array(),
);
Usage
We recommend accessing the $config properties using the rgar() or rgars() functions, e.g.:
$meta = rgar( $config, 'meta' );
$conditional_logic_enabled = rgars( $config, 'meta/authorizenet_conditional_enabled' );
Properties
Parameter Type Description idinteger The feed ID. form_idinteger The form ID this feed was created for. is_activeboolean Is the feed active or inactive. Default is true. metaarray Config meta is an associative array. See below for the available properties.
Parameter Type Description typestring The type of transaction which should occur when the feed is processed. Possible values: product or subscription. customer_fieldsarray An associative array containing the Customer Fields Properties . enable_receiptboolean Send Authorize.Net email receipt? Default is false. api_settings_enabledboolean Override the default API settings? Default is false. api_modestring Which mode should this feed use when overriding the default API settings. Possible values: production or test. api_loginstring The API login ID to use when overriding the default API settings. api_keystring The API transaction key to use when overriding the default API settings. authorizenet_conditional_enabledboolean Is the feed condition (conditional logic) setting enabled. Default is false. authorizenet_conditional_field_idinteger Target field Id. Field that will have it’s value compared with the authorizenet_conditional_value property to determine if this rule is a match. authorizenet_conditional_operatorstring Operator to be used when evaluating this rule. Possible values: is, isnot, >, <, contains, starts_with, or ends_with. authorizenet_conditional_valuestring The value to compare with field specified by authorizenet_conditional_field_id .
The following properties are only applicable when the type is set to subscription .
Parameter Type Description recurring_amount_fieldstring What to use for the recurring amount. Possible values: form_total or a product field ID billing_cycle_numberinteger How often should the recurring payment occur. Minimum values: 7 days or 1 month . Maximum values: 365 days or 12 months. billing_cycle_typestring What unit to use with the billing_cycle_number . Possible values: day or month. recurring_timesinteger How many times the recurring payment should be made. The default (0) is to bill the customer until the subscription is canceled. setup_fee_enabledboolean Should a setup fee be charged? Default is false. setup_fee_amount_fieldstring The ID of the product field containing the amount the user should be charged for the setup fee. trial_period_enabledboolean Should the recurring charge occur immediately or after a trial period? Default false. trial_period_numberinteger The duration of the trial. Default value: 1. trial_amountstring The amount the user should be charged during the trial if enter_amount is selected for the trial_product . update_post_actionstring Change the post status when a subscription is canceled? Possible values: draft or delete.
Customer Fields Properties
Parameter Type Description emailstring The ID of the field containing the customer’s email. address1string The ID of the field containing the first line of the customer’s address. address2string The ID of the field containing the second line of the customer’s address. citystring The ID of the field containing the city of the customer’s address. statestring The ID of the field containing the state of the customer’s address. zipstring The ID of the field containing the zip of the customer’s address. countrystring The ID of the field containing the country of the customer’s address.