Re: UPS Package

From: Date: Sat, 27 Nov 2004 21:44:07 +0000
Subject: Re: UPS Package
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-34607@lists.php.net to get a copy of this message
On Sat, 27 Nov 2004 17:10:37 +0100, spam@batz.org <spam@batz.org> wrote: > Hi, > i am new to PEAR-Dev. My name is Tim Batz and my PEAR account is Ego (no, i am not an egoist). > Using PHP round about since 2000 and hanging around in #PEAR since a while. > I am planning to propose an UPS Service Package to PEAR. Hope ill get many votes for it. :) :-) Good, I was looking for this recently. > But i need some discussion about it first. > > Dependencies will be PEAR (of course), XML Serializer and NET_Curl. > > UPS has 7 services running using XML for all of them and HTML for Tracking and Rates & > Service Selection additionally (which i wont support probably). > Posting from the UPS website following: > > START > > Standard Tools > > UPS Tracking > For a given UPS tracking or reference number, this tool identifies the package(s) and provides > detailed information about each package. > > UPS Rates & Service Selection > Returns rates for available UPS domestic and international services, and provides UPS published > shipping rates. > > UPS Time in Transit > Provides information on all available UPS Shipping Services to everywhere UPS delivers around > the world. This information includes delivery time, date and > days in transit. > > UPS Address Validation > This tool validates that an input city, state, postal code combination is consistent, and > returns a list of up to 10 valid city-state-postal code combinations that > closely match the input. This tool supports only U.S. domestic addresses. > > UPS File Download for Quantum View TM > Allows users to automatically retrieve their Quantum View files automatically and import them > directly into their back-end systems. > > Premium Tools > > UPS Signature Tracking > In addition to providing tracking information, this tool returns valuable proof of delivery > information including a digitized signature and delivery address. > > UPS Shipping > This tool allows UPS customers to develop a customized shipping solution for their business. > Ideal environments for this tool include multiple retail locations, > dealers or branch offices, and mailrooms in large corporations or campus environments. > > END > > I have a class for their XML tracking service finished, which was my first intention to > support. > So how should the thing being designed. One package for each service or should i write one huge > package for all of them finally. > I havent looked really deep into all of them besides the tracking services. and it looks like > the signature tracking just extends the normal tracking. > so you get a picture with the signature of the reciever for your own shippings. > i am willing to support all services finally, but havent got an idea how long this will take or > if i am able to finish all of them. > > Curl: > the script supports NET_Curl and my own Curl code right now, cause NET_Curl doesnt support > the CURLOPT_SSL_VERIFYPEER constant. this is probably not need when you have your certificate > properly installed, > but with this option it does work without deep Curl knowledge, which i dont own too much yet. > But this will probably change. > Curl is needed cause the whole transfer uses HTTPS and this way proxy support can be easily > added as well (shouldnt all service packages support > proxies?). > So i have a few questions about it. > Should it support both NET_Curl and my own Curl code? > Should i extend NET_Curl to get CURLOPT_SSL_VERIFYPEER working? > Should it not support CURLOPT_SSL_VERIFYPEER? > Can NET_Curl being updated with this constant or even more? If you want to use curl, have Net_Curl updated to add this option. Best adn quickest way is to submit a bug report (feature request) and a patch. However, I would rather suggest HTTP_Request instead of Net_Curl. It requires less to be installed on the server (a good thing) and just seems like the right package for this. > > I guess i wont be able to supply any logo or documentation from UPS to avoid any problems with > UPS. > But you will be able to get those by yourself anyways, when you sign up to use their services. > this is needed to use the package anyways. first you have to sign up, > then you can request a developer key for testing and finally your will get a key that will work > with real parcels. > > no idea under which license i should release it? guess i have to read a bit about licenses. > LGPL or PHP license I'd say. I've always used the LGPL. > So much for now. There will be more questions for sure later on. this is just the start for my > hopefully upcoming package. :) > regards Tim > In regards to how to create the package I would say you should create a generalized shipping API which can then have a UPS backend, a FedEx backend, a USPS backend, etc. You may also want to break out the different functionalities (rates, tracking, etc) into different modules. Keeping ti all in one class is IMHO going to be way too big. -- Justin Patrin

« previous php.pear.dev (#34607) next »