developer:soap-1.3:methods:runtransaction

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:runtransaction [2010/08/06 11:31]
epouchak
developer:soap-1.3:methods:runtransaction [2010/08/25 15:00]
epouchak
Line 127: Line 127:
 } }
 </​code>​ </​code>​
- 
 ==== Visual Basic (.Net) ==== ==== Visual Basic (.Net) ====
  
Line 133: Line 132:
  
 <code vb> <code vb>
-Dim tran As usaepay.TransactionRequestObject = New usaepay.TransactionRequestObject+ 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 
 + 
 +        tran.CreditCardData = New usaepay.CreditCardData 
 +        tran.CreditCardData.CardNumber = "​4444555566667779"​ 
 +        tran.CreditCardData.CardExpiration = "​0913"​ 
 +        tran.CreditCardData.CardCode = "​999"​
  
-tran.CreditCardData ​= New usaepay.CreditCardData +        ​tran.Details ​= New usaepay.TransactionDetail 
-tran.CreditCardData.CardNumber ​"​4444555566667779"​ +        tran.Details.Amount ​9.02 
-tran.CreditCardData.CardExpiration ​= "0913+        tran.Details.AmountSpecified = True 
-tran.CreditCardData.CardCode ​= "999"+        tran.Details.Invoice ​= "434534
 +        tran.Details.Description ​= "Example transaction"
  
-tran.Details = New usaepay.TransactionDetail +        ​tran.Command ​= "sale"
-tran.Details.Amount = 9.02 +
-tran.Details.AmountSpecified = True +
-tran.Details.Invoice = "​434534"​ +
-tran.Details.Description ​= "Example transaction"+
  
-tran.Command = "​sale"​ 
  
-Dim response As usaepay.TransactionResponse+        ​Dim response As usaepay.TransactionResponse
  
-response = client.runTransaction(token,​ tran)+        ​response = client.runTransaction(token,​ tran)
  
-MsgBox("​Reference ​Number: " & response.RefNum)+        If response.ResultCode = "​A"​ Then 
 +            ​MsgBox("​Transaction Approved, Refernce ​Number: " & response.RefNum) 
 +        ElseIf response.ResultCode = "​D"​ Then 
 +            MsgBox("​Transaction Declined, Reason: " & response.Error) 
 +        Else 
 +            MsgBox("​Transaction Error, Reason: " & response.Error) 
 +        End If
 </​code>​ </​code>​
  
Line 199: Line 212:
  
 <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/" ​ 
-  <​SOAP-ENV:​Body>​ +xmlns:​ns1="​urn:​usaepay"​ xmlns:​xsd="​http://​www.w3.org/​2001/​XMLSchema" ​ 
-    <ns1:runTransactionResponse+xmlns:​xsi="​http://​www.w3.org/​2001/​XMLSchema-instance" ​ 
-      <runTransactionReturn ​xsi:​type="​ns1:​TransactionResponse">​ +xmlns:​SOAP-ENC="​http://​schemas.xmlsoap.org/​soap/​encoding/"​ SOAP-ENV:​encodingStyle="​http://​schemas.xmlsoap.org/​soap/​encoding/">​ 
-        <AcsUrl ​xsi:​type="​xsd:​string"></​AcsUrl+<​SOAP-ENV:​Body>​ 
-        <AuthCode ​xsi:​type="​xsd:string">​039958</​AuthCode+<ns1:runTransaction
-        <AvsResult ​xsi:​type="​xsd:​string">​Address: Match &amp; 5 Digit Zip: Match</AvsResult+<Token xsi:​type="​ns1:​ueSecurityToken">​ 
-        <AvsResultCode ​xsi:​type="​xsd:​string">​YYY</AvsResultCode+<ClientIP ​xsi:​type="​xsd:​string">​192.168.0.1</ClientIP
-        <BatchNum ​xsi:​type="​xsd:​integer">1</BatchNum+<PinHash ​xsi:​type="​ns1:ueHash">​ 
-        <​BatchRefNum xsi:​type="​xsd:​integer">​1999</BatchRefNum+<HashValue ​xsi:​type="​xsd:​string">​00060c94636aa8903bedf1a34ad668775fdf8279</HashValue
-        <CardCodeResult ​xsi:​type="​xsd:​string">​Match</CardCodeResult+<Seed xsi:​type="​xsd:​string">​1193430959519300366</Seed
-        <​CardCodeResultCode xsi:​type="​xsd:​string">​M</CardCodeResultCode+<Type xsi:​type="​xsd:​string">sha1</Type
-        <CardLevelResult ​xsi:​type="​xsd:string">Visa Traditional</​CardLevelResult+</PinHash
-        <CardLevelResultCode ​xsi:​type="​xsd:​string">​A</CardLevelResultCode+<SourceKey ​xsi:​type="​xsd:​string">​HB4P7C4K2w2ZCQQQXRqrxDj6agrS2NIT</SourceKey
-        <ConversionRate ​xsi:​type="​xsd:double">​0</​ConversionRate+</Token
-        <ConvertedAmount ​xsi:​type="​xsd:​double">0</ConvertedAmount+<Parameters ​xsi:​type="​ns1:TransactionRequestObject">​ 
-        <ConvertedAmountCurrency ​xsi:​type="​xsd:​string">​840</ConvertedAmountCurrency+<AccountHolder ​xsi:​type="​xsd:​string">​Tester Jones</AccountHolder
-        <CustNum ​xsi:​type="​xsd:​integer">0</CustNum+<CreditCardData ​xsi:​type="​ns1:CreditCardData">​ 
-        <Error xsi:​type="​xsd:​string">​Approved</Error+<AvsStreet ​xsi:​type="​xsd:​string">1234 Main Street</AvsStreet
-        <ErrorCode xsi:​type="​xsd:​integer">​0</​ErrorCode>​ +<AvsZip ​xsi:​type="​xsd:​string">​99281</AvsZip
-        <​isDuplicate xsi:​type="​xsd:​boolean">​false</​isDuplicate>​ +<CardCode ​xsi:​type="​xsd:​string">999</CardCode
-        <​Payload ​xsi:​type="​xsd:​string"></​Payload+<CardExpiration ​xsi:​type="​xsd:​string">​1212</CardExpiration
-        <​RefNum xsi:​type="​xsd:​integer">​46973474</RefNum+<CardNumber ​xsi:​type="​xsd:​string">​4444555566667779</CardNumber
-        <Result ​xsi:​type="​xsd:string">​Approved</​Result+</CreditCardData
-        <ResultCode ​xsi:​type="​xsd:​string">A</ResultCode+<Details ​xsi:​type="​ns1:TransactionDetail">​ 
-        <Status ​xsi:​type="​xsd:​string">​Pending</Status+<Amount ​xsi:​type="​xsd:​double">4</Amount
-        <StatusCode ​xsi:​type="​xsd:​string">​P</StatusCode+<Description ​xsi:​type="​xsd:​string">​Example Transaction</Description
-        <​VpasResultCode xsi:​type="​xsd:​string">​</VpasResultCode+<Invoice ​xsi:​type="​xsd:​string">​44539</Invoice
-      </runTransactionReturn+</Details
-    </ns1:runTransactionResponse+</Parameters
-  </​SOAP-ENV:​Body>​+</ns1:runTransaction
 +</​SOAP-ENV:​Body>​
 </​SOAP-ENV:​Envelope>​ </​SOAP-ENV:​Envelope>​
 </​code>​ </​code>​
developer/soap-1.3/methods/runtransaction.txt · Last modified: 2010/08/25 15:00 by epouchak

Page Tools