Skip to main content
Participant
October 30, 2014
Answered

XMLParse error with Paymentech

  • October 30, 2014
  • 2 replies
  • 531 views

So our credit card processing started generating an error out of the blue on October 28th between 3pm and 10pm ET. Last successful transaction 3:14pm then failure from 10:50pm onward. We deal with Chase Paymentech and apparently 4 other merchants experienced the same problem, same error, same time frame. This is the error:

An error occured while Parsing an XML document. Content is not allowed in prolog.

The error occurred on line 66

For us on line 66 is: <cfset myXMLDocument = XmlParse(#objGet.filecontent#)>

We do some filtering beforehand:

<cfscript>

function stripHTML(str) {

return REReplaceNoCase(str,"<[^>]*>","","ALL");

}

</cfscript>

This has been working since 2009 no problem, and we haven't changed a thing. We host on Black Iron/Rogers in Canada. I'm not sure where the other merchants host.

Paymentech is saying it's a Coldfusion problem, Rogers is saying it's an XML problem. We're caught in the middle. Reaching out here for some help.

Has Coldfusion pushed an update to servers? Has Paymentech changed something? The technical support has been pretty mediocre from all companies involved so far.

    This topic has been closed for replies.
    Correct answer mcbwestcoast

    It turns out it was "an obscure bug in Coldfusion runtime and security provider libraries that manifests itself for some SSL certificates" - these three lines of code will save you a lot of time and bother. Check this solution out if you've recently updated your SSL certificate and you get parsing errors.

    <cfset objSecurity = createObject("java", "java.security.Security") />

    <cfset storeProvider = objSecurity.getProvider("JsafeJCE") />

    <cfset objSecurity.removeProvider("JsafeJCE") />

    Put these immediately before making the CFHTTP call to the secure server.

    2 replies

    mcbwestcoastAuthorCorrect answer
    Participant
    November 1, 2014

    It turns out it was "an obscure bug in Coldfusion runtime and security provider libraries that manifests itself for some SSL certificates" - these three lines of code will save you a lot of time and bother. Check this solution out if you've recently updated your SSL certificate and you get parsing errors.

    <cfset objSecurity = createObject("java", "java.security.Security") />

    <cfset storeProvider = objSecurity.getProvider("JsafeJCE") />

    <cfset objSecurity.removeProvider("JsafeJCE") />

    Put these immediately before making the CFHTTP call to the secure server.

    BKBK
    Community Expert
    Community Expert
    November 1, 2014

    A Byte Order Mark (BOM) probably got in the way. Ben Nadel shows one way to deal with a BOM.

    You could replace <cfset myXMLDocument = XmlParse(#objGet.filecontent#)> with the 3 lines,

    <!--- Remove extraneous space --->

    <cfset trimmedContent = trim(objGet.filecontent)>

    <!--- Remove BOM --->

    <cfset filteredContent =replace(trimmedContent,chr(65279),"","all")>

    <cfset myXMLDocument = XmlParse(filteredContent)>