Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Paymentech,XML,MIME Headers
Message
General information
Forum:
Visual FoxPro
Category:
Third party products
Title:
Paymentech,XML,MIME Headers
Miscellaneous
Thread ID:
00832372
Message ID:
00832372
Views:
69
Paymentech, a credit card processor, has the capability to send the credit card request by XML. I've got the XML file setup OK. When sending it, I get a "Mime header data is invalid" response back. My problem, I think, is how do you include MIME header data in an XML request?

My code looks like this:

PRIVATE lDomain, lHttp, lLoad
lDomain = createobject("Microsoft.XMLDOM")
lDomain.Async = .F.
lHttp = CREATEOBJECT("MSXML2.xmlHttp")
lLoad = lDomain.Load(x)
IF !lLoad
?lDomain.ParseError.reason
return
ENDIF

lHttp.Open("POST", "https://epayhipvar.paymentech.net", .f.)
lHttp.SetRequestHeader("MIME-Version", "1.0")
lHttp.SetRequestHeader("Content-type", "application/PTI9")
lHttp.SetRequestHeader("Content-length", ALLTRIM(STR(LEN(x))))
lHttp.SetRequestHeader("Content-transfer-encoding", "text")
lHttp.SetRequestHeader("Request-number", "001")
lHttp.SetRequestHeader("Document-type", "Request")
lHttp.Send(lDomain)

?lHttp.ResponseText
=====================================================
Their documentation for the XML says this:

An example of this post would look something like:

POST/authorize HTTP/1.0
MIME-Version: 1.0
Content-type: application/PT19
Content-length:1883
Content-transfer-encoding:text
Request-number:1
Document-type:Request

----- the actual XML ---

Please note that the content length indicates the length of the XML document located in the payload of the HTTPS request.
========================================================
Any ideas for this XML newbie?
Next
Reply
Map
View

Click here to load this message in the networking platform