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

AddressLine issue #7

Closed
sunalan opened this issue Nov 5, 2014 · 4 comments
Closed

AddressLine issue #7

sunalan opened this issue Nov 5, 2014 · 4 comments

Comments

@sunalan
Copy link

sunalan commented Nov 5, 2014

Hi Al-fallouji
I try to use multiple line address to shipment request, but it's not work.
It's a sample (sample/GB/ShipmentRequest.php)
There are two address line on your sample code.
$sample->Shipper->AddressLine = '1 New Orchard Road';
$sample->Shipper->AddressLine = 'Armonk';

The result of XML only one line => Armonk

How can i use the multiple line of address?

Thank you for your time.

Sincerely,

Alan Sun

@osworx
Copy link

osworx commented Nov 5, 2014

Of course.
Either build the value before assigning to the xml, or like this way (on your sample you are overwriting the former assigned value):
$sample->Shipper->AddressLine .= 'Armonk';

@sunalan
Copy link
Author

sunalan commented Nov 5, 2014

Thanks osworx,

But that's the same issue when the AddressLine exceed 35 chars.

It must use multiple line of address not merge to one AddressLine.

@alfallouji
Copy link
Owner

Hello Alan,

With the latest release, you will be able to add multiple addressLine.

The shipper object is exposing now a method named : addAddressLine.

So you can do something like that :
$sample->Shipper->addAddressLine('333 New York Street');
$sample->Shipper->addAddressLine('Plaza del Marco');

Thanks for your feedback,

@hsinmaochiu
Copy link

Hi alfallouji , how can I add “addressline2 “ for Consignee? Because some address street will over 35 chars.

Consignee’s full address

7311 NW 12th St 7311 NW 12th St Swite 22 # SWxxx22
xxxx
xxxx
xxxx
United States

samples\GB\ShipmentRequest.php
$sample->Consignee->addAddressLine($_GET['address_street']);
$sample->Consignee->City = $_GET['address_city'];//'TAINAN CITY';
$sample->Consignee->PostalCode = $_GET['address_zip_code']; $sample->Consignee->CountryCode = $_GET['Code_Paypal'];
$sample->Consignee->CountryName = $_GET['address_country']; if($_GET['address_state'] =='US' or $_GET['address_state'] =='CA'){
$sample->Consignee->DivisionCode = $_GET['address_state'];

How does it work?
$sample->Consignee->addAddressLine($_GET['address_street']);
$sample->Consignee->addAddressLine($_GET['address_street2']);

But I could not get correct xm, no addressline2. Can you help me?
Request_XML
< Consignee>
< CompanyName > xxxxxxx < CompanyName >
< AddressLine >7311 NW 12th St 7311 NW 12th St Swite 22 # SWxxx22
< AddressLine >
< AddressLine \ >
< City > xxx< City >
< Division > xxx< Division >
< PostalCode > xxx < PostalCode >
< CountryCode >US< CountryCode >
< CountryName > United States < CountryName >

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

4 participants