Created
June 7, 2012 20:07
-
-
Save VantivSDK/2891260 to your computer and use it in GitHub Desktop.
Pyhton SDK - Litle AVS Only 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("") | |
| #AVS Only | |
| auth = litleXmlFields.authorization() | |
| auth.orderId = '1' | |
| auth.amount = 10010 | |
| auth.orderSource = 'ecommerce' | |
| contact = litleXmlFields.contact(); | |
| contact.name="John Smith" | |
| contact.addressLine1="1 Main St." | |
| contact.city="Burlington" | |
| contact.state="MA" | |
| contact.zip="01803-3747" | |
| contact.country="USA" | |
| auth.billToAddress = contact | |
| card = litleXmlFields.cardType() | |
| card.number = "4457010000000009" | |
| card.expDate = "0112" | |
| card.cardValidationNum = "349" | |
| card.type = 'VI' | |
| auth.card = card | |
| litleXml = litleOnlineRequest(config) | |
| response = litleXml.sendRequest(auth) | |
| #display results | |
| print "Response: " + response.response | |
| print "Message: " + response.message | |
| print "LitleTransaction ID: " + str(response.litleTxnId) | |
| print "AVS Result: " + response.fraudResult.avsResult |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment