@@ -1661,7 +1661,7 @@ protected function _doRequest()
16611661 $ nodeDutiable ->addChild ('TermsOfTrade ' , 'DAP ' );
16621662
16631663 /** Export Declaration */
1664- $ this ->getExportDeclaration ($ xml , $ rawRequest );
1664+ $ this ->addExportDeclaration ($ xml , $ rawRequest );
16651665
16661666 }
16671667 /**
@@ -2195,7 +2195,7 @@ private function getGatewayURL(): string
21952195 * @param RateRequest $rawRequest
21962196 * @return void
21972197 */
2198- private function getExportDeclaration ( $ xml , $ rawRequest )
2198+ private function addExportDeclaration ( \ Magento \ Shipping \ Model \ Simplexml \ Element $ xml , RateRequest $ rawRequest ): void
21992199 {
22002200 $ nodeExportDeclaration = $ xml ->addChild ('ExportDeclaration ' , '' , '' );
22012201 $ nodeExportDeclaration ->addChild (
@@ -2228,7 +2228,7 @@ private function getExportDeclaration($xml, $rawRequest)
22282228 $ nodeItemGrossWeight = $ nodeExportItem ->addChild ('GrossWeight ' );
22292229 $ nodeItemGrossWeight ->addChild ('Weight ' , $ itemData ['weight ' ]);
22302230 $ nodeItemGrossWeight ->addChild ('WeightUnit ' , $ itemWeightUnit );
2231- $ nodeExportItem ->addChild ('ManufactureCountryCode ' , ' US ' );
2231+ $ nodeExportItem ->addChild ('ManufactureCountryCode ' , $ rawRequest -> getShipperAddressCountryCode () );
22322232 }
22332233 }
22342234 }
@@ -2239,7 +2239,7 @@ private function getExportDeclaration($xml, $rawRequest)
22392239 * @param RateRequest $rawRequest
22402240 * @return string
22412241 */
2242- private function getInvoiceNumbers ($ rawRequest )
2242+ private function getInvoiceNumbers (RateRequest $ rawRequest ): string
22432243 {
22442244 $ invoiceNumbers = [];
22452245 $ order = $ rawRequest ->getOrderShipment ()->getOrder ();
0 commit comments