Adding Shipping support in ActiveShipping

123 views
Skip to first unread message

Nathan Stitt

unread,
Feb 17, 2011, 9:11:55 AM2/17/11
to Active Merchant
I've a requirement to implement a shipping system that will ship via
both Fedex & UPS, with USPS to possibly follow.

I've implemented UPS shipping by stealing judiciously from Donald
Ball's work as detailed in:
http://groups.google.com/group/activemerchant/browse_thread/thread/b39add31340b1f1c/5269b117f18e8e1f?lnk=gst&q=ups+shipping#5269b117f18e8e1f

I also used a bit of dpicket's fork at https://github.com/dpickett/active_shipping
since it provided a return labels functionality for Fedex and was
easily modified to provide shipping.

I've now got a first cut of shipping done using the same api between
UPS & Fedex. It's far from production ready, but I've successfully
printed a label with both. One current limitation is that FedEx only
allows one package per shipment.

Are there any other good forks out there that I've missed that I
should borrow from? I'd be especially interested in USPS shipping, as
I'll most likely have to implement that eventually anyway.

I'd like to get a really good shipping implementation merged. To that
end I've kept my fork tracking the main branch as closely as possible
and kept the changes to the existing files minimal.

I've put my work to date at: https://github.com/nathanstitt/active_shipping

Basically it adds a include_ship_support! class method to both FedEx
and UPS. Calling it includes a ShippingSupport module which has one
main method, ship. To which you pass an instance of the Shipment
class.

A fuller example is in the fedex_shipping_test & ups_shipping_test
files at: https://github.com/nathanstitt/active_shipping/tree/master/test/remote

Any thoughts on how I should proceed?

Josh Szmajda

unread,
Feb 18, 2011, 7:44:23 AM2/18/11
to activem...@googlegroups.com, Nathan Stitt
For what it's worth, we've extended active_shipping quite a bit to support UPS and USPS (via Endicia) and are using them both in production at the moment, performing time in transit requests and EPL2 and PDF label printing (domestic and international labels, which was something of a pain). I'd love to release this code back to the community, but it has to go through internal review here first, so just know that it's out there. I'll certainly post on this list when we are able to share it.

-Josh


--
You received this message because you are subscribed to the Google Groups "Active Merchant" group.
To post to this group, send email to activem...@googlegroups.com.
To unsubscribe from this group, send email to activemerchan...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/activemerchant?hl=en.


Mark

unread,
Sep 24, 2012, 1:54:41 PM9/24/12
to activem...@googlegroups.com, Nathan Stitt
Hey Josh, can you post a link to your github repo?

Nathan Stitt

unread,
Sep 24, 2012, 2:02:41 PM9/24/12
to Mark, activem...@googlegroups.com, Nathan Stitt
Hi Mark,

Thanks for cc'ing me on this.  

I haven't given up on the code, and there is going to be movement on it in the next few months, as I've got an upcoming project that is going to use the Fedex portion at least, and most likely UPS as well.

The project is scheduled to go live by the end of Oct, so look for some updates around then.

Josh - If you've got a working implementation it'd be great if you could share it!

Take care,

Nathan

Josh Szmajda

unread,
Sep 24, 2012, 5:13:14 PM9/24/12
to activem...@googlegroups.com, Mark, Nathan Stitt
Sure, we have a heavily modified version forked in github: https://github.com/optoro/active_shipping We maintain integrations with FedEx, UPS, and Endicia (USPS), with full international support (tested mostly with FedEx and Endicia) and lots of additional features. We're using this in our production systems now. It might not follow active_shipping's style 100%, but if you want we can submit a pull request back into the upstream. Also not everything is tested heavily, but it does work (enough for us).

Let me know if you have trouble or questions, and we're happy to accept patches on our fork.

Thanks,
-Josh
Reply all
Reply to author
Forward
0 new messages