Xml Amazon business API-订单项目未映射到Amazon business帐户

Xml Amazon business API-订单项目未映射到Amazon business帐户,xml,amazon-web-services,soap,Xml,Amazon Web Services,Soap,我们正在尝试将Amazon业务API集成到网站中 这就是项目的流程。募捐者将把来自亚马逊商业api的产品添加到项目中,然后管理员批准/发布到网站中。一旦通过网站为各个项目筹集资金。管理员将从亚马逊购买产品 我们已经生成了亚马逊电子采购punchout URL,我们可以进入亚马逊商业网站并将产品添加到购物车中。单击“提交这些项目以供批准”后,我们可以在项目中获得购物车响应。但问题是订单id没有生成,并且无法在亚马逊网站管理员帐户的“批准订单”页面中看到这些订单 下面是我们发送给amazon bus

我们正在尝试将Amazon业务API集成到网站中

这就是项目的流程。募捐者将把来自亚马逊商业api的产品添加到项目中,然后管理员批准/发布到网站中。一旦通过网站为各个项目筹集资金。管理员将从亚马逊购买产品

我们已经生成了亚马逊电子采购punchout URL,我们可以进入亚马逊商业网站并将产品添加到购物车中。单击“提交这些项目以供批准”后,我们可以在项目中获得购物车响应。但问题是订单id没有生成,并且无法在亚马逊网站管理员帐户的“批准订单”页面中看到这些订单

下面是我们发送给amazon business的请求代码。请指导/建议我们在哪里犯了错误

Punchout设置请求:

<?php
    $soapUrl = "https://www.amazon.com/eprocurement/punchout";
    $xml_post_string = '<?xml version = "1.0" encoding = "UTF-8"?>
      <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.007/cXML.dtd">
      <cXML version="1.2.007" xml:lang="en-US" payloadID="123456.123456@amazon.com" timestamp="2016-09-01T01:50:29-05:00">
      <Header>
        <From>
          <Credential domain="NetworkId">
            <Identity>abcd123</Identity>
          </Credential>
        </From>
        <To>
           <Credential domain="NetworkId">
             <Identity>Amazon</Identity>
           </Credential>
        </To>
        <Sender>
           <Credential domain="NetworkId">
              <Identity> abcd123</Identity>
              <SharedSecret>test secret</SharedSecret>
           </Credential>
           <UserAgent>amazon.com</UserAgent>
        </Sender>
      </Header>
      <Request>
        <PunchOutSetupRequest operation="create">
          <BuyerCookie>1234567</BuyerCookie>
          <Extrinsic name="RequestID">5826623</Extrinsic>
          <Extrinsic name="MUDID">CLS21518</Extrinsic>
          <Extrinsic name="Location">RTP</Extrinsic>
          <Extrinsic name="Country">UNITED STATES</Extrinsic>
          <Extrinsic name="Email">user@email.org</Extrinsic>
          <Extrinsic name="ClientMUDID">CLS21518</Extrinsic>
          <Extrinsic name="UserEmail">user@email.org</Extrinsic>
          <Extrinsic name="Division">Corporate</Extrinsic>
          <Extrinsic name="StartDate">1/9/2016 2:34:36 PM</Extrinsic>
          <BrowserFormPost>
            <URL>http://www.test.com/ test/response.php</URL>
          </BrowserFormPost>
          <Contact>
            <Name xml:lang="en-US">Jones, Tom</Name>
            <Email>user@email.org</Email>
          </Contact>
          <SupplierSetup>
            <URL>http://workchairs.com/cxml</URL>
          </SupplierSetup>
        </PunchOutSetupRequest>
      </Request>
      </cXML>';

    $headers = array(
      "Content-type: text/xml;charset=\"utf-8\"",
      "Accept: text/xml",
      "Cache-Control: no-cache",
      "Pragma: no-cache",
      "SOAPAction: https://www.amazon.com/eprocurement/punchout",
      "Content-length: ".strlen($xml_post_string),
    );

    $url = $soapUrl;
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
    curl_setopt($ch, CURLOPT_TIMEOUT, 10);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $xml_post_string); // the SOAP request
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $response = curl_exec($ch);
    curl_close($ch);
    echo "<pre>"; print_r($parser); exit;
