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

Function build_location() incorrectly process destination set as an array #3

Open
KoulSlou opened this issue Apr 15, 2015 · 0 comments

Comments

@KoulSlou
Copy link

Class Ups_Live_Rates has functions for setting destination and origin. These 2 functions are based on the build_location() method. You can pass just zipcode string (for US) or more detailed address in array format.

For zipcode function will return array with 1 element address:

'address' => array( 'state' => FL, 'postal_code' => 32548, 'country_code' => US )

And this array will be correctly transformed to XML for calling UPS API.

But when you pass array to build_location function, address details are not enclosed in 'address' element. Let's say I pass this array to build_location

array( 'state' => OK, 'postal_code' => 33010, 'country_code' => US )

I expect to get

'address' => array( 'state' => OK, 'postal_code' => 33010, 'country_code' => US )

but I get just

array( 'state' => OK, 'postal_code' => 33010, 'country_code' => US )

And it causes error in calling API -"No packages added"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant