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 willclarkdesigns.com will@willclarkdesigns.com 559 | 584 6785 559 | 380 2731 [ facsimile ] -------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060606/78e8650e/attachment-0001.html
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 Clark 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 > willclarkdesigns.com > > will@willclarkdesigns.com > 559 | 584 6785 > 559 | 380 2731 [ facsimile ]-- Posted via ruby-forum.com.
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 (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 willclarkdesigns.com will@willclarkdesigns.com 559 | 584 6785 559 | 380 2731 [ facsimile ] On Jun 6, 2006, at 1:57 PM, Will Green wrote:> 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 Clark 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 >> willclarkdesigns.com >> >> will@willclarkdesigns.com >> 559 | 584 6785 >> 559 | 380 2731 [ facsimile ] > > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060607/954d952c/attachment-0001.html
Cool, thanks. I think I might check out ActiveMerchant, though: home.leetsoft.com/am Its (pardon the pun!) Actively developed and in-use by a production site, shopify.com -- Posted via ruby-forum.com.
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 willclarkdesigns.com will@willclarkdesigns.com 559 | 584 6785 559 | 380 2731 [ facsimile ] On Jun 7, 2006, at 2:04 PM, Will Green wrote:> Cool, thanks. > > I think I might check out ActiveMerchant, though: > home.leetsoft.com/am > > Its (pardon the pun!) Actively developed and in-use by a production > site, shopify.com > > -- > Posted via ruby-forum.com. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: wrath.rubyonrails.org/pipermail/rails/attachments/20060607/25b6f8ff/attachment.html
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 Clark 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 > willclarkdesigns.com > > will-P+tArrxg0Vi287//2obPolaTQe2KTcn/@public.gmane.org > 559 | 584 6785 > 559 | 380 2731 [ facsimile ]-- Posted via ruby-forum.com. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi will clark, I want to learn "how to use payment gem". can you refer an pdf''s or links. Will Clark 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 > willclarkdesigns.com > > will-P+tArrxg0Vi287//2obPolaTQe2KTcn/@public.gmane.org > 559 | 584 6785 > 559 | 380 2731 [ facsimile ]-- Posted via ruby-forum.com.