Primal Blue Software, Inc. home | contact us | client login | site map
 



pbAuthorize.Net Installation

  1. Download & extract the AuthorizeNet Zip file.
  2. Copy the .dll files from the installation folder to your applications "bin" directory.
  3. Copy the license file received via email to your applications "bin" directory.
  4. 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;