developer:soap-1.1:methods:runtransaction

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:soap-1.1:methods:runtransaction [2009/07/02 10:28]
tem
developer:soap-1.1:methods:runtransaction [2010/10/04 14:55]
irina
Line 105: Line 105:
 MsgBox("​Reference Number: " & response.RefNum) MsgBox("​Reference Number: " & response.RefNum)
 </​code>​ </​code>​
 +
 +==== .NET C# ====
 +<code c>
 +usaepay.TransactionRequestObject tran = new usaepay.TransactionRequestObject(); ​           ​
 +            tran.Command = "​cc:​sale";​
 +
 +            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>​
 +
 ==== XML ==== ==== XML ====
  
developer/soap-1.1/methods/runtransaction.txt ยท Last modified: 2010/10/04 14:55 by irina

Page Tools