You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 13, 2018. It is now read-only.
I am using find_rates method of FedEx carrier, and its working fine for international country, but not for domestic.
If origin is US and destination is IN its working fine, but not for IN to IN
Following is my code.
spree_config = Spree::ActiveShipping::Config
packages = [
ActiveShipping::Package.new(7.5 * 16, # 7.5 lbs, times 16 oz/lb.
[15, 10, 4.5], # 15x10x4.5 inches
units: :imperial) # not grams, not centimetres
]
country_data = Geocoder.search(params[:pincode]).first.country_code
origin = ActiveShipping::Location.new(country: 'IN',
state: 'BR',
city: 'Patna',
zip: '800004')
# origin = ActiveShipping::Location.new(country: 'US',
# state: 'CA',
# city: 'Beverly Hills',
# zip: '90210')
destination = ActiveShipping::Location.new(country: country_data,
postal_code: params[:pincode])
# # fedex = ActiveShipping::FedEx.new(login: '118928725', password: 'kpOChtGJcK3ekRSgVXp6Cc7bi ', key: 'Erzwp7ZsDEFW2tM9', account: '510087100', test: true)
fedex = ActiveShipping::FedEx.new(login: spree_config[:fedex_login], password: spree_config[:fedex_password], key: spree_config[:fedex_key], account: spree_config[:fedex_account], test: spree_config[:test_mode])
response = fedex.find_rates(origin, destination, packages)```
And error is `ActiveShipping::ResponseError (ERROR - 691: The PurposeOfShipmentType is null, empty or invalid.):`
I contact to FedEx, and he said that for some country shippingpurpose is mandatory, but I dont know where to pass purspose in this code.
I also check `active_shipping/lib/active_shipping/carriers/fedex.rb` but purpose is not passed in xml.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I am using
find_rates
method ofFedEx
carrier, and its working fine for international country, but not for domestic.If origin is
US
and destination isIN
its working fine, but not forIN
toIN
Following is my code.
The text was updated successfully, but these errors were encountered: