# Payment Gem Error

**URL:** <https://www.ruby-forum.com/t/payment-gem-error/95572>\
**Category:** Rails\
**Created:** [June 6, 2006, 5:04pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572 "2006-06-06T17:04:18Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [June 6, 2006, 5:04pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/1 "2006-06-06T17:04:18Z")

</div>

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/](http://www.willclarkdesigns.com/)

removed\_email\_address@domain.invalid  
559 | 584 6785  
559 | 380 2731 [facsimile]

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [June 6, 2006, 10:57pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/2 "2006-06-06T22:57:36Z")

</div>

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](http://secure.authorize.net:443)  
> open=false\>
> 
> Would anyone have an idea what would cause that?
> 
> Thanks,  
> will clark // graphic design  
> [www.willclarkdesigns.com/](http://www.willclarkdesigns.com/)
> 
> removed\_email\_address@domain.invalid  
> 559 | 584 6785  
> 559 | 380 2731 [facsimile]

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [June 7, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/3 "2006-06-07T17:27:32Z")

</div>

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/](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/](http://www.willclarkdesigns.com/)

removed\_email\_address@domain.invalid  
559 | 584 6785  
559 | 380 2731 [facsimile]

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [June 7, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/4 "2006-06-07T23:04:51Z")

</div>

Cool, thanks.

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

Its (pardon the pun!) Actively developed and in-use by a production  
site, [http://shopify.com/](http://shopify.com/)

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [January 16, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/5 "2007-01-16T22:54:06Z")

</div>

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](http://secure.authorize.net:443)  
> open=false\>
> 
> Would anyone have an idea what would cause that?
> 
> Thanks,  
> will clark // graphic design  
> [www.willclarkdesigns.com/](http://www.willclarkdesigns.com/)
> 
> removed\_email\_address@domain.invalid  
> 559 | 584 6785  
> 559 | 380 2731 [facsimile]

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [June 7, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/6 "2006-06-07T23:36:26Z")

</div>

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/](http://www.willclarkdesigns.com/)

removed\_email\_address@domain.invalid  
559 | 584 6785  
559 | 380 2731 [facsimile]

---

<div class="post-metadata">

**Author:** ![willclarkdesigns](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/w/85f322/32.png) [@willclarkdesigns](https://www.ruby-forum.com/u/willclarkdesigns)\
**Post date:** [May 15, 2009, 8:17am UTC](https://www.ruby-forum.com/t/payment-gem-error/95572/7 "2009-05-15T08:17:40Z")

</div>

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](http://secure.authorize.net:443)  
> open=false\>
> 
> Would anyone have an idea what would cause that?
> 
> Thanks,  
> will clark // graphic design  
> [www.willclarkdesigns.com/](http://www.willclarkdesigns.com/)
> 
> removed\_email\_address@domain.invalid  
> 559 | 584 6785  
> 559 | 380 2731 [facsimile]
