DJBenLogan
10-25-2005, 10:09 AM
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&"¤cycode="&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
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&"¤cycode="&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