Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Paymentech,XML,MIME Headers
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00832372
Message ID:
00832449
Vues:
30
Hi Todd,

I think there's a typo in the following line.
lHttp.SetRequestHeader("Content-type", "application/PT19")
>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?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform