Jump to content


This topic is now archived and is closed to further replies.


cXML punchOut with PHP

Recommended Posts



Recently i need to implement cXML punchOut Transaction from a procurement system with my e-commerce website. The process required 3 steps to complete. PunchOutSetupRequest, PunchOutSetupResponse and PunchOutOrderMessage. Although I manage to find some XML user guide online, but i am still not very sure how it work. Please help me if there someone familiar with cXML punchOut.


1) where to get the DUNS identity? Can we replace by our own ID?

<Credential domain="DUNS">

2) I tried to use php curl to send the PunchOutSetupRequest to the our receive page and i manage to use file_get_contents('php://input') to get the XML parameters. Is this the same way it work?



3) after retrieved the XML parameters, authenticated, then echo the below code:


<?xml version="1.0" encoding="UTF-8"?>
<cXML payloadID="myPayloadID" timestamp="20131001T153612@mydomain" version="1.2.009" xml:lang="en-US">
<Status code="200" text="Success connected!" xml:lang="en-US"/>
    it will PunchOutSetupResponse back to the procurement system and redirect to my ecommerce website?
4) after checkout, i need to do PunchOutOrderMessage, echo the below code:

<?xml version="1.0"?>
<cXML xml:lang="en-US" payloadID="myPayloadID" timestamp="20131001T153612@mydomain">
<Credential domain="DUNS">
<Credential domain="DUNS">
<Credential domain="workchairs.com">
<Identity>website 1</Identity>
<UserAgent>Workchairs cXML Application</UserAgent>
<PunchOutOrderMessageHeader operationAllowed="edit">
<Money currency="USD">763.20</Money>
<ItemIn quantity="3">
<Money currency="USD">763.20</Money>
<Description xml:lang="en">
<ShortName>Excelsior Desk Chair</ShortName>
Leather Reclining Desk Chair with Padded Arms
<Classification domain="UNSPSC">5136030000


  it will send the data back to the procurement system. Is it correct?




Regards & Thanks,


Share this post

Link to post
Share on other sites

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.