Installation

DLAuthorizeNet

support@dltechnologies.com


Requirements
  • AuthorizeNet Account
  • .Net 1.1 Framework

Installation

 DLAuthorizeNet is shipped in a single ZIP file. To install, extract the DLL and the help files into a directory you specified. Copy the dll into your bin directory of your .net application. Add a reference to the dll by right mouse clicking on References in the Solution Explorer and selecting Add Reference. When the component has been registered you will receive a license file which you place in the bin directory along with the DLL. You will then be able to run the component in "Live" mode.

AuthorizeNet.Com Account settings

Be sure you do the following within your AuthorizeNet account. Do the following:

  1. Log in-to the Merchant Interface
  2. Select Settings from the Main Menu
  3. Click Direct Response from the Transaction Response section
  4. Configure the settings:
    1. Set Delimited Response to Yes
    2. Choose the Default Delimited Separator from the drop-down box. “Comma Delimited”
    3. Make sure the Field Encapsulation Character from the drop-down box is set to the blank selection. i.e., no encapsulation
  5. Click Submit to save changes


Getting Started

DLAuthorizeNet - Getting Started

Using DLAuthorizeNet.Connect in VB.NET is easy.

  1. Add DLAuthorizeNet reference to your application.
  2. Create the DLAuthorizeNet.Connect Object
  3. Set Data Properties for Posting
  4. Call DoSSLPost and check Return Code for Success or Failure
  5. Get NewTransactionReferenceNumber and NewReferenceAuthorizationCode if success.
  6. Get ErrorCode and ErrorMessage if Failure

1. Creating the DLAuthorizeNet.Connect Object

To create the DLAuthorizeNet.Connect object do the following in your application:

Dim MyObj As New DLAuthorizeNet.Connect()

2. Calling DoSSLPost

First you will need to set the data properties of the transaction you will be processing. The main functionality of the Connect Object is centered in the DoSSLPost method. This method takes one argument and returns a boolean True if successful or False if Failed. The argument passed is the ChargeType which is enumerated for easier coding. There are 5 Charge types which can be processed:
1 - Sale Charge
2 - Pre Authorization
3 - Post Authorization
4 - Void
5 - Credit

Here is an example call to the DoSSLPost function:

(NOTE: If you did not register with DL Technologies then the transaction will be posted in "Test" mode only.)

Dim objAuth As New DLAuthorizeNet.Connect()
Dim rc As Boolean = False

With objAuth
.Login = "tester"
.Amount = "30.00"
.BillAddr1 = "16969 Von Karman Ave."
.BillCity = "Irvine"
.BillState = "CA"
.BillCountry = "US"
.BillName = "Larry Tester"
.BillZip = "92606"
.BillPhone = "949 253-9444"
.CCCardNumber = "4007000000027"
.CCExpMonth = "02"
.CCExpYear = "2005"
.Description = "Test Posting"
.Mode = DLAuthorizeNet.AuthMode.Test
.InvoiceNumber = "1001"

End With

rc = objAuth .DoSSLPost(DLAuthorizeNet.ChargeType.PreAuth)

If rc = False Then
'FAILURE
lblErrorMessage.Text = objAuth .ErrorMessage
lblErrorNumber.Text = objAuth.ErrorCode
Else
'SUCCESS
lblAuthNumber.Text = objAuth .NewTransactionAuthorizationCode
lblRefNumber.Text = objAuth .NewTransactionReferenceNumber
End If

Note 1: We recommend that you either set your Authorize.Net account in "TEST" mode or set the Mode property to TestMode during the implementation stage. If you have not registered the DLL with DL Technologies, it will be automatically put in "TEST" mode.
Note 2: If your account is not available yet, you can use the test account by setting Login Property to "testing" to ensure that you have established a connection to Authorize.Net. If you do this, the actual transaction won't be processed, but you will get a response back as if it had been processed.

3. Checking the Results

The ReturnCode from the DoSSLPost method needs to be analyzed for success or failure. The Error Code, as shown in the table below, indicates the general state of the transaction. The general states indicated by the Response Code are approval, decline, or error.

A Good Example

Here is a more complete example, putting all the pieces together:

'Create the object

Dim objAuth As New
                    DLAuthorizeNet.Connect()
Dim rc As Boolean = False

'Set the Data Properties

