Skip to content

Instantly share code, notes, and snippets.

@VantivSDK
Created June 7, 2012 20:11
Show Gist options
  • Select an option

  • Save VantivSDK/2891278 to your computer and use it in GitHub Desktop.

Select an option

Save VantivSDK/2891278 to your computer and use it in GitHub Desktop.
Python SDK - Litle Capture Given Auth transaction
from litleSdkPython.litleOnlineRequest import *
config = Configuration()
config.setUser("User")
config.setPassword("Pass")
config.setMerchantId("123")
config.setUrl("Sandbox")
config.setProxy("")
#Capture Given Auth
capturegivenauth = litleXmlFields.captureGivenAuth()
capturegivenauth.orderId = '12344'
capturegivenauth.amount = 106
authInfo = litleXmlFields.authInformation()
date = pyxb.binding.datatypes.date(2002, 10, 9)
authInfo.authDate = date
authInfo.authCode = "543216"
authInfo.authAmount = 12345
capturegivenauth.authInformation = authInfo
capturegivenauth.orderSource = 'ecommerce'
card = litleXmlFields.cardType()
card.number = "4100000000000001"
card.expDate = "1210"
card.type = 'VI'
capturegivenauth.card = card
litleXml = litleOnlineRequest(config)
response = litleXml.sendRequest(capturegivenauth)
#display results
print "Response: " + response.response
print "Message: " + response.message
print "LitleTransaction ID: " + str(response.litleTxnId)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment