pbAuthorize.Net Installation
-
Download & extract the AuthorizeNet Zip file.
-
Copy the .dll files from the installation folder to your applications
"bin" directory.
-
Copy the license file received via email to your applications "bin" directory.
-
Reference the Assembly in your application
Sample Code
C#
pbAuthorizeNet.AuthorizeNet _pbA = new pbAuthorizeNet.AuthorizeNet();
_pbA.Amount = "19.95";
_pbA.BillAddress = "123 My Street";
_pbA.BillingCity = "AnyTown";
_pbA.BillingState = "AnyState";
_pbA.BillPhones = "800-555-1234";
_pbA.BillZip = "00000";
_pbA.CardExpDate = "10/2005";
_pbA.CardNumber = "1234 1234 1234 1234"
_pbA.Type = pbAuthorizeNet.AuthorizeNet.TransType.AUTH_CAPTURE;
_pbA.TransactionKey = "AuthorizeNet TransKey";
_pbA.Login = "AuthorizeNet Login";
if (_pbA.SubmitTransaction())
{
Label1.Text = "<font
color="#ff0000">Transaction"
+"Approved.</font><br><br>"
+"Approval Code:" +_pbA.ApprovalCode + "<br>"
+"Transaction ID:" + _pbA.TransactionId;
}
else
{
ErrorLabel.Text = "<font color =
"#ff0000">Transaction "
+"Declined.</font><br> <br> "
+_pbA.ResponseCodeText +"<br> "
+_pbA.ResponseReasonText;
}
|