magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

DHL Shipping Address Hong Kong Issue #7928

Closed shahankitb997 closed 7 years ago

shahankitb997 commented 7 years ago

Preconditions

  1. I am using Magento 2.1.3 CE Version
  2. DHL Shipping Method is Enabled

Steps to reproduce

  1. Please enter any of the Hong Kong Address.
  2. Street Address & City as Hong Kong.
  3. In Hong Kong Zip Code is not required,
  4. It should pass City Name in DHL Request API
  5. Save Hong Kong address in Address Book from Frontend My Account & Use that Hongkong Address for Shipping

Request API

<?xml version="1.0" encoding="UTF-8"?>
<p:DCTRequest xmlns:p="http://www.dhl.com" xmlns:p1="http://www.dhl.com/datatypes" xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-req.xsd ">
   <GetQuote>
      <Request>
         <ServiceHeader>
            <SiteID>****</SiteID>
            <Password>****</Password>
         </ServiceHeader>
      </Request>
      <From>
         <CountryCode>SG</CountryCode>
         <Postalcode>11111</Postalcode>
         <City>SINGAPORE</City>
      </From>
      <BkgDetails>
         <PaymentCountryCode>SG</PaymentCountryCode>
         <Date>2016-12-22</Date>
         <ReadyTime>PT0H00M</ReadyTime>
         <DimensionUnit>CM</DimensionUnit>
         <WeightUnit>KG</WeightUnit>
         <Pieces>
            <Piece>
               <PieceID>1</PieceID>
               <Weight>2</Weight>
            </Piece>
         </Pieces>
         <PaymentAccountNumber>610461741</PaymentAccountNumber>
         <IsDutiable>Y</IsDutiable>
      </BkgDetails>
      <To>
         <CountryCode>HK</CountryCode>
         <Postalcode />
         <City />
      </To>
      <Dutiable>
         <DeclaredCurrency>SGD</DeclaredCurrency>
         <DeclaredValue>32.00</DeclaredValue>
      </Dutiable>
   </GetQuote>
</p:DCTRequest>

Response API


<?xml version="1.0" encoding="UTF-8"?>
<res:DCTResponse xmlns:res="http://www.dhl.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-Response.xsd">
   <GetQuoteResponse>
      <Response>
         <ServiceHeader>
            <MessageTime>2016-12-22T08:39:34.941+01:00</MessageTime>
            <SiteID>****</SiteID>
         </ServiceHeader>
      </Response>
      <Note>
         <Condition>
            <ConditionCode>3021</ConditionCode>
            <ConditionData>The destination country HK location postal code  or City  is invalid. Please check the destination country location details.</ConditionData>
         </Condition>
      </Note>
   </GetQuoteResponse>
</res:DCTResponse>
  1. It's not passing Hong Kong As a City

Expected result

  1. Request API Should be like

<?xml version="1.0" encoding="UTF-8"?>
<p:DCTRequest xmlns:p="http://www.dhl.com" xmlns:p1="http://www.dhl.com/datatypes" xmlns:p2="http://www.dhl.com/DCTRequestdatatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.dhl.com DCT-req.xsd ">
   <GetQuote>
      <Request>
         <ServiceHeader>
            <SiteID>****</SiteID>
            <Password>****</Password>
         </ServiceHeader>
      </Request>
      <From>
         <CountryCode>SG</CountryCode>
         <Postalcode>11111</Postalcode>
         <City>SINGAPORE</City>
      </From>
      <BkgDetails>
         <PaymentCountryCode>SG</PaymentCountryCode>
         <Date>2016-12-22</Date>
         <ReadyTime>PT0H00M</ReadyTime>
         <DimensionUnit>CM</DimensionUnit>
         <WeightUnit>KG</WeightUnit>
         <Pieces>
            <Piece>
               <PieceID>1</PieceID>
               <Weight>2</Weight>
            </Piece>
         </Pieces>
         <PaymentAccountNumber>610461741</PaymentAccountNumber>
         <IsDutiable>Y</IsDutiable>
      </BkgDetails>
      <To>
         <CountryCode>HK</CountryCode>
         <Postalcode />
         <City>Hong Kong</City>
      </To>
      <Dutiable>
         <DeclaredCurrency>SGD</DeclaredCurrency>
         <DeclaredValue>32.00</DeclaredValue>
      </Dutiable>
   </GetQuote>
</p:DCTRequest>

Actual result

  1. If we pass above request, then it works fine. Otherwise Not

    @magento-admin and @magento-team Please look

shahankitb997 commented 7 years ago

Hi Guys,

Any update @magento-admin @magento-team @alena-marchenko ?

Thanks

joni-jones commented 7 years ago

Hi, @shahankitb997, this is known issue and already fixed on develop branch (internal ticket MAGETWO-55117).

Closed as duplicate to https://github.com/magento/magento2/issues/3789.

shahankitb997 commented 7 years ago

HI @joni-jones Can you please provide the solution. What needs to be fixed to solve this issue?

http://magento.stackexchange.com/questions/151288/magento-2-dhl-api-hong-kong-address-issue-due-to-quote-session