Skip to content

Commit

Permalink
Merge pull request #66 from icowan/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
icowan authored Jun 17, 2022
2 parents 982f58f + db84586 commit ee8ac53
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions src/platforms/HualeiPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ protected function formatOrder(Order $orderClass)
];
}

return [
$data = [
"buyerid" => $orderClass->customerOrderNo,
"consignee_address" => $orderClass->recipient->address,
"order_piece" => $orderClass->package->quantity,
Expand Down Expand Up @@ -200,9 +200,16 @@ protected function formatOrder(Order $orderClass)
"shipper_postcode" => $orderClass->shipper->zip,
"shipper_country" => $orderClass->shipper->countryCode,
"shipper_telephone" => $orderClass->shipper->phone,
"shipper_taxnotype" => "IOSS",
"shipper_taxno" => $orderClass->taxesNumber
];
if (in_array($orderClass->recipient->countryCode, [
"AT", "BE", "BG", "CY", "HR", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IE", "IT", "LV", "LT", "LU", "MT", "NL", "PL", "PT", "RO", "SK", "SI", "ES", "SE"
])) {

$data["shipper_taxnotype"] = "IOSS";
$data["shipper_taxno"] = $orderClass->taxesNumber;

}
return $data;
}

/**
Expand Down

0 comments on commit ee8ac53

Please sign in to comment.