Complex Object error with IPN PayPal
I'm at my wits end. I know it's got to be obvious, but I can't find it. I am getting the error, "Complex object types cannot be converted to simple values." when my PayPal IPN returns the validation. I get this with the first line of code where I try to get the variables and their values. I don't see any reserved words being used in the string.
The weird thing? This code has worked fine for the last 3 years. I have no idea what could have changed. I can't think of anything that would have effected this. The error is from the line below that is in red.
Can anyone suggest a way that I can test this line-by-line? I'm receiving the error report, but it doesn't really say more than the error above. It does show all the variables and their values, but I just don't see anything wrong in it.
<CFSET str="cmd=_notify-validate">
<cfparam name="TEMPSTR" default="">
<CFIF IsDefined("FORM.fieldnames")>
<CFLOOP INDEX="TheField" list="#Form.FieldNames#">
<CFSET tempstr = variables.tempstr & "&#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#">
</CFLOOP>
</CFIF>
<CFIF IsDefined("FORM.payment_date")>
<CFSET tempstr = variables.tempstr & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
</CFIF>
<CFIF IsDefined("FORM.subscr_date")>
<CFSET tempstr = variables.tempstr & "&subscr_date=#URLEncodedFormat(Form.subscr_date)#">
</CFIF>
Below are the formfields and values from PayPal to the IPN.cfm page that is hanging in the form.fieldnames loop. All the values have been changed to bogus values, but they are the same format.
mc_gross=4.00&
protection_eligibility=Eligible&
address_status=confirmed&
payer_id=A123BCDEFGH123&
tax=0.00&
address_street=123 Sesame Street&
payment_date=16:37:05 Apr 11, 2010 PDT&
payment_status=Completed&
charset=windows-1252&
address_zip=12345-6789&
first_name=Jane&
mc_fee=0.32&
address_country_code=US&
address_name=Jane Doe&
notify_version=2.9&
custom=123456789&
payer_status=verified&
business=test@aol.com&
address_country=United States&
address_city=Orlando&
quantity=1&
verify_sign=ABcdeFgHIJk13j.n-uTG&
txn_id=ZXWYRT123&
payment_type=instant&
last_name=Doe&
address_state=FL&
payment_fee=0.32&
receiver_id=KLJIOUY789&
txn_type=web_accept&
item_name=tshirt&
mc_currency=USD&
item_number=456&
residence_country=US&
handling_amount=0.00&
transaction_subject=789&
payment_gross=1.00&
shipping=0.00
