Looks to me like the .Fields is not a property of the OCX control.... The
reason that it would appear to work in the ASP code is that the ASP code
does not try to call AuthCtl.Fields and so does not error.
Try using something like OLEView to see all the properties and methods
available in the OCX
HTH
Mike
-----Original Message-----
From: Joel Firestone [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, December 20, 2000 19:34
To: CF-Talk
Subject: COM and CFOBJECT - beginner problem
All:
First, I apologize for the length of this message. I just want everyone to
see all the code I'm dealing with.
I'm currently setting up a WebAuthorize Hub. I was sent an ocx file and an
ASP page to test with. So I've supplied the ASP code and the code I'm trying
to write. So I registered the COM and the ASP page works fine. When I run
the cfm page, I get this error:
Error resolving parameter AUTHCTL.FIELDS
Thanks to all...
webtest.cfm:
========================================
<!--- create a COM object to send to the server --->
<cfobject type="COM" name="AuthCtl1" class="AuthCtl.AuthCtlCtrl.1"
action="Create">
<cfset AuthCtl1.Hub = 1>
<cfset AuthCtl1.Protocol = "SOCKETS">
<cfset AuthCtl1.HostName = "xxx.xx.x.xxx">
<cfset AuthCtl1.Port = xxxx>
<cfset AuthCtl1.SocketTimeoutValue ="60">
<cfset AuthCtl1.Secure = "FALSE">
<cfset AuthCtl1.KeepSocketOpen = "TRUE">
<cfset AuthCtl1.Merchant = "xxxxxxxxxxxxx">
<cfset AuthCtl1.Account = form.card_number>
<cfset AuthCtl1.ExpDate = form.card_exp>
<cfset AuthCtl1.Amount = form.amount>
<cfset AuthCtl1.AVSAddress = form.card_address>
<cfset AuthCtl1.AVSZip = form.card_zip>
<cfset AuthCtl =
AuthCtl1.Authorize(#AuthCtl1.Hub#,#AuthCtl1.Protocol#,#AuthCtl1.HostName#,#A
uthCtl1.Port#,#AuthCtl1.SocketTimeoutValue#,#AuthCtl1.Secure#,#AuthCtl1.Keep
SocketOpen#,#AuthCtl1.Merchant#,#AuthCtl1.Account#,#AuthCtl1.ExpDate#,#AuthC
tl1.Amount#,#AuthCtl1.AVSAddress#,#AuthCtl1.AVSZip#)>
<cfset myFields = AuthCtl.Fields>
<cfset RespText = myFields.Item("RespText")>
<!--- just to test --->
<cfoutput>#RespText.value#</cfoutput>
=========================================
webtest.asp:
=========================================
<%
' Simple ASP implementation
' This script sends an Authorization & prints the results on the browser
'
Set AuthCtl1 = Server.CreateObject("AuthCtl.AuthCtlCtrl.1")
AuthCtl1.Hub = 1
AuthCtl1.Protocol = "SOCKETS"
AuthCtl1.HostName = "xxx.xx.x.xxx"
AuthCtl1.Port = xxxx
AuthCtl1.SocketTimeoutValue ="60"
AuthCtl1.Secure = FALSE
AuthCtl1.KeepSocketOpen = TRUE
AuthCtl1.Merchant = "xxxxxxxxxxxxxx"
AuthCtl1.Account = Request("card_number")
AuthCtl1.ExpDate = Request("card_exp")
AuthCtl1.Amount = Request("amount")
AuthCtl1.AVSAddress = Request("card_address")
AuthCtl1.AVSZip = Request("card_zip")
' Call the Authorize function
AuthCtl1.Authorize
%>
=========================
Joel Firestone
Delmarva Online Web Development
http://www.dmv.com/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists