Created
June 7, 2012 20:11
-
-
Save VantivSDK/2891278 to your computer and use it in GitHub Desktop.
Python SDK - Litle Capture Given Auth transaction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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