developer:soap-1.1:methods:runcheckcredit

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developer:soap-1.1:methods:runcheckcredit [2009/06/24 13:31]
charlie created
developer:soap-1.1:methods:runcheckcredit [2010/10/21 11:28]
irina
Line 27: Line 27:
  
 ===== Examples ===== ===== Examples =====
 +==== .NET VB ====
 +<code vb>
 +Dim transaction As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject
 +
 +        transaction.CheckData = New usaepay.CheckData
 +        transaction.CheckData.Account = "​1112223333"​
 +        transaction.CheckData.Routing = "​123456789"​
 +        transaction.CheckData.DriversLicense = "​D5555555"​
 +        transaction.CheckData.DriversLicenseState = "​CA"​
 +
 +        transaction.Details = New usaepay.TransactionDetail
 +        transaction.Details.Amount = "​1.00"​
 +        transaction.Details.AmountSpecified = True
 +        transaction.Details.Invoice = "​55555"​
 +        transaction.Details.Description = "Test Check Sale"
 +
 +        transaction.AccountHolder = "Test Guy"
 +
 +        Dim response As usaepay.TransactionResponse
 +
 +        response = client.runCheckCredit(token,​ transaction)
 +
 +        If response.ResultCode = "​A"​ Then
 +            MsgBox("​Transaction Approved, Reference Number: " & response.RefNum)
 +        ElseIf response.ResultCode = "​D"​ Then
 +            MsgBox("​Transaction Declined, Reason: " & response.Error)
 +        Else
 +            MsgBox("​Transaction Error, Reason: " & response.Error)
 +        End If
 +
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +usaepay.TransactionRequestObject tran = new usaepay.TransactionRequestObject();​
 +
 +            tran.Details = new usaepay.TransactionDetail();​
 +            tran.Details.Amount = 1.00;
 +            tran.Details.AmountSpecified = true;
 +            tran.Details.Invoice = "​1234";​
 +            tran.Details.Description = "​Sample Check Credit";​
 +
 +            tran.CheckData = new usaepay.CheckData();​
 +            tran.CheckData.Account = "​1112223333";​
 +            tran.CheckData.Routing = "​123456789";​
 +            tran.CheckData.DriversLicense = "​D5555555";​
 +            tran.CheckData.DriversLicenseState = "​CA";​
 +
 +            tran.AccountHolder = "Test Guy";
 +
 +            usaepay.TransactionResponse response = new usaepay.TransactionResponse();​
 +
 +            try
 +            {
 +                response = client.runCheckCredit(token,​ tran);
 +
 +                if (response.ResultCode == "​A"​)
 +                {
 +                    MessageBox.Show(string.Concat("​Transaction Approved, RefNum: ",
 +                    response.RefNum));​
 +                }
 +                else
 +                {
 +                    MessageBox.Show(string.Concat("​Transaction Failed: ",
 +                    response.Error));​
 +                }
 +            }
 +            catch (Exception err)
 +            {
 +                MessageBox.Show(err.Message);​
 +
 +            }
 +</​code>​
 +
  
 ===== Change History ===== ===== Change History =====
developer/soap-1.1/methods/runcheckcredit.txt ยท Last modified: 2010/10/21 11:28 by irina

Page Tools