SharpAuthorize component helps to easily add credit card processing through Authorize.NET to your ASP.NET website or desktop application written in C# or VB.NET. Whether you simply need the minimum level of integration with Authorize.net's AIM API or need access to every attribute, SharpAuthorize has you covered.
After downloading the component, add it to your visual studio project.
Next, create a GUI to accept credit card number, expiry date and CV code.
Add a Command Button (btnAuthorize).
Add the following code to command button click event.
MinimumCreditCard authNet = new MinimumCreditCard()
.Login("loginid") // your authorize.net login id
.TranKey("transkey") // your authorize.net transaction key for test account
.Type(TranType.AUTH_CAPTURE)
.CardNum(cardnumber.Text)
.CardCode("123")
.ExpDate(expdate.Text)
.Amount(Convert.ToDouble(amount.Text));
this.Cursor = Cursors.WaitCursor;
if (authNet.Authorize())
{
// Here, use the authNet.Response instance to retrieve transaction data;
// you can retrieve data with response instance properties
// for example,
//authNet.Response.AccountNumber
//authNet.Response.BillingAddress
//authNet.Response.Company
//authNet.Response.InvoiceNumber
// and so on
}
txtresponse.Text = authNet.Response.ReasonText;
this.Cursor = Cursors.Default;
That is all!
Questions & Comments