I am working on making an existing small website compatible with the Ariba punchout.
I can read the incoming setup, do a response and then redirect them to a valid login back to the website.
On the Ariba punchout tester, this all works correctly and can add items to the cart.
I am attempting to complete the process and send the PunchOutOrderMessage back to the cart.
In the cXML documentation example, it has the following format:
<input type="hidden" name="cxml-urlencoded" value="<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
.... etc
I have configured the same message, but with the correct details for the cart punchout.
I am at a loss though how to get it to send back to the Ariba site. Doing the punchout provides the Form POST URL, which I am supposed to send the form back to.
I tried the methods from here: How to make HTTP POST web request to connect to the web server, but wasn't sure what to do with the message. I have just loaded it in as text:
ServicePointManager.ServerCertificateValidationCallback += new System.Net.Security.RemoteCertificateValidationCallback(ValidateRemoteCertificate);
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
var content = new StringContent(strPost);
var response = await client.PostAsync(PostURL, content);
var responseString = await response.Content.ReadAsStringAsync();
Checking the ResponseString just provides a full web page from Ariba, as if I had just gone to the site manually.
The embedded browser just stays open on the punchout site and doesn't go anywhere.
Has anybody had any success connecting back to the Ariba site and posting an order?