With objAuth
.Login = "testing"
.Amount = "30.00"
.BillAddr1 = "16969 Von Karman Ave."
.BillCity = "Irvine"
.BillState = "CA"
.BillCountry = "US"
.BillName = "Larry Tester"
.BillZip = "92606"
.BillPhone = "949 253-9444"
.CCCardNumber = "4007000000027"
.CCExpMonth = "02"
.CCExpYear = "2005"
.Description = "Test Posting"
.Mode = DLAuthorizeNet.AuthMode.Test
.InvoiceNumber = "1001"
End With

'Send the transaction to process and check the return code

rc = objAuth.DoSSLPost(DLAuthorizeNet.ChargeType.PreAuth)

If rc = False Then
'FAILURE
Response.Write("I am sorry but the transaction could not be approved: " & objAuth.ErrorMessage)

Else
'SUCCESS
lblAuthNumber.Text = objAuth.NewTransactionAuthorizationCode
lblRefNumber.Text = objAuth.NewTransactionReferenceNumber

Response.Write("Thank you for your purchase.")
End If

Test credit card numbers

Because a payment processor is never contacted in test mode, all properly formatted transactions appear to be approved. There are many situations, however, where a developer will need the system not to approve transactions or to generate errors in order to test all possible responses from the system.

Any of the following card numbers can be used to run tests on your Authorize.Net account. It must be noted that these are not real card accounts, and will not generate an approval if your account is in live mode. They will return a decline in live mode, and an approval in test mode (with the exception of credit type transactions-please see the note below). Use any expiration date after the current day's date.

370000000000002 | American Express Test Card
6011000000000012 | Discover Test Card
5424000000000015 | MasterCard Test Card
4007000000027 | Visa Test Card


Properties

Methods

Public Methods

DoSSLPost Posts the transaction to AuthorizeNet

See Also

DLAuthorizeNet Properties


Methods - DoSSLPost
public Boolean DoSSLPost(sChargeType:emum)

Posts the transaction to AuthorizeNet. Returns True if successful or False if declined or error.

sChargeType : Enumerated

Member | Description
SaleCharge | Transactions of this type will be sent for authorization. The transaction will be automatically picked up for settlement if approved.
PreAuth | Transactions of this type are submitted if the merchant wishes to validate the credit card for the amount of the goods sold. If the merchant does not have goods in stock or wishes to review orders before shipping the goods, this transaction type should be submitted. The gateway will send this type of transaction to the financial institution for approval. However this transaction will not be sent for settlement. If the merchant does not act on the transaction within 30 days, the transaction will no longer be available for capture
PostAuth | This transaction is used to request settlement for a transaction that was previously submitted as an AUTH_ONLY.
Void | This transaction is an action on a previous transaction and is used to cancel the previous transaction and ensure it does not get sent for settlement.
Credit | This transaction is also referred to as a “Refund” and indicates to the gateway that money should flow from the merchant to the customer.

Remarks

Will be forced to Test mode if the component has not been registered and a license has not been issued.


Properties

Public Properties

Amount | Charge Amount
BillAddr1 | Billing Address 1
BillAddr2 | Billing Address 2 (Optional)
BillCity | Billing City (Optional)
BillCountry | Billing Country (Optional)
BillEmail | Billing Email (Optional)
BillName | Billing Name on Credit Card
BillPhone | Billing Phone
BillState | Billing State
BillZip | Billing Zip Code
CCCardNumber | Credit Card Number
CVV | 3 or 4 digit Number on back of Credit Card (Optional)
CCExpMonth | 2 digit CC Expiration Month
CCExpYear | 2 digit CC Expiration Year
Description | Transaction Description - Optional
Login | AuthorizeNet Account Login - Required
Mode | 0 - Test 1 - Live
Password | AuthorizeNet Account Password. Check Authorize.net settings to see if required within your account.
InvoiceNumber | Cannot be a duplicate Invoice Number within your account
TransactionReferenceNumber | Used for Post Auth and Credit Charge Types

Return Code Properties
NewTransactionReferenceNumber | Authorization Transaction ID from AuthorizeNet
NewTransactionAuthorizationCode | The Six-digit alphanumeric authorization or approval code from AuthorizeNet
ErrorCode | Indicates the result of the transaction. 1 = Approved 2 = Declined 3 = Error
ErrorMessage | AuthorizeNet Error Message

See Also

DLAuthorizeNet Methods


Properties - Amount
public Double Amount {get; set;}

Gets and sets the total Transaction Amount.

Remarks

This is the Total Amount being charged.


