Forum: Ruby on Rails Payment Gem Error

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.
Will C. (Guest)
on 2006-06-06 19:04
(Received via mailing list)
I am learning how to use the payment gem to process credit cards. I
think I have everything up and running correctly but I get this error:

	undefined method `use_ssl=' for #<Net::HTTP secure.authorize.net:443
open=false>

Would anyone have an idea what would cause that?

Thanks,
will clark    //    graphic design
www.willclarkdesigns.com/

removed_email_address@domain.invalid
559 | 584 6785
559 | 380 2731 [ facsimile ]
Will G. (Guest)
on 2006-06-07 00:57
I get the same errors as well.  This is on Windows.

I think it might be due to the way the Net:HTTP object is created. It is
created first, then Net::HTTP.use_ssl is called, but this method does
not exist. There should be a way for Payment to check the URL first,
then decide it needs to create a Net:HTTPS object instead.

That, or there is something really wrong with the Windows One-Click
Net:HTTP library.

Will C. wrote:
> I am learning how to use the payment gem to process credit cards. I
> think I have everything up and running correctly but I get this error:
>
> 	undefined method `use_ssl=' for #<Net::HTTP secure.authorize.net:443
> open=false>
>
> Would anyone have an idea what would cause that?
>
> Thanks,
> will clark    //    graphic design
> www.willclarkdesigns.com/
>
> removed_email_address@domain.invalid
> 559 | 584 6785
> 559 | 380 2731 [ facsimile ]
Will C. (Guest)
on 2006-06-07 19:27
(Received via mailing list)
Well, I found, with the help of a friend, that the problem was on my
end.
I had typed:

require 'payment/authorize_net'

This was how it was listed in the README file. But when I just
required 'payment', everything worked perfectly.

I suppose as more payment gateways are added to the Payment Gem, then
it may be necessary to specify which one. But that's how I got it to
work.

I even noticed this little article (http://www.onrails.org/articles/
2005/12/03/an-on-line-store-build-with-ruby-on-rails) they also used
require 'payment'

Hope this helps,
will clark    //    graphic design
www.willclarkdesigns.com/

removed_email_address@domain.invalid
559 | 584 6785
559 | 380 2731 [ facsimile ]
Will G. (Guest)
on 2006-06-08 01:04
Cool, thanks.

I think I might check out ActiveMerchant, though:
http://home.leetsoft.com/am

Its (pardon the pun!) Actively developed and in-use by a production
site, http://shopify.com/
Will C. (Guest)
on 2006-06-08 01:36
(Received via mailing list)
Yeah, I think it is worth the investigation.

One of the creators of Shopify created the ActiveMerchant gem I do
believe.

Good luck,
will clark    //    graphic design
www.willclarkdesigns.com/

removed_email_address@domain.invalid
559 | 584 6785
559 | 380 2731 [ facsimile ]
Grant Ammons (Guest)
on 2007-01-16 23:54
I fixed this error by commenting out the following line in payment.rb

require 'net/http'

I theorized that when payment was figuring out which Net::HTTP object to
instantiate, it was using the one from 'net/http' and not 'net/https',
which provides the use_ssl function.  Confusing, yes.


Will C. wrote:
> I am learning how to use the payment gem to process credit cards. I
> think I have everything up and running correctly but I get this error:
>
>   undefined method `use_ssl=' for #<Net::HTTP secure.authorize.net:443
> open=false>
>
> Would anyone have an idea what would cause that?
>
> Thanks,
> will clark    //    graphic design
> www.willclarkdesigns.com/
>
> removed_email_address@domain.invalid
> 559 | 584 6785
> 559 | 380 2731 [ facsimile ]
Aashish K. (Guest)
on 2009-05-15 10:17
Hi will clark,

I want to learn "how to use payment gem". can you refer an pdf's or
links.



Will C. wrote:
> I am learning how to use the payment gem to process credit cards. I
> think I have everything up and running correctly but I get this error:
>
>   undefined method `use_ssl=' for #<Net::HTTP secure.authorize.net:443
> open=false>
>
> Would anyone have an idea what would cause that?
>
> Thanks,
> will clark    //    graphic design
> www.willclarkdesigns.com/
>
> removed_email_address@domain.invalid
> 559 | 584 6785
> 559 | 380 2731 [ facsimile ]
This topic is locked and can not be replied to.