developer:soap-1.3: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
Next revision
Previous revision
developer:soap-1.3:methods:capturetransaction [2010/08/06 16:11]
epouchak
developer:soap-1.3:methods:capturetransaction [2010/08/26 15:48]
irina
Line 106: Line 106:
     End If     End If
 </​code>​ </​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 = "​46998377"; ​
 +
 +            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>​
 +
 ==== XML ==== ==== XML ====
  
 <code xml> <code xml>
 <?xml version="​1.0"​ encoding="​UTF-8"?>​ <?xml version="​1.0"​ encoding="​UTF-8"?>​
-<​SOAP-ENV:​Envelope xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/"​ xmlns:​ns1="​urn:​usaepay"​ xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema"​ xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance"​ xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/"​ SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​+<​SOAP-ENV:​Envelope xmlns:​SOAP-ENV="​http://​schemas.xmlsoap.org/​soap/​envelope/" ​ 
 +xmlns:​ns1="​urn:​usaepay"​ xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema"​ xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance" ​ 
 +xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/"​ SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​
 <​SOAP-ENV:​Body>​ <​SOAP-ENV:​Body>​
 <​ns1:​captureTransaction>​ <​ns1:​captureTransaction>​
developer/soap-1.3/methods/capturetransaction.txt · Last modified: 2010/08/26 15:48 by irina

Page Tools