def paypal_url(return_url) values = { :business => 'seller_1229899173_biz@railscasts.com', :cmd => '_cart', :upload => 1, :return => return_url, :invoice => id } line_items.each_with_index do |item, index| values.merge!({ "amount_#{index+1}" => item.unit_price, "item_name_#{index+1}" => item.product.name, "item_number_#{index+1}" => item.id, "quantity_#{index+1}" => item.quantity }) end "https://w