developer:soap-1.1:methods:runauthonly

Differences

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

Link to this comparison view

developer:soap-1.1:methods:runauthonly [2009/06/24 13:28]
charlie created
developer:soap-1.1:methods:runauthonly [2010/09/29 13:23] (current)
irina
Line 100: Line 100:
             MsgBox("​Transaction Error, Reason: " & response.Error)             MsgBox("​Transaction Error, Reason: " & response.Error)
         End If         End If
 +</​code>​
 +
 +==== .NET C# ====
 +<code c>
 +usaepay.TransactionRequestObject tran = new usaepay.TransactionRequestObject();​
 +
 +            tran.Command = "​cc:​authonly";​
 +            tran.Details = new usaepay.TransactionDetail();​
 +            tran.Details.Amount = 1.00;
 +            tran.Details.AmountSpecified = true;
 +            tran.Details.Invoice = "​1234";​
 +            tran.Details.Description = "​Example Transaction";​
 +
 +            tran.CreditCardData = new usaepay.CreditCardData();​
 +            tran.CreditCardData.CardNumber = "​4444555566667779";​
 +            tran.CreditCardData.CardExpiration = "​1212";​
 +
 +            usaepay.TransactionResponse response = new usaepay.TransactionResponse();​
 +
 +            try
 +            {
 +                response = client.runTransaction(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>​ </​code>​
  
developer/soap-1.1/methods/runauthonly.txt ยท Last modified: 2010/09/29 13:23 by irina

Page Tools