Bits from a rails app I threw together so my partner could manage coffees for sale on web site. We use PayPal (cheap!) so need to create encrypted PP buttons dynamically. I've removed sensitive bits of info since public.