I might try <cfset lastname=form.lastname> instead of <cfset lastname="<cfoutput>#form.lastname#</cfoutput>"> ---- Eric Bourland <ebwebw...@outlook.com> wrote: > > http://nnvawi.org/sample2.cfm > > When I use the code, below, then the Last Name field in the authorize.net > page gets populated with: > > <cfoutput></cfoutput> > > So it looks like something is ... erasing the value of #form.lastname#: > > <cfset lastname="<cfoutput>#form.lastname#</cfoutput>"> <!--- set value of > lastname from #form.lastname#---> > > >>>An easier option would be to just rename your LastName field to > >>>x_last_name and not have to deal with the javascript at all. > > This makes a tremendous amount of sense ... and I did try it -- I am pretty > sure I did ... around 3 this morning. I was pretty tired then, so I will try > it again and let you know how it goes. > > But, it seems like this code should work, yes? Thank you again for your help. > Eric > > [code] > <cfsetting enablecfoutputonly="true"> > <cfoutput> > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" > "http://www.w3.org/TR/html4/loose.dtd"> > <HTML lang='en'> > <HEAD> > <TITLE> Sample SIM Implementation </TITLE> > </HEAD> > <BODY> > > > <!-- This section generates the "Submit Payment" button using Coldfusion > --> > </cfoutput> > <!--- set default values for other user-editable fields ---> > <cfparam name="form.lastname" default=""> > > <cfset lastname="<cfoutput>#form.lastname#</cfoutput>"> <!--- set value of > lastname from #form.lastname#---> > > > <!--- the parameters for the payment can be configured here ---> > <!--- the API Login ID and Transaction Key must be replaced with valid values > ---> > <cfset loginID="86G3UkHsuB"> > <cfset transactionKey="4feP455vF62EzS87"> > <cfset amount="19.99"> > <cfset description="Sample Transaction"> > <cfset label="Submit Payment"> <!--- This the label on the 'submit' button > ---> > <cfset testMode="false"> > > <!--- By default, this sample code is designed to post to our test server for > developer accounts: https://test.authorize.net/gateway/transact.dll for real > accounts (even in test mode), please make sure that you are posting to: > https://secure.authorize.net/gateway/transact.dll ---> > <cfset posturl="https://secure.authorize.net/gateway/transact.dll"> > > > <!--- an invoice is generated using the date and time ---> > <cfset invoice=DateFormat(Now(),"yyyymmdd") & TimeFormat(Now(),"HHmmss")> > > <!--- a sequence number is randomly generated ---> > <cfset sequence=RandRange(1, 1000)> > > <!--- a timestamp is generated ---> > <cfset timestamp=DateDiff("s", "January 1 1970 00:00", > DateConvert('local2UTC', Now())) > > > <!--- The following lines generate the SIM fingerprint ---> > <cf_hmac data="#loginID#^#sequence#^#timestamp#^#amount#^" > key="#transactionKey#"> > <cfset fingerprint=#digest#> > > <cfoutput> <!--- begin CFOUTPUT ---> > > <!--- Print the Amount and Description to the screen.---> > <p>Amount: #amount# <br /> > Description: #description#</p> > > <!--- Create the HTML form containing necessary SIM post values ---> > <FORM method='post' action='#posturl#' > > <!--- Additional fields can be added here as outlined in the SIM integration > guide at http://developer.authorize.net ---> > > <p>Enter Last Name: <INPUT type="text" NAME="lastname" value="" /></p> > > <INPUT type='hidden' name='x_login' value='#loginID#' /> > <INPUT type='hidden' name='x_amount' value='#amount#' /> > <INPUT type='hidden' name='x_description' value='#description#' /> > <INPUT type='hidden' name='x_invoice_num' value='#invoice#' /> > <INPUT type='hidden' name='x_fp_sequence' value='#sequence#' /> > <INPUT type='hidden' name='x_fp_timestamp' value='#timeStamp#' /> > <INPUT type='hidden' name='x_fp_hash' value='#fingerprint#' /> > <INPUT type='hidden' name='x_test_request' value='#testMode#' /> > <INPUT type='hidden' name='x_show_form' value='PAYMENT_FORM' /> > <input type='submit' value='#label#' /> > <INPUT type='hidden' name='x_last_name' value='#lastname#' /><!--- > populate field 'x_last_name' with value #lastname#---> > </FORM> > <!-- This is the end of the code generating the "submit payment" button. > --> > > </BODY> > </HTML> > <!-- The last line is a necessary part of the coldfusion script --> > </cfoutput> <!--- close CFOUTPUT ---> > > [/code] > > > > > > > > ******* > > Eric Bourland > > Internet Project Development > > Washington DC > > kind | creative | reliable > > > >
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359149 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm