MS SQL Server 2012
Greetings. I need some help with a registration form.
In brief: I need to add "getConferenceAmount.amoun
t" and "getPreconferenceAmount.Pr
eAmount" to obtain a combined value -- "amount" which I submit to authorize.net.
Can I use cfset to do this? For example:
<!--- obtain a valid amount for variable "amount"; this will confirm that amount entered is correct amount --->
<cfquery name="getConferenceAmount" datasource="#application.datasource#">
SELECT amount, ConferenceFeeTitle
WHERE ConferenceFeeTypeID = <cfqueryparam cfsqltype="cf_sql_integer" value="#FORM.ConferenceFeeTypeID#">
<cfif getConferenceAmount.recordCount eq 0>
The payment amount is invalid.
<!--- obtain a valid amount for variable "form.PreconferenceAmount"; this will obtain a value for PreconferenceAmount --->
<cfquery name="getPreconferenceAmount" datasource="#application.datasource#">
WHERE RegisterID = <cfqueryparam cfsqltype="cf_sql_integer" value="#val(form.RegisterID)#">
<!--- add getConferenceAmount.amount and getPreconferenceAmount.PreconferenceAmount to obtain combined amount --->
<cfset amount = getConferenceAmount.amount + getPreconferenceAmount.PreconferenceAmount>
The public form is located here:
"PreconferenceAmount" is a checkbox that the client wants me to add; this is a last-minute change of scope.
Basically, I need to submit one value -- "amount" -- to authorize.net, but I need to add values (Conference and PreConference) to derive "amount".
Am I on the right track? Thank you as always.