?>
Punchout订单信息:

我们成功地收到了亚马逊商务部的回复。但订单详细信息并未与实际的亚马逊商业账户对应

以便在管理方提供资金后购买产品。订单详情需要在亚马逊商业账户中提供


我们是否缺少请求脚本?或者是否需要在Amazon商业帐户中进行任何设置?

使用https方法尝试请求。@fairoz,我们已经通过https尝试了请求方法。现在,amazon管理员帐户接收电子邮件。但“批准订单”中没有订单项目详细信息。请告诉我好吗。在你的亚马逊商业punchout项目中,你有没有在特定部门工作过,比如“书籍”等???
SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [payloadID] => 1234567981324.123.1234@amazon.com
            [timestamp] => 2016-09-01T10:37:29+10:37
        )

    [Response] => SimpleXMLElement Object
        (
            [Status] => SimpleXMLElement Object
                (
                    [@attributes] => Array
                        (
                            [code] => 200
                            [text] => success
                        )

                )

            [PunchOutSetupResponse] => SimpleXMLElement Object
                (
                    [StartPage] => SimpleXMLElement Object
                        (
                            [URL] => https://www.amazon.com/eprocurement/initiate-clean-punchout/123-1234567-1234567
                        )

                )

        )

)
SimpleXMLElement Object
(
    [@attributes] => Array
        (
            [payloadID] => 1234567981234.105.9597@amazon.com
            [timestamp] => 2016-09-01T10:37:53.985Z
        )

    [Header] => SimpleXMLElement Object
        (
            [From] => SimpleXMLElement Object
                (
                    [Credential] => Array
                        (
                            [0] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [domain] => DUNS
                                        )

                                    [Identity] => 123465789
                                )

                            [1] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [domain] => NetworkId
                                        )

                                    [Identity] => Amazon
                                )

                        )

                )

            [To] => SimpleXMLElement Object
                (
                    [Credential] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [domain] => NetworkId
                                )

                            [Identity] => abcd123
                        )

                )

            [Sender] => SimpleXMLElement Object
                (
                    [Credential] => Array
                        (
                            [0] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [domain] => DUNS
                                        )

                                    [Identity] => 123456789
                                )

                            [1] => SimpleXMLElement Object
                                (
                                    [@attributes] => Array
                                        (
                                            [domain] => NetworkId
                                        )

                                    [Identity] => Amazon
                                )

                        )

                    [UserAgent] => Amazon LLC eProcurement Application
                )

        )

    [Message] => SimpleXMLElement Object
        (
            [PunchOutOrderMessage] => SimpleXMLElement Object
                (
                    [BuyerCookie] => 1234567
                    [PunchOutOrderMessageHeader] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [operationAllowed] => create
                                )

                            [Total] => SimpleXMLElement Object
                                (
                                    [Money] => 1.88
                                )

                        )

                    [ItemIn] => SimpleXMLElement Object
                        (
                            [@attributes] => Array
                                (
                                    [quantity] => 1
                                )

                            [ItemID] => SimpleXMLElement Object
                                (
                                    [SupplierPartID] => D00004ABC1
                                    [SupplierPartAuxiliaryID] => 123-1234567-1234567,1
                                )

                            [ItemDetail] => SimpleXMLElement Object
                                (
                                    [UnitPrice] => SimpleXMLElement Object
                                        (
                                            [Money] => 1.88
                                        )

                                    [Description] => Mead Composition Book, Wide Ruled, 9.75 x 7.50 Inch Sheet Size, Black Marble, Bookbound, 100 Sheets (09910)
                                    [UnitOfMeasure] => EA
                                    [Classification] => 14111514
                                    [ManufacturerPartID] => UPC-800187711702
                                    [ManufacturerName] => MeadWestvaco Consumer & Office Products
                                    [Extrinsic] => Array
                                        (
                                            [0] => Amazon
                                            [1] => Amazon
                                            [2] => gl_office_product
                                            [3] => OFFICE_PRODUCTS
                                            [4] => New
                                            [5] => true
                                        )

                                )

                        )

                )

        )

)