to try to get authorize.net going. facts of the case
-was able to get a $1 payment authorized and capture in Test and Real
mode through Authorize merchant interface, so this thing is alive.
-am submitting my "API login ID" as user and "Transaction Key" as
password thus:
init_options = {:login=>user,:password=>pass}
gateway =
ActiveMerchant::Billing::AuthorizeNetGateway.new(init_options)
-creditcard.valid? returns true
-response = gateway.purchase(@amount, creditcard, options) returns
false and says
"The merchant login ID or password is invalid or the account is
inactive"
-The specs from Authorize had a slew of other fields that supposedly
need to be submitted. Am I right in thinking that ActiveMerchant wraps
up that stuff?
ActiveMerchant::Billing::Base.mode = :production
This tells ActiveMerchant to use the Live URL for Authorize.net. To
submit test transactions with your live account you then construct the
gateway with the option :test => true
gateway = AuthorizeNetGateway.new(:login => 'l', :password => 'p',
:test => true)
If your account credentials are for a test account then you'll want to
use the Test URL for Authorize.net:
ActiveMerchant::Billing::Base.mode = :test
You can also run test transactions with a test account using :test => true.
--
Cody Fauser
http://shopify.com - e-commerce done right
http://www.codyfauser.com - blog
http://www.oreilly.com/catalog/rjsrails - RJS Templates for Rails
After more research, I discovered that test_url in my version of
ActiveMerchant is incorrect. Authorize.net tech support told me to use
self.test_url = "https://certification.authorize.net/gateway/
transact.dll"
rather than
self.test_url = "https://test.authorize.net/gateway/transact.dll"
and things have worked much better since then.
M
On Sep 28, 2:01 pm, "Cody Fauser" <codyfau...@gmail.com> wrote:
> If your account credentials are for a live account, then you'll want
> to make sure you have:
>
> ActiveMerchant::Billing::Base.mode = :production
>
> This tells ActiveMerchant to use the Live URL for Authorize.net. To
> submit test transactions with your live account you then construct the
> gateway with the option :test => true
>
> gateway = AuthorizeNetGateway.new(:login => 'l', :password => 'p',
> :test => true)
>
> If your account credentials are for a test account then you'll want to
> use the Test URL for Authorize.net:
>
> ActiveMerchant::Billing::Base.mode = :test
>
> You can also run test transactions with a test account using :test => true.
>
> On 9/28/07, lamp5m...@gmail.com <lamp5m...@gmail.com> wrote:
>
>
>
>
>
> > I've been following valuable tutorials here
> >http://www.omninerd.com/articles/Processing_Credit_Cards_with_Ruby_on...
<extraOptions>x_test_request=TRUE</extraOptions>
element in the XML.