返回订单API

dangdang.orders.content.decrypt

用户信息解密接口

  • 功能描述:根据encrypt_content来做消费者敏感信息解密,获取encrypt_content对应的收件人的明文信息(姓名、手机号、收货地址等)。最多支持20个进行批量解密。

    支持的数据格式:xml/json

    HTTP请求方式:POST

    传参格式:o_cryptStr=[{"o":"11111","encrypt_content":"aaaaaa"},{"o":"2222","encrypt_content":"bbbbb"}]

    版本:1.0

  • <?xml version="1.0" encoding="UTF-8"?>
    <root>
      <code>0</code>
      <message>操作成功</message>
      <data>
        <orderId>42841040002</orderId>
        <operCode >0</operCode>
        <operation>success</operation>
        <cryptUserInfo>
          <consigneeName>田富洋</consigneeName>
          <consigneeTel />
          <consigneeMobileTel>13552328636</consigneeMobileTel>
          <consigneeAddr>中国,陕西,西安市,碑林区,太乙路莱安</consigneeAddr>
          <invoiceAddress />
          <identityNum />
          <match>true</match>
        </cryptUserInfo>
      </data>
      <success boolean="true">true</success>
    </root>

  • java版
    SdkClient sdkClient= new SdkClient(appKey, appSecret, session, version) ;

    OrdersContentDecryptRequest request=new OrdersContentDecryptRequest();

    List<EncryptDTO> encryptVOS = new ArrayList<EncryptDTO>();

    EncryptDTO encryptVO1 = new EncryptDTO();

    encryptVO1.setO("1111111");

    encryptVO1.setEncrypt_content("o0X5Vdsfdsf");

    encryptVOS.add(encryptVO1);

    EncryptDTO encryptVO2 = new EncryptDTO();

    encryptVO2.setO("222222");

    encryptVO2.setEncrypt_content("o0Xsdf5sVdsfdsf");

    encryptVOS.add(encryptVO2);

    request.setO_cryptStr(JSON.toJSONString(encryptVOS));

    OrdersListGetResponse result=sdkClient.excute(request);

    OrdersContentDecryptResponse response=sdkClient.excute(request);

    System.out.println(result.toString());

    php版

    $sdkClient = new DDHttpClient(appKey,appSecret,session);

    $ordersContentDecryptRequest = new OrdersContentDecryptRequest();

    $arr = array(
    array("o"=>"111","encrypt_content"=>"aaaaaa"),
    array("o"=>"33333","encrypt_content"=>"bbbbb"),
    );

    $o_cryptStr = $json_encode($arr);

    ordersContentDecryptRequest->o_cryptStr = $o_cryptStr;

    $sdkResponse = $sdkClient->execute($ordersContentDecryptRequest);