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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Processing error

Status
Not open for further replies.

GUJUm0deL

Programmer
Joined
Jan 16, 2001
Messages
3,676
Location
US
I'm having some issues with PayPal. I did a CFDUMP of the CFHTTP and got this:

Code:
CFHTTP - struct 
Charset [empty string] 
ErrorDetail I/O Exception: peer not authenticated 
Filecontent Connection Failure 
Header [undefined struct element] 
Mimetype Unable to determine MIME type of file. 
Responseheader struct [empty] 
 
Statuscode Connection Failure. Status code unavailable. 
Text YES

THis is my code:
Code:
	<cfif attributes.method is "paypal">
	
		<!--- read post from PayPal system and add 'cmd' --->
		<CFSET str="cmd=_notify-validate">
		
		<CFLOOP INDEX="TheField" list="#Form.FieldNames#">
			<CFSET str = str & "&#LCase(TheField)#=#URLEncodedFormat(Evaluate(TheField))#">
		</CFLOOP>
		
		<CFIF IsDefined("FORM.payment_date")>
			<CFSET str = str & "&payment_date=#URLEncodedFormat(Form.payment_date)#">
		</CFIF>
		
		<CFIF IsDefined("FORM.subscr_date")>
			<CFSET str = str & "&subscr_date=#URLEncodedFormat(Form.subscr_date)#">
		</CFIF>
		
		<!--- post back to PayPal system to validate --->
		<CFHTTP URL="[URL unfurl="true"]https://www.paypal.com/cgi-bin/webscr?#str#"[/URL] METHOD="GET" RESOLVEURL="false"></CFHTTP>
		
		<!--- debugging --->
		<cfoutput>
			#cfhttp.filecontent#
			<p>&nbsp;</p>
			<strong>str -</strong> #str#
			<p>&nbsp;</p>
			<a href="[URL unfurl="true"]https://www.paypal.com/cgi-bin/webscr?#str#">https://www.paypal.com/cgi-bin/webscr?#str#</a>[/URL]
		</cfoutput>
		
		<!-- check notification validation -->
		<CFIF #CFHTTP.FileContent# is "VERIFIED">
			<cfif FORM.payment_status eq "Completed">
				<cfif #FORM.RECEIVER_EMAIL# eq "paypal@emailaddresshere.com">
					<!-- process payment -->				
					<cftry>   
						<cfmail to="" from="" subject="" bcc="" type="html">
							SEND CUSTOME EMAIL AND BCC CLIENT...
						</cfmail>
					<cfcatch>
						ERROR!!
					</cfcatch>
					</cftry>
				</cfif>
			</cfif>
		<CFELSEIF #CFHTTP.FileContent# is "INVALID">
			<!-- 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.
		<CFELSEIF #CFHTTP.FileContent# is "Connection Failure">
			<cfdump var="#CFHTTP#" label="CFHTTP">
		<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>
	</cfif>

Any ideas?

____________________________________
Just Imagine.
 
Any ideas why I keep getting 'ErrorDetail I/O Exception: peer not authenticated'?

____________________________________
Just Imagine.
 
'Cause something's not set up right. Have you run this error through the PayPal support forums?


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
Not yet. I came here first because there are a lot of great developers here and maybe one of them ran into this issue.

Besides the reply rate here is much faster then paypal - I loathe paypal, lol...

____________________________________
Just Imagine.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top