Authorize.net Parameters with activemerchant
Posted
by rpflo
on Stack Overflow
See other posts from Stack Overflow
or by rpflo
Published on 2010-02-05T00:04:04Z
Indexed on
2010/05/30
14:02 UTC
Read the original article
Hit count: 360
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
© Stack Overflow or respective owner