Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zip code #4

Open
aammotaibi opened this issue Jun 17, 2021 · 6 comments
Open

Zip code #4

aammotaibi opened this issue Jun 17, 2021 · 6 comments
Labels
help wanted Extra attention is needed

Comments

@aammotaibi
Copy link

Hi there
Most of the coutries shows error because of zip code but 100% sure that this zip code is correct

Any idea please

@Moustafa22
Copy link
Owner

Hi,

If you can show some examples of the coutry code and how you passing it and also what is the response you are getting would be helpful.

Anyway, there are alot of bugs in their endpoint that i faced and haven't solved yet, So here is a quick solution, you can either dont pass it (if its not required then it will be alright) or you can pass this string "00000", anyway this is not recommended but if you are on dev or test environment this will help you.

Thanks

@aammotaibi
Copy link
Author

Thanks for the quick reply

Please check the links below for full request details

https://paste.ofcode.org/sEwZFiGQpGPj3whG5zMyHN

https://paste.ofcode.org/ju4cJ8rv5BE2iCuzDGMhr7

@Moustafa22
Copy link
Owner

You're right, it's confusing, but anyway, this error is actually from Aramex's side maybe they don't have this city on their end, or maybe they didn't match the zip code with the city.

Anyway here's an advice, you can call the fetchCities method and make sure that this city is supported or not, and ignore the Zipcode in validateAddress method.

I wish I could help you, but there is nothing I can do because this error is not from my end, anyway I will keep this issue open for the community hoping someone could find out the actual reason behind their issue.

@aammotaibi
Copy link
Author

aammotaibi commented Jun 23, 2021

Hello,

I am already gettting cities list based on country using fetchCities method also the zipcode is required in validateAddress method , I attached the response without zip code. it's displaying error message "Address - Invalid Zipcode" , so it's look like zip code is required in validateAddress method.

Sample Code :

$validateAddress = Aramex::validateAddress([
    'line1' => 'Av. Gaspar de Villarroel E3-83, Quito 170513, Ecuador',
    'country_code' => 'EC',
    'city' => 'Quito',
]);
dd($validateAddress);

Screenshot from 2021-06-23 15-45-01

@Moustafa22
Copy link
Owner

Moustafa22 commented Jul 2, 2021

Yes, it is required, but sometimes when you don't pass the zipcode, they accept the request especially for the countries which has areas that don't have a zip code. like UAE for example, this country doesn't have a zip code, so you either pass 00000 as a zip code or you can pass zip code as an empty string (not 100% sure), but anyway in all cases, those errors are sent by their end as a response for the APIs calls from the SDK.

I hope this helps you.

@Moustafa22 Moustafa22 added the help wanted Extra attention is needed label Sep 18, 2021
@lbabid
Copy link

lbabid commented Oct 23, 2023

Does it work in the localhost ?
when I use rate calculator, I am getting as below
SoapFault SOAP-ERROR: Parsing WSDL: Couldn't load from '<?xml version="1.0" encoding="utf-8"?><wsdl:definitions name="Service_1_0" targetNamespace="http://ws.aramex.net/ShippingAPI/v1/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://ws.aramex.net/ShippingAPI/v1/" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:wsa="http://schemas.xmlsoap.or

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants