Forum: Ruby on Rails ActiveMerchant

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
501dac4c25141b9ecffecf6819fe086b?d=identicon&s=25 Pawel Szymczykowski (makenai)
on 2006-05-30 21:19
(Received via mailing list)
Is anyone using ActiveMerchant currently?

I've seen it recommended on this list several times, but it seems kind
of buggy and incomplete and I'm having trouble getting it to work.

>From the example at http://home.leetsoft.com/am/, I've tried:

gateway = ActiveMerchant::Base.gateway(:authorized_net)
response = gateway.capture(1000, creditcard)

..but it doesn't work (uninitialized constant Base). I had to modify
the above to add the module name:

gateway = ActiveMerchant::Billing::Base.gateway(:bogus)
response = gateway.capture(1000, creditcard)

I'm currently getting an error like:

undefined method `authorize' for
ActiveMerchant::Billing::BogusGateway:Class

Though the method is implemented in both the bogus and base classes. I
have this installed as a plugin from svn for rails 1.1 under ruby
1.8.4. Just wonder if there's a really obvious solution that I'm
missing.

Thanks!

-Pawel
Efe398b3b5436b0a8d4430090e8f86ea?d=identicon&s=25 seth b. (subimage)
on 2006-05-30 21:29
(Received via mailing list)
I use Payment for Substruct. Works wonderfully for charges and voids.
501dac4c25141b9ecffecf6819fe086b?d=identicon&s=25 Pawel Szymczykowski (makenai)
on 2006-05-30 21:41
(Received via mailing list)
On 5/30/06, subimage interactive <subimage@gmail.com> wrote:
> I use Payment for Substruct. Works wonderfully for charges and voids.

I looked into Payment, but I needed the ability to authorize and then
capture at a later date and it didn't seem like Payment implemented
that at first glance. Though now that you mentioned voids, I took a
second look at the source and noticed that there is indeed an
AUTH_ONLY transaction type in there. I'll probably give it a second
look. Thanks!

In the mean time, I've found that initializing the billing class
directly seems to do the trick:

gateway = ActiveMerchant::Billing::BogusGateway.new()

Not sure what's up with the example code though.

-Pawel
This topic is locked and can not be replied to.