Search Results

Search found 3 results on 1 pages for 'rpflo'.

Page 1/1 | 1 

  • Authorize.net Parameters with activemerchant

    - by rpflo
    I'm using authorize.net and activemerchant in a rails app. When I make a purchase authorize.net sends back an email with information about the purchase. I should be able to send them the billing and shipping address information and have that returned in the email, but it's not returning any of the information, obviously I've got the varable names wrong, anybody know what they should be? I've been pouring over the authorize.net api docs and activemerchant's but can't find what I need. My purchase method on an orders model looks like this: def purchase purchase_options = { :ip => ip_address, :first_name => first_name, :last_name => last_name, :address => billing_street_address, :city => billing_city, :state => billing_state, :country => "US", :zip => billing_zip, :ship_to_first_name => first_name, :ship_to_last_name => last_name, :ship_to_address => shipping_street_address, :ship_to_city => shipping_city, :ship_to_state => shipping_state, :ship_to_country => "US", :ship_to_zip => shipping_zip } response = GATEWAY.purchase(price_in_cents, credit_card, purchase_options) # other transaction stuff response.success? end

    Read the article

  • how do I get foreign_key to work in this simple has_many, belongs_to relationship?

    - by rpflo
    I'm pulling data from Harvest. Here are my two models and schema: # schema create_table "clients", :force => true do |t| t.string "name" t.integer "harvest_id" end create_table "projects", :force => true do |t| t.string "name" t.integer "client_id" t.integer "harvest_id" end # Client.rb has_many :projects, :foreign_key => 'client_id' # not needed, I know # Project.rb belongs_to :client, :foreign_key => 'harvest_id' I'm trying to get the Projects to find their client by matching Project.client_id to a Client.harvest_id. Here is what I'm getting instead. > Project.first.client_id => 187259 Project.first.client => nil Client.find(187259).projects => [] Is this possible? Thanks!

    Read the article

1