developer:soap-1.3:methods:runsale

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
developer:soap-1.3:methods:runsale [2010/08/06 11:42]
epouchak
developer:soap-1.3:methods:runsale [2010/08/25 15:08] (current)
epouchak
Line 128: Line 128:
 } }
 </​code>​ </​code>​
- 
- 
 ==== VB.NET ==== ==== VB.NET ====
  
Line 135: Line 133:
  
 <code vb> <code vb>
 + Dim client As usaepay.usaepayService = New usaepay.usaepayService
 +        Dim token As usaepay.ueSecurityToken
 +
 +        token = Me.CreateToken("​rGzC0rJ8B9RDj8Wm96GrYokgZIRe4eWF",​ "​1234"​)
 +
 +
  
-        Dim tran As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject+        Dim transaction ​As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject
  
-        ​tran.CreditCardData = New usaepay.CreditCardData +        ​transaction.CreditCardData = New usaepay.CreditCardData 
-        ​tran.CreditCardData.CardNumber = "​4444555566667779"​ +        ​transaction.CreditCardData.CardNumber = "​4444555566667779"​ 
-        ​tran.CreditCardData.CardExpiration = "​0913"​ +        ​transaction.CreditCardData.CardExpiration = "​0913"​ 
-        ​tran.CreditCardData.CardCode = "​999"​+        ​transaction.CreditCardData.CardCode = "​999"​
  
-        ​tran.Details = New usaepay.TransactionDetail +        ​transaction.Details = New usaepay.TransactionDetail 
-        ​tran.Details.Amount = 9.02 +        ​transaction.Details.Amount = 9.02 
-        ​tran.Details.AmountSpecified = True +        ​transaction.Details.AmountSpecified = True 
-        ​tran.Details.Invoice = "​434534"​ +        ​transaction.Details.Invoice = "​434534"​ 
-        ​tran.Details.Description = "​Example transaction"​+        ​transaction.Details.Description = "​Example transaction"​
  
         Dim response As usaepay.TransactionResponse         Dim response As usaepay.TransactionResponse
  
-        response = client.runSale(token, ​tran)+        response = client.runSale(token, ​transaction)
  
         If response.ResultCode = "​A"​ Then         If response.ResultCode = "​A"​ Then
-            MsgBox("​Transaction Approved, ​Refernce ​Number: " & response.RefNum)+            MsgBox("​Transaction Approved, ​Reference ​Number: " & response.RefNum ​& vbLf _ 
 +                        & "AVS Result: " & response.AvsResult)
         ElseIf response.ResultCode = "​D"​ Then         ElseIf response.ResultCode = "​D"​ Then
             MsgBox("​Transaction Declined, Reason: " & response.Error)             MsgBox("​Transaction Declined, Reason: " & response.Error)
Line 240: Line 245:
 </​SOAP-ENV:​Envelope>​ </​SOAP-ENV:​Envelope>​
 </​code>​ </​code>​
- 
developer/soap-1.3/methods/runsale.txt · Last modified: 2010/08/25 15:08 by epouchak

Page Tools