コード例 #1
0
def authorizeVoid(transactionID, clientId, authSeq, authToken):
        voidXML = buildVoidXML(transactionID, clientId, authSeq, authToken)
	#send xml doc to btf and get response	
	
	responseXML = getAuthResponseXML(voidXML)
	authResponse = parseAuthXML(responseXML)
	message = authResponse[ "message" ]
	print "Collect Authorization details:" 
	print " Status(Approve/Decline): " + authResponse[ "message" ]
	if(message == "APPROVED"):
		print " Auth Sequence " + authResponse[ "authseq"]
		print "  Approval code: " + authResponse[ "appcode" ]
	return message
コード例 #2
0
def authorizeSale(transactionId, clientId, authToken, amount, invoice="", 
job=""):
	saleXML = buildSaleXML(transactionId, clientId, authToken, amount, 
        invoice, job)
	#send xml doc to btf and get response	
	
	responseXML = getAuthResponseXML(saleXML)
	authResponse = parseAuthXML(responseXML)
	message = authResponse[ "message" ]
	print "Sale Authorization details:" 
	print " Status(Approve/Decline): " + authResponse[ "message" ]
	if(message == "APPROVED"):
		print " Auth Sequence " + authResponse[ "authseq"]
		print "  Approval code: " + authResponse[ "appcode" ]
	return message