Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IPN and payment conflict- please help......

Status
Not open for further replies.

radiance

Programmer
Jan 4, 2003
164
US
Hi.
Could someone please advise...IPN and Quantity. Thanks in advance.

I have continued to troubleshoot my registration form in which users's rate depends on the time that they register. I am now down to 3 forms: form, confirm and ipn.cfm!
How do I resolve payment and quantity with Paypal? For example, if a user signs up alone before the registration deadline, their fee is $100. And if they have guests who will be registered as registrants, then it is $100* guests + the original registrant. Now, if the user signs up only after the registration deadline, their fee is $200. And if they have guests who will be registered as registrants, then it is $200* guests + the original registrant

I am getting the following error:

Error Diagnostic Information

An error occurred while evaluating the expression:


#DOLLARFORMAT(total_payment)#



Error near line 228, column 25.
--------------------------------------------------------------------------------

Error resolving parameter TOTAL_PAYMENT


ColdFusion was unable to determine the value of the parameter. This problem is very likely due to the fact that either:

You have misspelled the parameter name, or
You have not specified a QUERY attribute for a CFOUTPUT, CFMAIL, or CFTABLE tag.


The error occurred while processing an element with a general identifier of (#DOLLARFORMAT(total_payment)#), occupying document position (228:24) to (228:52).

______________________________________________________________________

Here is my code for ipn and subsequently, confirm.cfm. I have a form page too, but I am not sure if that is necessary:


CONFIRM.cfm
<---Header--->
!---GET FORM ELEMENTS--->

<cfparam name=&quot;FORM.convention_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #convention_date# = FORM.convention_date>


<cfparam name=&quot;FORM.registration_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #registration_date# = FORM.registration_date>

<cfparam name=&quot;FORM.title&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #title# = FORM.title>

<cfparam name=&quot;FORM.fname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #fname# = FORM.fname>

<cfparam name=&quot;FORM.mi&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #mi# = FORM.mi>

<cfparam name=&quot;FORM.lname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #lname# = FORM.lname>

<cfparam name=&quot;FORM.nickname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #nickname# = FORM.nickname>

<cfparam name=&quot;FORM.suffix&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #suffix# = FORM.suffix>

<cfparam name=&quot;FORM.email&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #email# = FORM.email>

<cfparam name=&quot;FORM.stno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #stno# = FORM.stno>

<cfparam name=&quot;FORM.stno2&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #stno2# = FORM.stno2>

<cfparam name=&quot;FORM.city&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #city# = FORM.city>

<cfparam name=&quot;FORM.state&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #state# = FORM.state>

<cfparam name=&quot;FORM.zip&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #zip# = FORM.zip>

<cfparam name=&quot;FORM.country&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #country# = FORM.country>

<cfparam name=&quot;FORM.hphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #hphone# = FORM.hphone>

<cfparam name=&quot;FORM.wphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #wphone# = FORM.wphone>

<cfparam name=&quot;FORM.fax&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #fax# = FORM.fax>


<cfparam name=&quot;FORM.emercontact&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #emercontact# = FORM.emercontact>


<cfparam name=&quot;FORM.ephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #edphone# = FORM.edphone>


<cfparam name=&quot;FORM.eephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #eephone# = FORM.eephone>


<cfparam name=&quot;FORM.region&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #region# = FORM.region>


<cfparam name=&quot;FORM.district&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #district# = FORM.district>


<cfparam name=&quot;FORM.lodgeno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #lodgeno# = FORM.lodgeno>


<cfparam name=&quot;FORM.lodgename&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #lodgename# = FORM.lodgename>


<cfparam name=&quot;FORM.committee&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #committee# = FORM.committee>


<cfparam name=&quot;FORM.lodge_pres&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #lodge_pres# = FORM.lodge_pres>

<cfparam name=&quot;FORM.registration_type&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #registration_type# = FORM.registration_type>

<cfparam name=&quot;FORM.gfullname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #gfullname# = FORM.gfullname>

<cfparam name=&quot;FORM.gcity&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #gcity# = FORM.gcity>

<cfparam name=&quot;FORM.gstate&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #gstate# = FORM.gstate>

<cfparam name=&quot;FORM.gcountry&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #gcountry# = FORM.gcountry>

<cfparam name=&quot;FORM.guestsallmeals&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #guestsallmeals# = FORM.guestsallmeals>

<cfparam name=&quot;FORM.guestsno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset #guestsno# = FORM.guestsno>

<!--- Finish form elements --->

<table cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; border=&quot;0&quot;><tr><td class=&quot;text&quot;>
<span class=&quot;boldtext&quot;>Please check the information below and confirm. You will then be taken to <b>PayPal</b> to make a donation.</span>
</td></tr>
<td>
<cfoutput>
<table>
<tr>
<TR>
<TD class=&quot;boldtext&quot;>
Convention: <span class=&quot;text&quot;>#convention_date#</span><br><br>

1Registration Status: <span class=&quot;text&quot;>#registantStatus#</span><br><br>

Prefix: <span class=&quot;text&quot;>#title#</span><br><br>

First Name: <span class=&quot;text&quot;>#fname#</span><br><br>

MI:<span class=&quot;text&quot;>#mi#</span><br><br>

Last Name: <span class=&quot;text&quot;>#lname#</span><br><br>

Suffix: <span class=&quot;text&quot;>#suffix#</span><br><br>

Nickname: <span class=&quot;text&quot;>#nickname#</span><br><br>

Email:<span class=&quot;text&quot;>#email#</span><br><br>

Address:<span class=&quot;text&quot;>#stno#</span><br><br>

Apt.<span class=&quot;text&quot;>#stno2#</span><br><br>

City:<span class=&quot;text&quot;>#city#</span><br><br>

State/Province:<span class=&quot;text&quot;>#state#</span><br><br>

Zip/Postal Code:<span class=&quot;text&quot;>#zip#</span><br><br>

Country:<span class=&quot;text&quot;>#country#</span>
<br><br>

<span class=&quot;boldtext&quot;>Daytime Phone</span> (incl. area code):<span class=&quot;text&quot;>#hphone#</span><br><br>

<span class=&quot;boldtext&quot;>Evening Phone</span> (incl. area code):<span class=&quot;text&quot;>#wphone#</span><br><br>

<span class=&quot;boldtext&quot;>Fax</span> (incl. area code):<span class=&quot;text&quot;>#fax#</span><br><br>


Emergency Contact:<span class=&quot;text&quot;>#emercontact#</span><br><br>


<span class=&quot;boldtext&quot;>Emergency Daytime Phone </span>(incl. area code):
<span class=&quot;text&quot;>#edphone#</span><br><br>

<span class=&quot;boldtext&quot;>Emergency Evening Phone</span>(incl. area code):<span class=&quot;text&quot;>#eephone#</span>
<br><br>

<!-----Membership Information----->

<span class=&quot;boldtext&quot;>Select a Region</span> (for all members in USA or British Columbia):<span class=&quot;text&quot;>#region#</span><br><br>

<span class=&quot;boldtext&quot;>District</span>(Overseas members only):<span class=&quot;text&quot;>#district#</span><br><br>

Unit/Lodge Number:<span class=&quot;text&quot;>#lodgeno#</span><br><br>

<span class=&quot;boldtext&quot;>Unit/Lodge Name</span>(Required for delgates and alternates representing Units & Lodges):<span class=&quot;text&quot;>#lodgename#</span><br><br>


<span class=&quot;boldtext&quot;>Are you interested in serving on a Convention Buisness Committee, and if so will you be available to attend a meeting on Sunday June 27th?</span><br><span class=&quot;text&quot;>#committee#</span><br><br>


<span class=&quot;boldtext&quot;>Will you be a Unit/Lodge President when the convention takes place?</span><br><span class=&quot;text&quot;>#lodge_pres#</span><br><br>

Registration Type:<span class=&quot;text&quot;>#registration_type#</span><br><br>


Will you have guests?<span class=&quot;text&quot;>#registantStatus#</span><br><br>


How many guests will you have?<span class=&quot;text&quot;>#guestsno#</span><br><br>


Do you want to register your guests for all sessions, events, and meals?<br>
<span class=&quot;text&quot;>#guestsallmeals#</span><br><br>

Guest 1 Full Name: <span class=&quot;text&quot;>#gfullname#</span><br><br>

Guests 1's city:<span class=&quot;text&quot;>#gcity#</span><br><br>

State:<span class=&quot;text&quot;>#gstate#</span><br><br>

Country:<span class=&quot;text&quot;>#gcountry#</span><br><br>
</td>
</tr></table>
<!--- Calculate Registration Fees if 'Guests' is not selected & registrant is on time --->

<cfif #registantStatus# IS &quot;Registrant Only&quot; AND #registration_date# LT &quot;05/28/04&quot;>
<cfset #registrationAmount#=&quot;295.00&quot;>
</cfif>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b><br><br>
Registration Fees: <b>#DOLLARFORMAT(registrationAmount)#</b>
</span></td></tr>

<cfif isDefined(&quot;URL.calculate&quot;)>
<cfif #URL.calculate# is &quot;yes&quot;>


<form action=&quot;conv04_reg_form.cfm&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;edit&quot;>
<input type=&quot;submit&quot; value=&quot;Go Back & Edit&quot;>
</form>

<form action=&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Convention Registration&quot;>
<input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_ext-enter&quot;>
<input type=&quot;hidden&quot; name=&quot;redirect_cmd&quot; value=&quot;_xclick&quot;>
<input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;website@bnaibrith.org&quot;>
<input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;#session.total_registrants#&quot;>
<input type=&quot;hidden&quot; name=&quot;first_name&quot; value=&quot;#SESSION.fname#&quot;>
<input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;#SESSION.registrationAmount#&quot;>
<input type=&quot;hidden&quot; name=&quot;last_name&quot; value=&quot;#SESSION.lname#&quot;>
<input type=&quot;hidden&quot; name=&quot;address1&quot; value=&quot;#SESSION.stno#&quot;>
<input type=&quot;hidden&quot; name=&quot;address2&quot; value=&quot;#SESSION.stno2#&quot;>
<input type=&quot;hidden&quot; name=&quot;city&quot; value=&quot;#SESSION.city#&quot;>
<input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;#SESSION.state#&quot;>
<input type=&quot;hidden&quot; name=&quot;zip&quot; value=&quot;#SESSION.zip#&quot;>
<input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;>
<input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;>
<input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;<input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot;<input type=&quot;submit&quot; value=&quot;Confirm&quot;>
</form>
</cfif>
</cfif>
</cfoutput>

<!--- Calculate Registration Fees if 'Guests' IS NOT selected & registrant is late --->
<!--- <cfelseif #guests# IS &quot;&quot; AND #registration_date# GT &quot;05/28/04&quot;> --->

<cfif #registantStatus# IS &quot;Registrant with Guests&quot; AND #registration_date# GT &quot;05/28/04&quot;>
<cfset #registrationAmount#= &quot;325.00&quot;>
<cfif isDefined(&quot;Form.registrant&quot;)>
<cfoutput>
<cfif #guests# IS 'Yes' AND #guestsallmeals# IS 'Yes'>
<cfset #total_registrants# = #guestsno# + 1>
<cfset #registrationAmount# =325 * #total_registrants#>
</cfif>
</cfoutput>
</cfif>
<cfoutput>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b>
Registered on: #DateFormat(registration_date, 'mm/dd/yyyy')#</<br><br>
Registration Fees: <b>#DOLLARFORMAT(total_payment)#</b>
</span></td></tr>

<form action=&quot;conv04_reg_form.cfm&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;edit&quot;>
<input type=&quot;submit&quot; value=&quot;Go Back & Edit&quot;>
</form>
<cfif isDefined(&quot;URL.calculate&quot;)>
<cfif #URL.calculate# is &quot;yes&quot;>
<form action=&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Convention Registration&quot;>
<input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_ext-enter&quot;>
<input type=&quot;hidden&quot; name=&quot;redirect_cmd&quot; value=&quot;_xclick&quot;>
<input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;website@bnaibrith.org&quot;>
<input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;#session.total_registrants#&quot;>
<input type=&quot;hidden&quot; name=&quot;first_name&quot; value=&quot;#SESSION.fname#&quot;>
<input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;#SESSION.registrationAmount#&quot;>
<input type=&quot;hidden&quot; name=&quot;last_name&quot; value=&quot;#SESSION.lname#&quot;>
<input type=&quot;hidden&quot; name=&quot;address1&quot; value=&quot;#SESSION.stno#&quot;>
<input type=&quot;hidden&quot; name=&quot;address2&quot; value=&quot;#SESSION.stno2#&quot;>
<input type=&quot;hidden&quot; name=&quot;city&quot; value=&quot;#SESSION.city#&quot;>
<input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;#SESSION.state#&quot;>
<input type=&quot;hidden&quot; name=&quot;zip&quot; value=&quot;#SESSION.zip#&quot;>
<input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;>
<input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;>
<input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot;<input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot;<input type=&quot;submit&quot; value=&quot;Confirm&quot;>
</form>
</cfif>
</cfif>
</cfoutput>
</cfif>
<---Footer--->

_________________________________________________________________
IPN.cfm

<!-- read post from PayPal system and add 'cmd' -->
<CFSET str=&quot;cmd=_notify-validate&quot;>
<CFLOOP INDEX=&quot;TheField&quot; list=&quot;#Form.FieldNames#&quot;>
<CFSET str = str & &quot;#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#&quot;>
</CFLOOP>
<CFIF IsDefined(&quot;FORM.payment_date&quot;)>
<CFSET str = str & &quot;&payment_date=#URLEncodedFormat(Form.payment_date)#&quot;>
</CFIF>
<CFIF IsDefined(&quot;FORM.subscr_date&quot;)>
<CFSET str = str & &quot;&subscr_date=#URLEncodedFormat(Form.subscr_date)#&quot;>
</CFIF>

<!-- post back to PayPal system to validate -->
<CFHTTP URL=&quot; METHOD=&quot;GET&quot; RESOLVEURL=&quot;false&quot;>
</CFHTTP>

<!-- assign posted variables to local variables -->
<cfoutput>
<cfset #receiver_email#=#FORM.receiver_email#>
<cfset #payment_status#=#FORM.payment_status#>
<cfset #payment_currency#=#FORM.mc_currency#>
<cfset #txn_id#=#FORM.txn_id#>
<cfset #convention_program# = #FORM.item_name#>
<cfset #total_registrants# = #FORM.item_number#>
<cfset #registration_amount# = #FORM.mc_gross#>
<cfset #fname# = #FORM.first_name#>
<cfset #lname# = #FORM.last_name#>
<cfset #stno1# = #FORM.address_street#>
<cfset #city# = #FORM.address_city#>
<cfset #state# = #FORM.address_state#>
<cfset #zip# = #FORM.address_zip#>
<cfset #email# = #FORM.email#>
</cfoutput>

<cfoutput>
Variables:
#total_registrants# , #registration_amount#, #convention_program#, #fname#<br/>
</cfoutput>

<!-- check notification validation -->
<CFIF #CFHTTP.FileContent# is &quot;VERIFIED&quot;>
<!-- check that payment_status=Completed -->
<cfif FORM.payment_status eq &quot;Completed&quot;>
<!-- check that receiver_email is your email address -->
<cfif #FORM.RECEIVER_EMAIL# eq &quot;mypaypalemail@mysite.com&quot;>
<!-- process payment -->
<cftry>


<cfquery name=&quot;registrant&quot; datasource=&quot;bbitestdb&quot;>
SELECT * FROM bog_registrant
WHERE
Email = '#email#'
</cfquery>

<cfif registrant.RecordCount NEQ 0>
<cfset #registantStatus# = &quot;registrant only&quot;>
<cfelse>
<cfset #registantStatus# = &quot;registrant with guests&quot;>
</cfif>


<cfif #registantStatus# is &quot;registrant only&quot;>
<cfquery name=&quot;FindCustomer&quot; datasource=&quot;bbitestdb&quot;>
SELECT * FROM Customers
WHERE email = '#email#'
</cfquery>

<cfif FindCustomer.RecordCount NEQ 0>
<cfset registrantID = #FindCustomer.CustomerId#>
</cfif>

<cfif FindCustomer.RecordCount EQ 0>
<cfquery name=&quot;InsertCustomer&quot; datasource=&quot;bbitestdb&quot;>
INSERT INTO Customers
(
fname, lname, stno, city, state, zip, email, IsBOGRegistrant, DateAdded
)
Values
(
'#fname#', '#lname#', '#stno1#', '#city#', '#state#', '#zip#', '#email#', 'y', GETDATE() )
</cfquery>

<cfquery name=&quot;FindCustomer&quot; datasource=&quot;bbitestdb&quot;>
SELECT * FROM Customers
WHERE email = '#email#'
</cfquery>

<cfset registrantID = #FindCustomer.CustomerId#>

<cfelse>

<cfquery name=&quot;UpdateCustomer&quot; datasource=&quot;bbitestdb&quot;>
UPDATE Customers
SET
IsBOGRegistrant = 'y'
WHERE CustomerId = '#registrantID#'
</cfquery>

</cfif>
</cfif>

<cfif #registantStatus# is &quot;registrant with guests&quot;>
<cfoutput><br/>RegistrantID: #registrant.RegistrantID#<br/>
Last Name: #registrant.lname#<br/></cfoutput>

<cfquery name=&quot;UpdateRegistrant&quot; datasource=&quot;bbitestdb&quot;>
UPDATE Customers
SET
IsBOGRegistrant = 'y'
WHERE
email = '#email#'
</cfquery>

<cfquery name=&quot;UpdateGuest&quot; datasource=&quot;bbitestdb&quot;>
UPDATE bog_guests
SET
gfullname = <cfqueryparam value=&quot;#form.keyword#&quot;>,
gcity = <cfqueryparam value=&quot;#form.keyword#&quot;>,
gstate = <cfqueryparam value=&quot;#form.keyword#&quot;>,
gcountry = <cfqueryparam value=&quot;#form.keyword#&quot;>,
registrantID= <cfqueryparam value=#form.registrantID#>
WHERE
registrantID = #Form.registrantID#
</cfquery>



<cfoutput>
<cfset #registantStatus# = #registrant.RegistrantID#>
</cfoutput>

</cfif>

<cfoutput>
<cfquery name=&quot;InsertPayment&quot; datasource=&quot;bbitestdb&quot;>
INSERT INTO customerPayments
(
CustomerId, txnId, lname, conventionType, registrationAmount, datePaid
)
Values
(
'#customerID#', '#txn_id#', '#lname#', '#registantStatus#', '#registration_amount#', GETDATE()
)
</cfquery>

<cfquery name=&quot;InsertRegistrantInfo&quot; datasource=&quot;bbitestdb&quot;>
INSERT INTO bog_registrants
(
convention_date, conventionType, title, fname, mi, lname, suffix, nickname, email, stno, stno2, city, state, zip, country, hphone, wphone, fax, emercontact, edphone, eephone, region, district, lodgeno, lodgename, lodge_pres, committee, registration_type, total_registrants, registration_date, registantStatus,
)
Values
(
'#convention_date#', '#conventionType#', '#title#', '#fname#', '#mi#', '#lname#', '#suffix#', '#nickname#', '#email#', '#stno#', '#stno2#', '#city#', '#state#', '#zip#', '#country#', '#hphone#', '#wphone#', '#fax#', '#emercontact#', '#edphone#','#eephone#','#region#','#district#','#lodgeno#','#lodgename#', '#lodge_pres#', '#committee#', '#registration_type#', '#total_registrants#', GETDATE(),'#registantStatus#',
)
</cfquery>
</cfoutput>

<cfcatch>
<!--- let's log all errors --->
<cffile action=&quot;append&quot;
file=&quot;D:\WEB\bnaibrith\paypal\paypal_log.txt&quot;
output=&quot;Error order info & after written to DB&quot;>
</cfcatch>
</cftry>

</cfif>
</cfif>


<CFELSEIF #CFHTTP.FileContent# is &quot;INVALID&quot;>
<!-- log for investigation -->

Something that was purchased was invalid, either the order or the information provided. This is usually good to log in case someone is trying to purchase with stolen card numbers, etc. Here simply place a QUERY tag that insert the data above into a database.


<CFELSE>
<!-- error -->

This usually means that something went wrong along the way, you can use this area to log it and keep for your records.


</CFIF>




Laughter cures so much and it is easier than a frown... Go ahead try it...
 
Ok, to start with, you DO NOT put pound signs around the name of a variable when you are assigning. You only use pounds for output.
So
Code:
<cfset #convention_date# = FORM.convention_date>[/color]
should be
Code:
<cfset convention_date = FORM.convention_date>[/color]
and you will need to make this change on EVERY ONE of your cfset statements.

Secondly, I can't find anywhere in your code that you are setting/defining the &quot;total_payment&quot; variable. That's why you're getting that error, because the variable doesn't exist. Most likely, you just left out a cfset statement like:
Code:
<cfset total_payment = FORM.total_payment>[/color]


Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Thank you Ecobb for your help!!!!

What about my computation to figure out the total price. Is this even the right way to approach this:

<!--- Calculate Registration Fees if 'Guests' IS NOT selected & registrant is late --->
<!--- <cfelseif #guests# IS &quot;&quot; AND #registration_date# GT &quot;05/28/04&quot;> --->

<cfif #registantStatus# IS &quot;Registrant with Guests&quot; AND #registration_date# GT &quot;05/28/04&quot;>
<cfset #registrationAmount#= &quot;325.00&quot;>
<cfif isDefined(&quot;Form.registrant&quot;)>
<cfoutput>
<cfif #guests# IS 'Yes' AND #guestsallmeals# IS 'Yes'>
<cfset #total_registrants# = #guestsno# + 1>
<cfset #registrationAmount# =325 * #total_registrants#>
</cfif>
</cfoutput>
</cfif>
<cfoutput>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b>
Registered on: #DateFormat(registration_date, 'mm/dd/yyyy')#</<br><br>
Registration Fees: <b>#DOLLARFORMAT(total_payment)#</b>
</span></td></tr>
 
I am not sure where to post total_payment, because it is a result of when it has been established that the registrant is ontime and single;, or on-time with guests, or late single registrant; and late and with guests.

Am I defining it earlier??
 
Looks good except for the punds around your variables names in the cfset and cfif statements. You only use pounds aroud a variable when you are referencing or displaying the value of that variable, not the name.
Code:
<cfif registantStatus IS &quot;Registrant with Guests&quot; AND registration_date GT &quot;05/28/04&quot;>
<cfset registrationAmount = &quot;325.00&quot;>
<cfif isDefined(&quot;Form.registrant&quot;)>
<cfoutput>
<cfif guests IS 'Yes' AND guestsallmeals IS 'Yes'>
<cfset total_registrants = (#guestsno# + 1)>
<cfset registrationAmount = (325 * #total_registrants#)>
</cfif>
</cfoutput>
</cfif>
<cfoutput>


Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Thank you again for your patience!!!

I took out the pound signs for the variables and the output is going to the confirm page, but I don't see my buttons to make changes or to continue. Is there something I am missing?


Thanks in advance!
 
I looks like this tag <cfif registantStatus IS &quot;Registrant with Guests&quot; AND registration_date GT &quot;05/28/04&quot;> is surrounding both the buttons (and forms). If the values you are passing in the form do not equal the values the IF statement is looking for, the buttons will not show up.



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Thank you. I will look into my code more and let you know if it works!

Thanks so much!!
 
The buttons are showing up, but only the go back and edit. My totals are still not showing. Please advise (I am going to review this evening. This is my confirm.cfm page.

<!---GET FORM ELEMENTS--->

<cfparam name=&quot;FORM.convention_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset convention_date = FORM.convention_date>

<cfparam name=&quot;FORM.registration_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registration_date = FORM.registration_date>

<cfparam name=&quot;FORM.title&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset title = FORM.title>

<cfparam name=&quot;FORM.fname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset fname = FORM.fname>

<cfparam name=&quot;FORM.mi&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset mi = FORM.mi>

<cfparam name=&quot;FORM.lname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lname = FORM.lname>

<cfparam name=&quot;FORM.nickname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset nickname = FORM.nickname>

<cfparam name=&quot;FORM.suffix&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset suffix = FORM.suffix>

<cfparam name=&quot;FORM.email&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset email = FORM.email>

<cfparam name=&quot;FORM.stno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset stno = FORM.stno>

<cfparam name=&quot;FORM.stno2&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset stno2 = FORM.stno2>

<cfparam name=&quot;FORM.city&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset city = FORM.city>

<cfparam name=&quot;FORM.state&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset state = FORM.state>

<cfparam name=&quot;FORM.zip&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset zip = FORM.zip>

<cfparam name=&quot;FORM.country&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset country = FORM.country>

<cfparam name=&quot;FORM.hphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset hphone = FORM.hphone>

<cfparam name=&quot;FORM.wphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset wphone = FORM.wphone>

<cfparam name=&quot;FORM.fax&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset fax = FORM.fax>


<cfparam name=&quot;FORM.emercontact&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset emercontact = FORM.emercontact>


<cfparam name=&quot;FORM.ephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset edphone = FORM.edphone>


<cfparam name=&quot;FORM.eephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset eephone = FORM.eephone>


<cfparam name=&quot;FORM.region&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset region = FORM.region>


<cfparam name=&quot;FORM.district&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset district = FORM.district>


<cfparam name=&quot;FORM.lodgeno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodgeno = FORM.lodgeno>


<cfparam name=&quot;FORM.lodgename&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodgename = FORM.lodgename>


<cfparam name=&quot;FORM.committee&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset committee = FORM.committee>


<cfparam name=&quot;FORM.lodge_pres&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodge_pres = FORM.lodge_pres>

<cfparam name=&quot;FORM.registration_type&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registration_type = FORM.registration_type>

<cfparam name=&quot;FORM.gfullname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gfullname = FORM.gfullname>

<cfparam name=&quot;FORM.gcity&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gcity = FORM.gcity>

<cfparam name=&quot;FORM.gstate&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gstate = FORM.gstate>

<cfparam name=&quot;FORM.gcountry&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gcountry = FORM.gcountry>

<cfparam name=&quot;FORM.guestsallmeals&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset guestsallmeals = FORM.guestsallmeals>

<cfparam name=&quot;FORM.guestsno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset guestsno = FORM.guestsno>

<cfparam name=&quot;FORM.registrationAmount&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registrationAmount = FORM.registrationAmount>

<!--- Finish form elements --->

<table cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; border=&quot;0&quot;><tr><td class=&quot;text&quot;>
<span class=&quot;boldtext&quot;>Please check the information below and confirm. You will then be taken to <b>PayPal</b> to make a donation.</span>
</td></tr>
<td>
<cfoutput>
<table>
<tr>
<TR>
<TD class=&quot;boldtext&quot;>
Convention: <span class=&quot;text&quot;>#convention_date#</span><br><br>

1Registration Status: <span class=&quot;text&quot;>#registantStatus#</span><br><br>

Prefix: <span class=&quot;text&quot;>#title#</span><br><br>

First Name: <span class=&quot;text&quot;>#fname#</span><br><br>

MI:<span class=&quot;text&quot;>#mi#</span><br><br>

Last Name: <span class=&quot;text&quot;>#lname#</span><br><br>

Suffix: <span class=&quot;text&quot;>#suffix#</span><br><br>

Nickname: <span class=&quot;text&quot;>#nickname#</span><br><br>

Email:<span class=&quot;text&quot;>#email#</span><br><br>

Address:<span class=&quot;text&quot;>#stno#</span><br><br>

Apt.<span class=&quot;text&quot;>#stno2#</span><br><br>

City:<span class=&quot;text&quot;>#city#</span><br><br>

State/Province:<span class=&quot;text&quot;>#state#</span><br><br>

Zip/Postal Code:<span class=&quot;text&quot;>#zip#</span><br><br>

Country:<span class=&quot;text&quot;>#country#</span>
<br><br>

<span class=&quot;boldtext&quot;>Daytime Phone</span> (incl. area code):<span class=&quot;text&quot;>#hphone#</span><br><br>

<span class=&quot;boldtext&quot;>Evening Phone</span> (incl. area code):<span class=&quot;text&quot;>#wphone#</span><br><br>

<span class=&quot;boldtext&quot;>Fax</span> (incl. area code):<span class=&quot;text&quot;>#fax#</span><br><br>


Emergency Contact:<span class=&quot;text&quot;>#emercontact#</span><br><br>


<span class=&quot;boldtext&quot;>Emergency Daytime Phone </span>(incl. area code):
<span class=&quot;text&quot;>#edphone#</span><br><br>

<span class=&quot;boldtext&quot;>Emergency Evening Phone</span>(incl. area code):<span class=&quot;text&quot;>#eephone#</span>
<br><br>

<!-----Membership Information----->

<span class=&quot;boldtext&quot;>Select a Region</span> (for all members in USA or British Columbia):<span class=&quot;text&quot;>#region#</span><br><br>

<span class=&quot;boldtext&quot;>District</span>(Overseas members only):<span class=&quot;text&quot;>#district#</span><br><br>

Unit/Lodge Number:<span class=&quot;text&quot;>#lodgeno#</span><br><br>

<span class=&quot;boldtext&quot;>Unit/Lodge Name</span>(Required for delgates and alternates representing Units & Lodges):<span class=&quot;text&quot;>#lodgename#</span><br><br>


<span class=&quot;boldtext&quot;>Are you interested in serving on a Convention Buisness Committee, and if so will you be available to attend a meeting on Sunday June 27th?</span><br><span class=&quot;text&quot;>#committee#</span><br><br>


<span class=&quot;boldtext&quot;>Will you be a Unit/Lodge President when the convention takes place?</span><br><span class=&quot;text&quot;>#lodge_pres#</span><br><br>

Registration Type:<span class=&quot;text&quot;>#registration_type#</span><br><br>


Will you have guests?<span class=&quot;text&quot;>#registantStatus#</span><br><br>


How many guests will you have?<span class=&quot;text&quot;>#guestsno#</span><br><br>


Do you want to register your guests for all sessions, events, and meals?<br>
<span class=&quot;text&quot;>#guestsallmeals#</span><br><br>

Guest 1 Full Name: <span class=&quot;text&quot;>#gfullname#</span><br><br>

Guests 1's city:<span class=&quot;text&quot;>#gcity#</span><br><br>

State:<span class=&quot;text&quot;>#gstate#</span><br><br>

Country:<span class=&quot;text&quot;>#gcountry#</span><br><br>
</td>
</tr></table>
<!--- Calculate Registration Fees if 'Guests' is not selected & registrant is on time --->



<form action=&quot;conv04_reg_form.cfm&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;edit&quot;>
<input type=&quot;submit&quot; value=&quot;Go Back & Edit&quot;>
</form>


<form action=&quot; method=&quot;post&quot;>
<cfif registantStatus IS &quot;Registrant Only&quot; AND registration_date LT &quot;05/28/04&quot;>
<cfset registrationAmount=&quot;295.00&quot;>
</cfif>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b><br><br>
Registration Fees: <b>#DOLLARFORMAT(registrationAmount)#</b>
</span></td></tr>

<cfif isDefined(&quot;URL.calculate&quot;)>
<cfif #URL.calculate# is &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Convention Registration&quot;>
<input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_ext-enter&quot;>
<input type=&quot;hidden&quot; name=&quot;redirect_cmd&quot; value=&quot;_xclick&quot;>
<input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;website@bnaibrith.org&quot;>
<input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;#session.total_registrants#&quot;>
<input type=&quot;hidden&quot; name=&quot;first_name&quot; value=&quot;#SESSION.fname#&quot;>
<input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;#SESSION.registrationAmount#&quot;>
<input type=&quot;hidden&quot; name=&quot;last_name&quot; value=&quot;#SESSION.lname#&quot;>
<input type=&quot;hidden&quot; name=&quot;address1&quot; value=&quot;#SESSION.stno#&quot;>
<input type=&quot;hidden&quot; name=&quot;address2&quot; value=&quot;#SESSION.stno2#&quot;>
<input type=&quot;hidden&quot; name=&quot;city&quot; value=&quot;#SESSION.city#&quot;>
<input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;#SESSION.state#&quot;>
<input type=&quot;hidden&quot; name=&quot;zip&quot; value=&quot;#SESSION.zip#&quot;>
<input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;>
<input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;>
<input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot; <input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot; <input type=&quot;submit&quot; value=&quot;Confirm&quot;>
</form>
</cfif>
</cfif>
</cfoutput>

<!--- Calculate Registration Fees if 'Guests' IS NOT selected & registrant is late --->
<!--- <cfelseif #guests# IS &quot;&quot; AND #registration_date# GT &quot;05/28/04&quot;> --->



<form action=&quot;conv04_reg_form.cfm&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;edit&quot;>
<input type=&quot;submit&quot; value=&quot;Go Back & Edit&quot;>
</form>
<cfif isDefined(&quot;URL.calculate&quot;)>
<cfif #URL.calculate# is &quot;yes&quot;>
<cfif registantStatus IS &quot;Registrant with Guests&quot; AND registration_date GT &quot;05/28/04&quot;>
<cfset registrationAmount= &quot;325.00&quot;>
<cfif isDefined(&quot;Form.registrant&quot;)>
<cfoutput>
<cfif guests IS 'Yes' AND guestsallmeals IS 'Yes'>
<cfset total_registrants = (#guestsno# + 1)>
<cfset registrationAmount =325 * #total_registrants#>
</cfif>
</cfoutput>
</cfif>
<cfoutput>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b>
Registered on: #DateFormat(registration_date, 'mm/dd/yyyy')#</<br><br>
Registration Fees: <b>#DOLLARFORMAT(total_payment)#</b>
</span></td></tr> </cfoutput>
<form action=&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Convention Registration&quot;>
<input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_ext-enter&quot;>
<input type=&quot;hidden&quot; name=&quot;redirect_cmd&quot; value=&quot;_xclick&quot;>
<input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;website@bnaibrith.org&quot;>
<input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;#session.total_registrants#&quot;>
<input type=&quot;hidden&quot; name=&quot;first_name&quot; value=&quot;#SESSION.fname#&quot;>
<input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;#SESSION.registrationAmount#&quot;>
<input type=&quot;hidden&quot; name=&quot;last_name&quot; value=&quot;#SESSION.lname#&quot;>
<input type=&quot;hidden&quot; name=&quot;address1&quot; value=&quot;#SESSION.stno#&quot;>
<input type=&quot;hidden&quot; name=&quot;address2&quot; value=&quot;#SESSION.stno2#&quot;>
<input type=&quot;hidden&quot; name=&quot;city&quot; value=&quot;#SESSION.city#&quot;>
<input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;#SESSION.state#&quot;>
<input type=&quot;hidden&quot; name=&quot;zip&quot; value=&quot;#SESSION.zip#&quot;>
<input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;>
<input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;>
<input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot; <input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot; <input type=&quot;submit&quot; value=&quot;Confirm&quot;>
</form>
</cfif>
</cfif>
<!--- </cfoutput> --->
</cfif>
 
Where is the variable total_payment coming from? I don't see anywhere in the code above the you are creating or setting it (although I may have missed it). The only time that variable appears is #DOLLARFORMAT(total_payment)#.

Are you still getting this error?
Error resolving parameter TOTAL_PAYMENT

ColdFusion was unable to determine the value of the parameter

Make sure you set your variable.



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Question: How can I define total_payment? It is not in my form directly, but should come as a result of the calculations. Therefore, would I still place total_payment in the variable listing at the top?

Pls. advise.

Thank you for your help and patience!

So:

<cfif isDefined(&quot;URL.calculate&quot;)>
<cfif #URL.calculate# is &quot;yes&quot;>
<cfif registantStatus IS &quot;Registrant with Guests&quot; AND registration_date GT &quot;05/28/04&quot;>
<cfset registrationAmount= &quot;325.00&quot;>
<cfif isDefined(&quot;Form.registrant&quot;)>
<cfoutput>
<cfif guests IS 'Yes' AND guestsallmeals IS 'Yes'>
<cfset total_registrants = (#guestsno# + 1)>
<cfset registrationAmount =325 * #total_registrants#>
<cfelse>
<cfset registrationAmount= &quot;200.00&quot;>
<cfset registrationAmount =200 * #total_registrants#>

</cfif>
</cfoutput>
</cfif>
 
It is not in my form directly, but should come as a result of the calculations
No where in this code are you running any calculations to create the &quot;total_payment&quot; variable. YOU may know what you want it to be, but CF doesn't have a clue.

Is your &quot;total_payment&quot; supposed to be the same thing as your &quot;registrationAmount&quot;? If so, just use the &quot;registrationAmount&quot; variable instead of the &quot;total_payment&quot; variable.



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Question.

I changed the &quot;total_payment&quot; to registrationAmount, but I am still getting &quot;0&quot; instead of a value. Furthermore, if it were right, I can only click on edit (which also has errors). I don't see confirm and go to paypal option.

 
The form outputs the total for single registrant and no guests. But it is still not making the calculation for registrants with guests. why? The condition has not changed much...except the totalRegistrants are only possible if the registrants selects the guests as full- paying registrants.

 
Ok dude, here's what I'm seeing:

You are setting the inital value of the variable registrationAmount
Code:
<cfparam name=&quot;FORM.registrationAmount&quot; type=&quot;string&quot; default=&quot;&quot;>    
    <cfset registrationAmount = FORM.registrationAmount>
Later, you're re-setting the value of the registrationAmount variable:
Code:
<cfif registantStatus IS &quot;Registrant Only&quot; AND registration_date LT &quot;05/28/04&quot;>
<cfset registrationAmount=&quot;295.00&quot;>
</cfif>
What happens if the user is registering for the 4th of July? What happens if the &quot;registantStatus&quot; value is not &quot;Registrant Only&quot;? Nothing happens. No value is reset, no calculations occur...nothing. You're telling CF that, unless the information provided is exactly equal to both of these 2 values, keep the default values. Most likely that's why you keep getting &quot;0&quot;, something is not matching up and the registrationAmount is not getting reset.

Looking again at your IF statements, you have:
Code:
<cfif registantStatus IS &quot;Registrant Only&quot; AND registration_date LT &quot;05/28/04&quot;>
And later:
Code:
<cfif registantStatus IS &quot;Registrant with Guests&quot; AND registration_date GT &quot;05/28/04&quot;>
What happens if there is a &quot;Registrant with Guests&quot; scheduled for 05/01/04? Nothing. With these IF statments, you're only accounting for 2 possible situations when there are several others that could happen. Never assume that your users are going to do what you want them to do, becuase they won't. You always need to have a backup plan, ask yourself &quot;But what if they DON'T do it like this?&quot;

Also, you have to remember, &quot;#URL.calculate#&quot; and &quot;URL.calculate&quot; are not the same thing to ColdFusion. &quot;URL.calculate&quot; is the Name of a variable, and &quot;#URL.calculate#&quot; is the Value of that variable.
So, ColdFusion is reading this:
Code:
<cfif #URL.calculate# is &quot;yes&quot;>
AS
Code:
<cfif Yes is &quot;yes&quot;>

It should probably be:
Code:
<cfif URL.calculate is &quot;yes&quot;>

Don't worry, we're getting there...



Hope This Helps!

Ecobb

&quot;My work is a game, a very serious game.&quot; - M.C. Escher
 
Thank you. I am going to review my code and your suggestions. I will let you know what happens.

Thank you so much.
 
How can I go about telling coldfusion the difference in prices using the variables that I have?

I will post what I have come up with shortly.
 
I reset the variables and am getting an error with URL.calculate as well as with the total registrants. I feel that I am closer to the solution, but not close enough:

Please advise. Thanks in advance for your help.
__________________________________________________


<cfoutput><cfinclude template=&quot;#request.header#&quot;></cfoutput>

<!---GET FORM ELEMENTS--->

<cfparam name=&quot;FORM.convention_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset convention_date = FORM.convention_date>

<cfparam name=&quot;FORM.registration_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registration_date = FORM.registration_date>

<cfparam name=&quot;FORM.title&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset title = FORM.title>

<cfparam name=&quot;FORM.fname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset fname = FORM.fname>

<cfparam name=&quot;FORM.mi&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset mi = FORM.mi>

<cfparam name=&quot;FORM.lname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lname = FORM.lname>

<cfparam name=&quot;FORM.nickname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset nickname = FORM.nickname>

<cfparam name=&quot;FORM.suffix&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset suffix = FORM.suffix>

<cfparam name=&quot;FORM.email&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset email = FORM.email>

<cfparam name=&quot;FORM.stno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset stno = FORM.stno>

<cfparam name=&quot;FORM.stno2&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset stno2 = FORM.stno2>

<cfparam name=&quot;FORM.city&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset city = FORM.city>

<cfparam name=&quot;FORM.state&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset state = FORM.state>

<cfparam name=&quot;FORM.zip&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset zip = FORM.zip>

<cfparam name=&quot;FORM.country&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset country = FORM.country>

<cfparam name=&quot;FORM.hphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset hphone = FORM.hphone>

<cfparam name=&quot;FORM.wphone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset wphone = FORM.wphone>

<cfparam name=&quot;FORM.fax&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset fax = FORM.fax>


<cfparam name=&quot;FORM.emercontact&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset emercontact = FORM.emercontact>


<cfparam name=&quot;FORM.ephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset edphone = FORM.edphone>


<cfparam name=&quot;FORM.eephone&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset eephone = FORM.eephone>


<cfparam name=&quot;FORM.region&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset region = FORM.region>


<cfparam name=&quot;FORM.district&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset district = FORM.district>


<cfparam name=&quot;FORM.lodgeno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodgeno = FORM.lodgeno>


<cfparam name=&quot;FORM.lodgename&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodgename = FORM.lodgename>


<cfparam name=&quot;FORM.committee&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset committee = FORM.committee>


<cfparam name=&quot;FORM.lodge_pres&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset lodge_pres = FORM.lodge_pres>

<cfparam name=&quot;FORM.registration_type&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registration_type = FORM.registration_type>

<cfparam name=&quot;FORM.gfullname&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gfullname = FORM.gfullname>

<cfparam name=&quot;FORM.gcity&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gcity = FORM.gcity>

<cfparam name=&quot;FORM.gstate&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gstate = FORM.gstate>

<cfparam name=&quot;FORM.gcountry&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset gcountry = FORM.gcountry>

<cfparam name=&quot;FORM.guestsallmeals&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset guestsallmeals = FORM.guestsallmeals>

<cfparam name=&quot;FORM.guestsno&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset guestsno = FORM.guestsno>

<cfparam name=&quot;FORM.registrationAmount&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registrationAmount = FORM.registrationAmount>

<cfparam name=&quot;FORM.registration_date&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registration_date = FORM.registration_date>
<cfif registration_date LT 05/28/04>
<cfset registrationAmount=295>
<cfelse>
<cfset registrationAmount=325>
</cfif>


<!--- <cfparam name=&quot;FORM.registrationStatus&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset registrationStatus = FORM.registrationStatus> --->

<cfparam name=&quot;FORM.registrantStatus&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfif registrantStatus IS 'Registrant_Guests' AND guestsallmeals IS 'yes'>
<cfset total_registrants = (#guestsno# +1)>
<cfelse>
<cfset total_registrants = 1>
</cfif>




<!---
<cfif registantStatus IS &quot;Registrant Only&quot; AND registration_date LT &quot;05/28/04&quot;>
<cfset registrationAmount=&quot;295.00&quot;>
</cfif> --->


<cfparam name=&quot;FORM.total_registrants&quot; type=&quot;string&quot; default=&quot;&quot;>
<cfset total_registrants = FORM.total_registrants>

<!--- Finish form elements --->

<table cellpadding=&quot;2&quot; cellspacing=&quot;2&quot; border=&quot;0&quot;><tr><td class=&quot;text&quot;>
<span class=&quot;boldtext&quot;>Please check the information below and confirm. You will then be taken to <b>PayPal</b> to make a donation.</span>
</td></tr>
<td>
<cfoutput>
<table>
<tr>
<TR>
<TD class=&quot;boldtext&quot;>
Convention: <span class=&quot;text&quot;>#convention_date#</span><br><br>

1Registration Status: <span class=&quot;text&quot;>#registantStatus#</span><br><br>

Prefix: <span class=&quot;text&quot;>#title#</span><br><br>

First Name: <span class=&quot;text&quot;>#fname#</span><br><br>

MI:<span class=&quot;text&quot;>#mi#</span><br><br>

Last Name: <span class=&quot;text&quot;>#lname#</span><br><br>

Suffix: <span class=&quot;text&quot;>#suffix#</span><br><br>

Nickname: <span class=&quot;text&quot;>#nickname#</span><br><br>

Email:<span class=&quot;text&quot;>#email#</span><br><br>

Address:<span class=&quot;text&quot;>#stno#</span><br><br>

Apt.<span class=&quot;text&quot;>#stno2#</span><br><br>

City:<span class=&quot;text&quot;>#city#</span><br><br>

State/Province:<span class=&quot;text&quot;>#state#</span><br><br>

Zip/Postal Code:<span class=&quot;text&quot;>#zip#</span><br><br>

Country:<span class=&quot;text&quot;>#country#</span>
<br><br>

<span class=&quot;boldtext&quot;>Daytime Phone</span> (incl. area code):<span class=&quot;text&quot;>#hphone#</span><br><br>

<span class=&quot;boldtext&quot;>Evening Phone</span> (incl. area code):<span class=&quot;text&quot;>#wphone#</span><br><br>

<span class=&quot;boldtext&quot;>Fax</span> (incl. area code):<span class=&quot;text&quot;>#fax#</span><br><br>


Emergency Contact:<span class=&quot;text&quot;>#emercontact#</span><br><br>


<span class=&quot;boldtext&quot;>Emergency Daytime Phone </span>(incl. area code):
<span class=&quot;text&quot;>#edphone#</span><br><br>

<span class=&quot;boldtext&quot;>Emergency Evening Phone</span>(incl. area code):<span class=&quot;text&quot;>#eephone#</span>
<br><br>

<!-----Membership Information----->

<span class=&quot;boldtext&quot;>Select a Region</span> (for all members in USA or British Columbia):<span class=&quot;text&quot;>#region#</span><br><br>

<span class=&quot;boldtext&quot;>District</span>(Overseas members only):<span class=&quot;text&quot;>#district#</span><br><br>

Unit/Lodge Number:<span class=&quot;text&quot;>#lodgeno#</span><br><br>

<span class=&quot;boldtext&quot;>Unit/Lodge Name</span>(Required for delgates and alternates representing Units & Lodges):<span class=&quot;text&quot;>#lodgename#</span><br><br>


<span class=&quot;boldtext&quot;>Are you interested in serving on a Convention Buisness Committee, and if so will you be available to attend a meeting on Sunday June 27th?</span><br><span class=&quot;text&quot;>#committee#</span><br><br>


<span class=&quot;boldtext&quot;>Will you be a Unit/Lodge President when the convention takes place?</span><br><span class=&quot;text&quot;>#lodge_pres#</span><br><br>

Registration Type:<span class=&quot;text&quot;>#registration_type#</span><br><br>


Will you have guests?<span class=&quot;text&quot;>#registantStatus#</span><br><br>

Total Registrants:
<cfif registrantStatus IS 'Registrant_Guests' and guestsallmeals IS 'yes'>
#total_registrants#
</cfif>

How many guests will you have?<span class=&quot;text&quot;>#guestsno#</span><br><br>


Do you want to register your guests for all sessions, events, and meals?<br>
<span class=&quot;text&quot;>#guestsallmeals#</span><br><br>

Guest 1 Full Name: <span class=&quot;text&quot;>#gfullname#</span><br><br>

Guests 1's city:<span class=&quot;text&quot;>#gcity#</span><br><br>

State:<span class=&quot;text&quot;>#gstate#</span><br><br>

Country:<span class=&quot;text&quot;>#gcountry#</span><br><br>
</td>
</tr></table>
<!--- Calculate Registration Fees if 'Guests' is not selected & registrant is on time --->



<form action=&quot;test.cfm&quot; method=&quot;post&quot;>
<input type=&quot;hidden&quot; name=&quot;mode&quot; value=&quot;edit&quot;>
<input type=&quot;submit&quot; value=&quot;Go Back & Edit&quot;>
</form>


<form action=&quot; method=&quot;post&quot;>
<tr><td class&quot;text&quot;>
<span class=&quot;text&quot;>
<b>The following fees are required for your registration:</b><br><br>
Registration Fees: <b>#DOLLARFORMAT(registrationAmount)#</b>
</span></td></tr>


<cfif URL.calculate is &quot;yes&quot;>
<input type=&quot;hidden&quot; name=&quot;item_name&quot; value=&quot;Convention Registration&quot;>
<input type=&quot;hidden&quot; name=&quot;cmd&quot; value=&quot;_ext-enter&quot;>
<input type=&quot;hidden&quot; name=&quot;redirect_cmd&quot; value=&quot;_xclick&quot;>
<input type=&quot;hidden&quot; name=&quot;business&quot; value=&quot;website@bnaibrith.org&quot;>
<input type=&quot;hidden&quot; name=&quot;item_number&quot; value=&quot;#session.total_registrants#&quot;>
<input type=&quot;hidden&quot; name=&quot;first_name&quot; value=&quot;#SESSION.fname#&quot;>
<input type=&quot;hidden&quot; name=&quot;amount&quot; value=&quot;#SESSION.registrationAmount#&quot;>
<input type=&quot;hidden&quot; name=&quot;last_name&quot; value=&quot;#SESSION.lname#&quot;>
<input type=&quot;hidden&quot; name=&quot;address1&quot; value=&quot;#SESSION.stno#&quot;>
<input type=&quot;hidden&quot; name=&quot;address2&quot; value=&quot;#SESSION.stno2#&quot;>
<input type=&quot;hidden&quot; name=&quot;city&quot; value=&quot;#SESSION.city#&quot;>
<input type=&quot;hidden&quot; name=&quot;state&quot; value=&quot;#SESSION.state#&quot;>
<input type=&quot;hidden&quot; name=&quot;zip&quot; value=&quot;#SESSION.zip#&quot;>
<input type=&quot;hidden&quot; name=&quot;no_note&quot; value=&quot;1&quot;>
<input type=&quot;hidden&quot; name=&quot;no_shipping&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;currency_code&quot; value=&quot;USD&quot;>
<input type=&quot;hidden&quot; name=&quot;tax&quot; value=&quot;0&quot;>
<input type=&quot;hidden&quot; name=&quot;return&quot; value=&quot; <input type=&quot;hidden&quot; name=&quot;notify_url&quot; value=&quot; <input type=&quot;submit&quot; value=&quot;Confirm&quot;>
</form>
</cfif>
</cfoutput>



<cfoutput><cfinclude template=&quot;#request.footer#&quot;></cfoutput>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top