0

I am trying to integrate a PunchOut system with a PHP website.

I am able to read CXML responses from PunchOut, but I am unable to post CXML data back to the system.

My code is below:

jQuery.ajax({
    url: '/psc/fssnd/EMPLOYEE/ERP/c/PV_MAIN_MENU.PV_DC_CATCHER.GBL?Page=PV_DC_CATCHER^&MSGNODENAME=MY_NODE',
    data: { cxml: cxml_data }, 
        crossDomain: true,
    type: 'POST',
    contentType: "application/xml; charset=utf-8",
    dataType: "xml",
    cache: false,
    error: function() { 
                alert("No data found."); 
            },
    success: function(xml) {
        alert("it works");          
    }
});
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Salim Mujawar
  • 63
  • 1
  • 1
  • 7
  • Tidied up the English – LordWilmore Jan 30 '18 at 14:56
  • Hi, Salim! Would you mind to tell me how did you read the cXML? I'm struggling with something similar: https://stackoverflow.com/questions/59337685/catch-cxml-urlencoded-with-php-not-post-or-get – Uriel Dec 17 '19 at 04:08

1 Answers1

0

My issue is resolved now, the issue was:

  1. CXML was not in the correct format, a node was missing

  2. Punch Out vendor had not white-listed our IP in their network.

Salim Mujawar
  • 63
  • 1
  • 1
  • 7