cancel
Showing results for 
Search instead for 
Did you mean: 

FedEx SmartPost

FedEx SmartPost

I'm ripping this from my GitHub post as this might be better suited for here:

 

Preconditions
1. Magento 2.1.7
2. PHP 7 / Linux
3. PayPal as merchant, FedEx as shipping service.

 

Steps to reproduce
1. Enable SmartPost for Fedex Account (account/meter/hub)
2. Choose countries that Fedex can ship to
3. Choose Ground, SmartPost, International, etc.

 

Expected result
1. If domestic, show SmartPost and allows SmartPost to be used. In debug, it shows SmartPost being used and it works great.
2. If international, don't show SmartPost (it doesn't show), user cannot select it, it doesn't show in debug.

 

Actual result
1. If international, the user does not see SmartPost as shipping option. However, and FedEx Web Services can confirm this, some SmartPost action is still trying to be used which results in error code 712 - Destination country is not serviced. That is correct, as SmartPost is for domestic US only.

Here is log:

[2017-07-20 15:56:51] main.DEBUG: array (
'request' => 
array (
'WebAuthenticationDetail' => 
array (
'UserCredential' => 
array (
'Key' => '****',
'Password' => '****',
),
),
'ClientDetail' => 
array (
'AccountNumber' => '********',
'MeterNumber' => '****',
),
'Version' => 
array (
'ServiceId' => 'crs',
'Major' => '10',
'Intermediate' => '0',
'Minor' => '0',
),
'RequestedShipment' => 
array (
'DropoffType' => 'REGULAR_PICKUP',
'ShipTimestamp' => '2017-07-20T15:56:51+00:00',
'PackagingType' => 'YOUR_PACKAGING',
'TotalInsuredValue' => 
array (
'Amount' => 17.0,
'Currency' => 'USD',
),
'Shipper' => 
array (
'Address' => 
array (
'PostalCode' => '46341',
'CountryCode' => 'US',
),
),
'Recipient' => 
array (
'Address' => 
array (
'PostalCode' => '3000',
'CountryCode' => 'AU',
'Residential' => true,
'City' => 'Melbourne',
),
),
'ShippingChargesPayment' => 
array (
'PaymentType' => 'SENDER',
'Payor' => 
array (
'AccountNumber' => '********',
'CountryCode' => 'US',
),
),
'CustomsClearanceDetail' => 
array (
'CustomsValue' => 
array (
'Amount' => 17.0,
'Currency' => 'USD',
),
),
'RateRequestTypes' => 'LIST',
'PackageCount' => '1',
'PackageDetail' => 'INDIVIDUAL_PACKAGES',
'RequestedPackageLineItems' => 
array (
0 => 
array (
'Weight' => 
array (
'Value' => 0.5300000000000000266453525910037569701671600341796875,
'Units' => 'LB',
),
'GroupPackageCount' => 1,
),
),
'ServiceType' => 'SMART_POST',
'SmartPostDetail' => 
array (
'Indicia' => 'PRESORTED_STANDARD',
'HubId' => '5465',
),
),
),
'result' => 
stdClass::__set_state(array(
'HighestSeverity' => 'ERROR',
'Notifications' => 
stdClass::__set_state(array(
'Severity' => 'ERROR',
'Source' => 'crs',
'Code' => '712',
'Message' => 'Destination country is not serviced. ',
'LocalizedMessage' => 'Destination country is not serviced. ',
)),
'Version' => 
stdClass::__set_state(array(
'ServiceId' => 'crs',
'Major' => 10,
'Intermediate' => 0,
'Minor' => 0,
)),
)),
) {"is_exception":false} []

ServiceType should NOT be SmartPost as this is an international address. Any ideas why it's trying to force SmartPost? There is a split of both domestic and international customers so it should be smart enough to see that if smartpost = yes and domestic = yes, include SmartPost type.

Tags (3)