Create settings for Authorize.Net payment processor

To create settings for the Authorize.Net payment processor, you must perform the following:

  1. Create the settings object.
    Create an instance of the AuthorizeNetSettings class.
  2. Set the properties of the instance.
    In this example, the following properties are set:
    • ApiVersion
      Gets or sets the version of the API.
    • PaymentType
      Gets or sets the type of the payment. For more information about the values of this property, see the Payment processors topic.
    • ProcessorCreditCards
      Gets or sets the array of credit card names that are supported by the payment method. For more information about the supported credit card names, see the Payment processors topic.
    • Timeout
      Gets or sets the timeout for post to the payment processor
  3. Check whether the settings are intended for testing.
    If the settings are intended for testing, set the following properties:
    • ProcessingMode
      Gets or sets the processing mode of the payment method. It can have a value of either “test” or “live”.
    • TestLoginId
      Gets or sets the login ID used in test mode.
    • TestTransactionKey
      Gets or sets the transaction key used in test mode.
    • TestUrl
      Gets or sets the URL used in test mode.
    If the settings are intended for real-time use, set the following properties:
    • ProcessingMode
      Gets or sets the processing mode of the payment method. It can have a value of either “test” or “live”.
    • LiveLoginId
      Gets or sets the login ID used in live mode.
    • LiveTransactionKey
      Gets or sets the transaction key used in live mode.
    • LiveUrl
      Gets or sets the URL used in live mode.
    NOTE: The respective properties that have no prefix of "Live-" and "Test-", return the value of the test or the live property depending on the value of the TestMode property.

  4. Serialize the settings into a JSON string.
    Because the PaymentProcessorSettings property of the PaymentMethod class is of type string, you must serialize the settings into a JSON string in order to assign them to a payment method. To do this perform the following:
    1. Create an instance of the JavaScriptSerializer class.
    2. Serialize the settings by calling the Serialize method.
Here is a code example:


Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Web Security for Sitefinity Administrators

The free standalone Web Security lesson teaches administrators how to protect your websites and Sitefinity instance from external threats. Learn to configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?