developer:soap-1.4:methods:capturetransaction

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
developer:soap-1.4:methods:capturetransaction [2010/08/30 11:39]
tem
developer:soap-1.4:methods:capturetransaction [2010/08/30 14:15]
irina
Line 107: Line 107:
       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 = "​47001545"; ​
 +
 +            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.4/methods/capturetransaction.txt ยท Last modified: 2010/08/30 16:43 by epouchak

Page Tools