[LRA-61] Create a hook to extend Liferay and provide User's address validation Created: 07/Jan/14  Updated: 06/Feb/14  Resolved: 06/Feb/14

Status: Resolved
Project: Liferay Apps
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Minor
Reporter: mcalvo Assignee: Katalina Marcos
Resolution: Completed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Resolution Date:

 Description   
We need to develop this for Liferay 6.2 CE GA 1. Use this repository:
https://svn.rivetlogic.com/repos/rivets/logicstacks/hrportal/branches/6.2%20CE%20GA%201/

This should be a stand alone hook that uses a service developed by you. This service should validate address using google API:
https://developers.google.com/maps/documentation/geocoding/

When a user is created the hook will validate the provided User address and if it not valid will inform the user and provide options that are valid according to Google service.

 Comments   
Comment by mcalvo [ 08/Jan/14 ]
Based on Katalina's research looks like it is not possible to use Google API. It says: "it says "The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is
prohibited".

We are now exploring the possibility to use USPS service instead:
https://www.usps.com/business/web-tools-apis/address-information.htm
Comment by mcalvo [ 09/Jan/14 ]
Although we were able get a Web Tool ID from USPS when we testing their services we always get this error:
"API Authorization failure. User XXXX is not authorized to use API Verify."

We called support and they weren't able to help much. Finally they suggested to open another account, we did that and still get the same issue. Although according to their User Agreement, their API should only be used to deliver USPS packages.

Comment by mcalvo [ 09/Jan/14 ]
We also tried to use UPS validation service, but in order to get an access key for UPS web services an UPS Account for shipping is needed.
Comment by mcalvo [ 09/Jan/14 ]
Let use the Google service, and integrate it with a Google Map, to display the address of the user being added in that map.
Comment by mcalvo [ 11/Jan/14 ]
An update from USPS service: "Thank you for contacting the USPS Internet Customer Care Center. I will be happy to assist you with the application process. I apologize for any inconvenience, but at this the Address API's can only be used in conjunction with USPS Shipping Services and is not intended for cleansing databases or batch processing."
Comment by mcalvo [ 21/Jan/14 ]
Katalina is needed on another project. Pablo Nuñez is going to continue this project.
Comment by mcalvo [ 23/Jan/14 ]
Also please take into account that this portlet should be named Address validator, make any required code changes to reflect that, but don't change the SVN project name.
Comment by mcalvo [ 24/Jan/14 ]
Additionally once the code is ready, remember to Enable the Security Manager, following the steps outlined here:
http://wiki.rivetlogic.com/display/Liferay/Enabling+Security+Manager+for+Liferay+plugins
Comment by mcalvo [ 04/Feb/14 ]
1) welcome-file-list in web.xml - do we need these for portlets?
   This could be removed in all plugins
2) We need RL copyright in all java, jsp, js files
3) Use a constant class for all the param names and double quoted strings
4) replace e.printStackTrace(); with log statement in localserviceimpl
Comment by Katalina Marcos [ 05/Feb/14 ]
Completed:
 
1) Removing welcome-file-list in web.xml
2) Adding RivetLogic copyright in java, jsp, and js files
3)Adding class AddressVerificationConstants for some param names and double quoted strings
4) Replacing e.printStackTrace with log statements

Another issues were addressed:

1) Fixing an javascript issue: An error ocurred when an user click select without none selected address
2) If the api is not Google Geocoding, the view map url is not showed. Refactoring was needed.
3)If the values for longitude and latitude were null (this depends of the API) it was generating an exception
Comment by mcalvo [ 05/Feb/14 ]
Please rename the portlet to Address validator
Comment by Katalina Marcos [ 05/Feb/14 ]
Renaming portlet to validator/validation instead of verification
Comment by Katalina Marcos [ 06/Feb/14 ]
The portlet was renamed. It was added to SVN repository as a new one.
The old project address-verification-portlet was removed from repository.
Generated at Sat Feb 10 05:48:14 GMT 2024 using Jira 8.1.3#801003-sha1:6b6f07cffadda9a0d6efe24639daed8ce94dcdd6.