Jump to content

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,


Link to comment
Share on other sites

  • 2 weeks later...
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • 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.