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:


Want to learn more?

Sign up for our free beginner training. Boost your credentials through advanced courses and certification.
Register for Sitefinity training and certification.

Was this article helpful?