developer:soap-1.3:methods:runquicksale

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:runquicksale [2010/08/06 12:18]
epouchak
developer:soap-1.3:methods:runquicksale [2010/08/26 15:24]
irina
Line 100: Line 100:
 } }
 </​code>​ </​code>​
- 
 ==== VB ==== ==== VB ====
 <code vb> <code vb>
     Dim client As usaepay.usaepayService = New usaepay.usaepayService     Dim client As usaepay.usaepayService = New usaepay.usaepayService
-    ​Dim token As usaepay.ueSecurityToken+        ​Dim token As usaepay.ueSecurityToken
  
-    ​token = Me.CreateToken("​982lz9VsLm87MA54Sv8E582h8OZMArL6", "443311")+        ​token = Me.CreateToken("​rGzC0rJ8B9RDj8Wm96GrYokgZIRe4eWF", "1234")
  
-    Dim refnum As Integer 
-    Dim details As usaepay.TransactionDetail = New usaepay.TransactionDetail 
-    Dim authonly As Boolean 
  
-    ​refnum ​= "​46352757"​ +        Dim refnum ​As Integer 
-    details.Amount ​"34.50" +        ​Dim ​details ​As usaepay.TransactionDetail ​New usaepay.TransactionDetail 
-    ​details.AmountSpecified = True +        Dim authonly As Boolean
-    details.Description = "​Example QuickSale"​ +
-    details.Invoice = "​123456"​+
  
-    authonly ​False+        refnum ​"​46990567"​ 
 +        details.Amount = "​34.50"​ 
 +        details.AmountSpecified = True 
 +        details.Description = "​Example QuickSale"​ 
 +        details.Invoice = "​123456"​
  
-    Dim response As usaepay.TransactionResponse+        authonly = False
  
-    ​response ​= client.runQuickSale(token,​ refnum, details, authonly)+        Dim response ​As usaepay.TransactionResponse
  
-    ​If response.ResultCode = "​A"​ Then +        response = client.runQuickSale(token,​ refnum, details, authonly) 
-      MsgBox("​Transaction Approved, ​Reference ​Number: " & response.RefNum) + 
-    ElseIf response.ResultCode = "​D"​ Then +        ​If response.ResultCode = "​A"​ Then 
-      MsgBox("​Transaction Declined, Reason: " & response.Error) +            MsgBox("​Transaction Approved, ​Refernce ​Number: " & response.RefNum) 
-    Else +        ElseIf response.ResultCode = "​D"​ Then 
-      MsgBox("​Transaction Error, Reason: " & response.Error) +            MsgBox("​Transaction Declined, Reason: " & response.Error) 
-    End If+        Else 
 +            MsgBox("​Transaction Error, Reason: " & response.Error) 
 +        End If
 </​code>​ </​code>​
 +
 +==== .NET C# ====
 +<code c>
 +usaepay.TransactionDetail details = new usaepay.TransactionDetail();​
 +
 +            string refnum;
 +            bool authonly;
 +
 +            refnum = "​46973415";​
 +            authonly = false;
 +
 +            details.Amount = 34.50;
 +            details.AmountSpecified = true;
 +            details.Description = "​Example QuickSale";​
 +            details.Invoice = "​123456";​
 +
 +            usaepay.TransactionResponse response = new usaepay.TransactionResponse();​
 +
 +            try
 +            {
 +                response = client.runQuickSale(token,​ refnum, details, authonly);
 +
 +                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.3/methods/runquicksale.txt · Last modified: 2010/08/26 15:24 by irina

Page Tools