Thanks so much!!!! I might have a few more questions in a few days!!
LuckyInc
Main Topics
Browse All TopicsHow do you create the AuthorizeNet Exception Class and or additional classes such as Address??
for this question
http://www.experts-exchang
Public Structure Address
Dim Address As String
Dim City As String
Dim State As String
Dim ZipCode As String
Dim EnteredBy As String
Dim LastModifiedBy As String
Dim LastModifiedDateTime As Date
End Structure
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: AerosSagaPosted on 2005-04-07 at 13:53:23ID: 13731051
Public Class CreditCardException
Exception
---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---- ions
Inherits Exception
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal exception As String)
MyBase.New(exception)
End Sub
End Class
Public Class BankTransferException
Inherits Exception
Public Sub New()
MyBase.New()
End Sub
Public Sub New(ByVal exception As String)
MyBase.New(exception)
End Sub
End Class
Public Class AuthorizeNetException
Inherits Exception
Public Sub New()
End Sub
Public Sub New(ByVal message As String)
MyBase.New(message)
End Sub
End Class
Public Class PaymentCustomerInformation
Inherits Exception
Public Sub New()
End Sub
Public Sub New(ByVal message As String)
MyBase.New(message)
End Sub
End Class
Public Class AddressException
Inherits Exception
Public Sub New()
End Sub
Public Sub New(ByVal message As String)
MyBase.New(message)
End Sub
End Class
--------------------------
Imports System.Text.RegularExpress
Imports System.Data.SqlClient
'This Address class differs from the one in the Customer class for reasons pertaining to
' Authorize.NET transactions (including the removal / addition of some fields as well as
' changing lengths of fields
Public Class Address
Friend _FirstName As String
Friend _LastName As String
Friend _Company As String
Friend _Address As String
Friend _City As String
Friend _State As String
Friend _Zip As String
#Region " Properties "
Public Property FirstName() As String
Get
Return _FirstName
End Get
Set(ByVal Value As String)
If Not Regex.IsMatch(Value, "^[A-Za-z ]{1,50}$") Then
Throw New AddressException("The first name must consist of letters and spaces not exceeding 50 characters in length.")
End If
_FirstName = Value
End Set
End Property
Public Property LastName() As String
Get
Return _LastName
End Get
Set(ByVal Value As String)
If Not Regex.IsMatch(Value, "^[A-Za-z\- ]{1,50}$") Then
Throw New AddressException("The last name must consist of letters and spaces not exceeding 50 characters in length.")
End If
_LastName = Value
End Set
End Property
Public Property Company() As String
Get
Return _Company
End Get
Set(ByVal Value As String)
If Not Regex.IsMatch(Value, "^[A-Za-z0-9\.&\- ]{1,50}$") Then
Throw New AddressException("The company must consist of letters and spaces not exceeding 50 characters in length.")
End If
_Company = Value
End Set
End Property
Public Property Address() As String
Get
Return _Address
End Get
Set(ByVal Value As String)
If Not Regex.IsMatch(Value, "^[A-Za-z0-9\.,#\- ]{1,60}$") Then
Throw New AddressException("The address field must consist of letters and spaces not exceeding 60 characters in length.")
End If
_Address = Value
End Set
End Property
Public Property City() As String
Get
Return _City
End Get
Set(ByVal Value As String)
If Not Regex.IsMatch(Value, "^[A-Za-z0-9\.\- ]{1,40}$") Then
Throw New AddressException("The city must consist of letters and spaces not exceeding 50 characters in length.")
End If
_City = Value
End Set
End Property
Public Property State() As String
Get
Return _State
End Get
Set(ByVal Value As String)
'If Not Regex.IsMatch(Value, "^[A-Za-z]{2}$") Then
'Throw New AddressException("The state must consist of two letters.")
'End If
_State = Value
End Set
End Property
Public Property Zip() As String
Get
Return _Zip
End Get
Set(ByVal Value As String)
'If Not Regex.IsMatch(Value, "^\d{5}(-\d{4})?$") Then
'Throw New AddressException("The zip must consist of five digits.")
'End If
_Zip = Value
End Set
End Property
#End Region
#Region " Constructors "
Friend Sub New()
End Sub
Public Sub New(ByVal FirstName As String, ByVal LastName As String, ByVal Address As String, _
ByVal City As String, ByVal State As String, ByVal Zip As String)
Me.FirstName = FirstName
Me.LastName = LastName
Me.Address = Address
Me.City = City
Me.State = State
Me.Zip = Zip
End Sub
Public Sub New(ByVal Company As String, ByVal Address As String, ByVal City As String, _
ByVal State As String, ByVal Zip As String)
Me.Company = Company
Me.Address = Address
Me.City = City
Me.State = State
Me.Zip = Zip
End Sub
#End Region
End Class
HTH's