Properties - BillAddr1
public String BillAddr1 {get; set;}

Gets and sets the address of the customer associated with the billing address for the transaction.

Remarks

This field is optional but may be used by AuthorizeNet for verification.


Properties - BillAddr2
public String BillAddr2 {get; set;}

Gets and sets any additional address information of the customer associated with the billing address for the transaction.

Remarks

This field is optional.


Properties - BillCity
public String BillCity {get; set;}

Gets and sets the Billing City of the customer associated with the billing address for the transaction.

Remarks

This field is optional.


Properties - BillCountry
public String BillCountry {get; set;}

Gets and sets the country of the customer associated with the billing address for the transaction.

Remarks

Any Valid two-digit country code or full country name. This field is optional.


Properties - BillEmail
public String BillEmail {get; set;}

Gets and sets the E-Mail Address of the customer associated with the billing address for the transaction.

Remarks

Used for AuthorizeNet logging purposes. This field is optional.


Properties - BillName
public String BillName {get; set;}

Gets and sets the Billing Name of the customer associated with the billing address for the transaction.

Remarks

Format is First Name and Last Name.


Properties - BillPhone
public String BillPhone {get; set;}

Gets and sets the Billing Phone number of the customer associated with the billing address for the transaction.

Remarks

This field is optional.


Properties - BillState
public String BillState {get; set;}

Gets and sets the Billing state of the customer associated with the billing address for the transaction.

Remarks

This field is optional. Any valid two-digit state code or full state name.


Properties - BillZip
public String BillZip {get; set;}

Gets and sets the Billing Zip Code of the customer associated with the billing address for the transaction.

Remarks

This field is optional.


Properties - CCCardNumber
public String CCCardNumber {get; set;}

Gets and sets the Credit Card Number.

Remarks

This field is required.


Properties - CCExpMonth
public String CCExpMonth {get; set;}

Gets and sets the two digit month on which the credit card expires.

Remarks

This field is required.


Properties - CCExpYear
public String CCExpYear {get; set;}

Gets and sets the two or four digit year on which the credit card expires.

Remarks

This field is required.


Properties - CVV
public String CVV {get; set;}

Gets and sets the three or four digit number on the back of a credit card (on front of American Express).

Remarks

This field is optional. Some merchant accounts require this field. Check with your merchant account holder.


Properties - Description
public String Description {get; set;}

Gets and sets the description of the transaction.

Remarks

This field is optional.


Properties - ErrorCode
public String ErrorCode{get;}

Indicates the result of the transaction:

1 = Approved
2 = Declined
3 = Error

Remarks


Properties - ErrorMessage
public String ErrorMessage{get;}

Gets a brief description of the result.

Remarks

This field will display declined information such as "zip code does not match credit card information".


Properties - InvoiceNumber
public String InvoiceNumber {get; set;}

Gets and sets the merchant assigned invoice number.

Remarks

This field is required.


Properties - Login
public String Login {get; set;}

Gets and sets login ID used for AuthorizeNet .

Remarks

This field is required.


Properties - Mode
public Enumerated Mode {get; set;}

Gets and sets the transaction mode to be processed. Either Live or Test.

Remarks

Enumerated - "Live" or "Test"

Will be forced to Test mode if the component has not been registered and a license has not been issued.
This field is optional. The Live or Test mode setting within the Authorize.net settings will overide this value if it is set to Test mode.


Properties - NewTransactionAuthorizationCode
public String NewTransactionAuthorizationCode{get;}

Gets six-digit alphanumeric authorization or approval code.

Remarks


Properties - NewTransactionReferenceNumber
public String NewTransactionReferenceNumber {get;}

Gets the number of the transaction in the system and can be used to submit a modification of this transaction at a later time, such as voiding, crediting or capturing the transaction.

Remarks

Returned on accepted transactions.


Properties - Password
public String Password {get; set;}

Not used by AuthorizeNet anymore.

Remarks

This field is not used. Will be removed in future release.


Properties - TransactionReferenceNumber
public String CCExpMonth {get; set;}

Gets and sets the ID of a transaction previously authorized by the AuthorizeNet Gateway.

Remarks

This field is optional. Required if the transaction type is Credit or Void.


DLAuthorizeNet

Getting Support

DL Technologies
2915 Redhill Ave.
Suite A210A
Costa Mesa, CA 92626

Phone (714) 428-0500
http://www.dltechnologies.com

support@dltechnologies.com

Register DLAuthorizeNet