Jump to content

Recommended Posts

Hi,

 

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?

<To>
<Credential domain="DUNS">
<Identity>83528721</Identity>
</Credential>
</To>
 
 

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">
  <Response>
<Status code="200" text="Success connected!" xml:lang="en-US"/>
<PunchOutSetupResponse>
 <StartPage>
 </StartPage>
</PunchOutSetupResponse>
  </Response>
</cXML>
 
    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">
<Header>
<From>
<Credential domain="DUNS">
<Identity>83528721</Identity>
</Credential>
</From>
<To>
<Credential domain="DUNS">
<Identity>65652314</Identity>
</Credential>
</To>
<Sender>
<Credential domain="workchairs.com">
<Identity>website 1</Identity>
</Credential>
<UserAgent>Workchairs cXML Application</UserAgent>
</Sender>
</Header>
<Message>
<PunchOutOrderMessage>
<BuyerCookie>1CX3L4843PPZO</BuyerCookie>
<PunchOutOrderMessageHeader operationAllowed="edit">
<Total>
<Money currency="USD">763.20</Money>
</Total>
</PunchOutOrderMessageHeader>
<ItemIn quantity="3">
<ItemID>
<SupplierPartID>5555</SupplierPartID>
<SupplierPartAuxiliaryID>E000028901
</SupplierPartAuxiliaryID>
</ItemID>
<ItemDetail>
<UnitPrice>
<Money currency="USD">763.20</Money>
</UnitPrice>
<Description xml:lang="en">
<ShortName>Excelsior Desk Chair</ShortName>
Leather Reclining Desk Chair with Padded Arms
</Description>
<UnitOfMeasure>EA</UnitOfMeasure>
<Classification domain="UNSPSC">5136030000
</Classification>
<LeadTime>12</LeadTime>
</ItemDetail>
</ItemIn>
</PunchOutOrderMessage>
</Message>
</cXML>

 

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

 

 

  

Regards & Thanks,

Zinho

Link to comment
https://forums.phpfreaks.com/topic/282595-cxml-punchout-with-php/
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.

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