{% from "_includes/forms" import autosuggestField, textField, passwordField, lightswitchField, editableTableField, booleanMenuField %}

Authorize.net Credentials

{{ autosuggestField({ label: 'API Login ID'|t('commerce'), id: 'apiLoginId', class: 'ltr', name: 'apiLoginId', suggestEnvVars: true, value: gateway.apiLoginId, errors: gateway.getErrors('apiLoginId') }) }} {{ autosuggestField({ label: 'Transaction Key'|t('commerce'), id: 'transactionKey', class: 'ltr', name: 'transactionKey', suggestEnvVars: true, value: gateway.transactionKey, errors: gateway.getErrors('transactionKey') }) }} {{ autosuggestField({ label: 'Public Client Key'|t('commerce'), id: 'publicKey', class: 'ltr', name: 'publicKey', suggestEnvVars: true, value: gateway.publicKey, errors: gateway.getErrors('publicKey') }) }} {{ booleanMenuField({ label: 'Developer Mode'|t('commerce'), id: 'developerMode', name: 'developerMode', yesLabel: 'Yes'|t('commerce'), noLabel: 'No'|t('commerce'), includeEnvVars: true, errors: gateway.getErrors('developerMode'), value: (gateway.developerMode is defined) ? gateway.developerMode : "" }) }}
{{ textField({ label: 'Duplicate Transaction Window'|t('commerce'), instructions: 'In seconds, specify the amount of time that should pass before a transaction is no longer considered a duplicate transaction. If this field is set to 0, no duplicate transaction window will be enforced. The default value of 120 (two minutes) is recommended for all transactions.', id: 'duplicateWindow', class: 'ltr', name: 'duplicateWindow', suggestEnvVars: true, value: ((gateway.duplicateWindow is defined and gateway.duplicateWindow is not empty) or gateway.duplicateWindow == 0) ? gateway.duplicateWindow : 120, errors: gateway.getErrors('duplicateWindow') }) }}
{{ lightswitchField({ label: 'Accept.js'|t('commerce'), id: 'acceptJS', instructions: 'Enable this toggle to use Accept.js. Payment button changes are required unless using the default display below.', class: 'ltr', name: 'acceptJS', errors: gateway.getErrors('developerMode'), on: (gateway.acceptJS is defined) ? gateway.acceptJS : "" }) }}

Authorize.net Refunds

{{ lightswitchField({ label: 'Void if Refund Fails'|t('commerce'), id: 'voidRefunds', instructions: 'Authorize.net does not allow refunds to process until they have settled (around 24 hours). This toggle automatically voids the transaction if the refund fails. The entire transaction will be voided, partial voiding is not possible.', class: 'ltr', name: 'voidRefunds', errors: gateway.getErrors('developerMode'), on: (gateway.voidRefunds is defined) ? gateway.voidRefunds : "" }) }}

Default Payment Form

If you wish to use a custom form as outlined in the documentation, leave each toggle in this section disabled.

{{ lightswitchField({ label: 'Insert the Default Form'|t('commerce'), id: 'insertForm', instructions: 'Insert the default form when cart.gateway.getPaymentFormHtml is called in the checkout template.', class: 'ltr', name: 'insertForm', errors: gateway.getErrors('insertForm'), on: (gateway.insertForm is defined) ? gateway.insertForm : "" }) }} {{ textField({ label: 'Payment Button'|t('commerce'), id: 'paymentButton', instructions: 'Customize the text that appears inside the submit button at the bottom of the form.', class: 'ltr', name: 'paymentButton', value: gateway.paymentButton, errors: gateway.getErrors('paymentButton') }) }} {{ lightswitchField({ label: 'Remove Credit Card Data Before Submission (Accept.js)'|t('commerce'), id: 'disableAcceptData', instructions: 'Only applies when using the default form display in conjunction with Accept.js. See the documentation for additional details.', class: 'ltr', name: 'disableAcceptData', errors: gateway.getErrors('disableAcceptData'), on: (gateway.disableAcceptData is defined) ? gateway.disableAcceptData : "" }) }}

Saved Payment Sources

{{ lightswitchField({ label: 'Save Payment Sources?'|t('commerce'), id: 'savePaymentMethods', instructions: 'Payment sources are saved using the Authorize.net Customer Information Manager (CIM). CIM must be enabled inside Authorize.net prior to enabling this feature. After enabling stored payment sources, the only credit card information stored in the database will be the last four digits of the card number so that the card can be identified later (if Accept.js is not enabled).

WARNING: If this feature is disabled after payment sources are saved, an error will be thrown if the customer tries to use or modify the payment source. You may wish to run a database backup and then manually clear the Payment Sources database table before disabling this feature.', class: 'ltr', name: 'savePaymentMethods', errors: gateway.getErrors('savePaymentMethods'), on: (gateway.savePaymentMethods is defined) ? gateway.savePaymentMethods : "" }) }} {{ textField({ label: 'Saved Payment Method Label Prefix'|t('commerce'), id: 'savedCardPrefix', instructions: "Enter the text that should appear before the last four digits of the credit card number in the payment selector (i.e. 'Saved Card - x' will result in 'Saved Card - x9999'). If left blank, only the last 4 digits will appear. Payment methods that have already been stored will not be affected by this field change. If Accept.js is enabled, the last four digits of the card number will not be appended to this label. If the description field is filled by the customer, it will override the card name set in this field.", class: 'ltr', name: 'savedCardPrefix', value: gateway.savedCardPrefix, errors: gateway.getErrors('savedCardPrefix') }) }}

Note: If Accept.js is enabled, a separate profile will be created for each payment source stored inside Authorize.net. See the documentation for additional details.


Questions or Suggestions?

Create a ticket in Github, or email our support team at hello@digitalpros.co.