Skip to content

Instantly share code, notes, and snippets.

activemerchant (1.31.1) lib/active_merchant/billing/credit_card.rb:231:in `validate_card_number'
activemerchant (1.31.1) lib/active_merchant/billing/credit_card.rb:203:in `validate'
active_utils (1.0.5) lib/active_utils/common/validateable.rb:7:in `valid?'
app/controllers/purchase_controller.rb:37:in `credit'
actionpack (3.2.12) lib/action_controller/metal/implicit_render.rb:4:in `send_action'
actionpack (3.2.12) lib/abstract_controller/base.rb:167:in `process_action'
actionpack (3.2.12) lib/action_controller/metal/rendering.rb:10:in `process_action'
actionpack (3.2.12) lib/abstract_controller/callbacks.rb:18:in `block in process_action'
activesupport (3.2.12) lib/active_support/callbacks.rb:436:in `_run__3617637069970058143__process_action__1511822576658534939__callbacks'
activesupport (3.2.12) lib/active_support/callbacks.rb:405:in `__run_callback'
@thomasstr
thomasstr / paypal-error
Created March 14, 2013 09:10
Getting error in purchase_controller.rb:37:in `credit' Line 4 here.
undefined method `on' for #<ActiveModel::Errors:0x007ff72d404300>
def credit
render :action => 'index' and return unless @cc.valid?
@response = paypal_gateway.purchase(price_in_cents, @cc,
:ip => request.remote_ip,
:billing_address => params[:billing_address])
if @response.success?
def credit
render :action => 'index' and return unless @cc.valid?
@response = paypal_gateway.purchase(BILL_AMOUNT, @cc,
:ip => request.remote_ip,
:billing_address => params[:billing_address])
if @response.success?
@purchase = Purchase.create(:response => @response)
redirect_to :action => "complete", :id => @purchase
@thomasstr
thomasstr / bundle-error
Last active December 14, 2015 09:39
bundle install error windows
C:\Sites\pdfprawn>bundle install
Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/lib/bundler/v
endor/net/http/persistent/ssl_reuse.rb:70:in `connect': SSL_connect returned=1 e
rrno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL
::SSL::SSLError)
from D:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/bundler-1.3.0/
lib/bundler/vendor/net/http/persistent/ssl_reuse.rb:70:in `block in connect'
from D:/RailsInstaller/Ruby1.9.3/lib/ruby/1.9.1/timeout.rb:54:in `timeou