Python code snippet for DPS webservice

By | April 16, 2012
import suds
url = "https://sec.paymentexpress.com/WS/PXWS.asmx?WSDL"
client = suds.client.Client(url)
#print client
username = "USERNAME"
password = "PASSWORD"
trans = client.factory.create('TransactionDetails')
trans.amount = 1
trans.cardHolderName = "Test"
trans.cardNumber = '4111111111111111'
trans.inputCurrency= 'NZD'
trans.cvc2 = '000'
trans.dateExpiry = '0412'
trans.txnType = 'Purchase'
print client.service.SubmitTransaction(username, password, trans)

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.