Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: XML and UTF-8?

  1. #1
    New to the CF scene
    Join Date
    Feb 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XML and UTF-8?

    Hi folks

    I am working on an ecommerce website using ASP and the EPDQ merchant account from Barclays.

    We are at the payment integration stage and we are getting the following error message when posting the XML.

    Content type application/x-www-form-urlencoded; Charset=UTF-8 is unsupported - expecting application/x-www-form-urlencoded or text/plain

    I have included the ASP CODE

    <%Session.LCID = 2057%>
    <%Response.Charset = ""%>
    <%
    ' Filename : page name here.asp
    ' Created On : 1st June 2005
    ' Author : Ben G Logan (info@spotlessdesign.com)
    ' Updated On : 11th June 2005
    ' Author : Simon Chapman (webmaster@digitalideas.co.uk)
    ' Purpose : page detail here.
    %>

    <!--#include file="includes/openConnection.asp"-->

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

    <head>
    <title>Pre-Confirmation</title>

    </head>

    <body>

    <%
    strClientID = "REMOVED"
    strUsername = "REMOVED"
    strPassword = "04687260"
    strOrderID = "123456"
    strChargeType = "Auth"
    strCurrencyCode = "826"
    strTotal = "£99.99"

    strMerchantName = "REMOVED"
    'strAddress = ""
    'strTownCity = ""
    'strCountyState = ""
    'strCountry = ""
    'strPostalCode = ""
    'strEmailAddress = ""
    'strPhone = ""
    'Now find the categories
    Set objRS = Server.CreateObject("ADODB.Recordset")
    strSQL = "SELECT * FROM tbl_Customers WHERE intCustomerID = " & Session("intCustomerID")
    objRS.Open strSQL, objConn

    strFirstName = objRS("strFirstName")
    strLastName = objRS("strLastName")
    strEmailAddress = objRS("strEmailAddress")
    strPhone = objRS("strTelephoneNo")

    objRS.Close
    Set objRS = Nothing

    'Billing address
    Set objRS12 = Server.CreateObject("ADODB.Recordset")
    strSQL12 = "SELECT * FROM tbl_Addresses INNER JOIN " & _
    "tbl_Customers ON tbl_Addresses.intAddressID = tbl_Customers.intBillingAddressID " & _
    "WHERE (tbl_Customers.intCustomerID = " & Session("intCustomerID") & ")"
    'Response.write strSQl2
    objRS12.Open strSQL12, objConn

    strAddress = objRS12("strNumberName") & " " & objRS12("strStreet") & " "
    strTownCity = (objRS12("strTownCity") & " ")
    strCountyState = (objRS12("strCountyState") & " ")
    strCountry = (objRS12("strCountry") & " ")
    strPostalCode = (objRS12("strPostalCode") & " ")

    objRS12.Close
    Set objRS12 = Nothing

    Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")
    objXmlHttp.open "POST", "https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdqEncTool.e", False
    objXmlHttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    objXmlHttp.setRequestHeader "Charset", "text/plain"

    strPayStr = "clientid="&strClientID&"&password="&strPassword&"&oid="&strOrderID&"&chargetype="&strChargeType&"&c urrencycode="&strCurrencyCode&"&total="&strTotal
    objXmlHttp.send strPayStr

    Dim strEPDQ
    strEPDQ = objXmlHttp.responseText
    Set objXmlHttp = Nothing
    %>

    <form method="post" action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e">
    <%= strEPDQ %>
    <input type="hidden" name="returnurl" value="REMOVED">
    <input type="hidden" name="merchantdisplayname" value="<%=Left(strMerchantName, 30)%>">
    <input type="hidden" name="baddr1" value="<%=strAddress%>">
    <input type="hidden" name="bcity" value="<%=strTownCity%>">
    <input type="hidden" name="bcountyprovince" value="<%=strCountyState%>">
    <input type="hidden" name="bpostalcode" value="<%=strPostalCode%>">
    <input type="hidden" name="bcountry" value="<%=strCountry%>">
    <input type="hidden" name="email" value="<%=strEmailAddress%>">
    <input type="hidden" name="btelephonenumber" value="<%=strPhone%>">

    <!--#include file="includes/closeConnection.asp"-->
    </body>
    </HTML>




    We have tried changing the doc type and also the Content Type and Charset.

    Does anyone have any suggestions on this one?

    Cheers

    Ben

  • #2
    New to the CF scene
    Join Date
    May 2010
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi There.

    Did you ever manage to resolve this...

    I have the same and cant figure out why.

    Tom

  • #3
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Same Problem

    We have just moved from a Cactushop commercial shopping cart installation from IIS6 to IIS7 and have exactly the same problem. Cactushop support have indicated that it 'must' be a server configuration error. However we have full control over the server and have changed default charsets and still have this problem.

    If you managed to resolve this or anyone else has any pointers, advice would be gratefully received.

    Thanks

  • #4
    New to the CF scene
    Join Date
    Jan 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JBeardon, try this

    Just had the same problem myself. The Barclays EPDQ documentation (ver 10) suggests switching from this:

    Set objXmlHttp = Server.CreateObject("Msxml2.ServerXMLHTTP")

    to this:

    Set objXmlHttp = Server.CreateObject("Msxml2.XMLHTTP")

    The latter object seems to work fine in our EPDQ implementation. Hope this helps.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •