developer:soap-1.2:methods:capturetransaction

Differences

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

Link to this comparison view

developer:soap-1.2:methods:capturetransaction [2010/02/12 10:38]
epouchak created
developer:soap-1.2:methods:capturetransaction [2010/09/15 16:08] (current)
irina
Line 105: Line 105:
       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.Details = new usaepay.TransactionDetail();​
 +            tran.Details.Amount = 1.00;
 +            tran.Details.AmountSpecified = true;
 +            tran.Details.Invoice = "​123456";​
 +
 +            tran.RefNum = "​47027878"; ​
 +
 +            usaepay.TransactionResponse response = new usaepay.TransactionResponse();​
 +
 +            try
 +            {
 +                response = client.captureTransaction(token,​ tran.RefNum,​ tran.Details.Amount);​
 +
 +                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.2/methods/capturetransaction.txt ยท Last modified: 2010/09/15 16:08 by irina

Page Tools