Git Product home page Git Product logo

activemerchant / active_merchant Goto Github PK

View Code? Open in Web Editor NEW
4.5K 4.5K 2.5K 30.74 MB

Active Merchant is a simple payment abstraction library extracted from Shopify. The aim of the project is to feel natural to Ruby users and to abstract as many parts as possible away from the user to offer a consistent interface across all supported gateways.

Home Page: http://activemerchant.org

License: MIT License

Ruby 100.00%

active_merchant's People

Contributors

aellispierce avatar aenand avatar ajawadmirza avatar andrewpaliga avatar bizla avatar bpollack avatar britth avatar bslobodin avatar curiousepic avatar davidsantoso avatar dsmcclain avatar duff avatar girasquid avatar heavyblade avatar jcreiff avatar jduff avatar justinplouffe avatar leila-alderman avatar meagabeth avatar molbrown avatar naashton avatar ntalbott avatar orenmazor avatar rachelkirk avatar shasum avatar soleone avatar therufs avatar titanous avatar wvanbergen avatar yunnydang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

active_merchant's Issues

Validateable not workng with Rails 3

I'm trying to get an AM::B::CreditCard to validate as part of a Rails 3 form. I see two issues. The first is that it errors our trying to check to see if the object is persisted?.

undefined method 'persisted?' for #<ActiveMerchant::Billing::CreditCard:0x10520cb90>

First useful part of the backtrace here is:

actionpack (3.0.0) lib/action_view/helpers/form_helper.rb:1280:in fields_for_nested_model

Since by definition AM::B::CreditCard objects are not to be persisted, I propose a persited? method be added that returns falls. Here is that as one might put it in an initializer:

ActiveMerchant::Billing::CreditCard.class_eval do
  def persisted?
    false
  end
end

With that done, the second error that comes up is:

The error occurred while evaluating nil.any?

Raised from:

actionpack (3.0.0) lib/action_view/helpers/active_model_helper.rb:62:in object_has_errors?

In earlier versions of rails, this helper called the #on() method on the errors. In Rails 3 it calls #[]. In ActiveModel, errors[....] returns an empty array if there are no errors. But Validateable returns nil, which does not have a .any? method. I resolved this in an initializer by monkeypatching object_has_errors? so that it checks with .present? rather than .any?. But I'd much rather have Validateable work with Rails 3 form validation out of the box. Here is an example of the initializer:

ActionView::Helpers::ActiveModelInstanceTag.module_eval do
  def object_has_errors?
    object.respond_to?(:errors) && object.errors.respond_to?(:full_messages) && error_message.present?
  end
end

1.11.0 Dependencies are broken

gemspec lists activesupport >= 2.3.8 but lib/active_merchant.rb requires 'active_support/core_ext/module/deprecation' which is part of activesupport 3

AM should not autoload all gateways at startup

I don't think it's still a good philosophy to load ALL gateways during the initialization of AM...

Considering that in 99% cases we only use one...

The developer should explicitly load the gateway(s) he wants to use in his software.

What do you think of this idea?

payment_service_for need to use html_safe with Rails 3

Not even sure of the best way to work around this and make this method functional for Rails 2 and Rails 3. Since html_safe makes thigns a little awkward.

    def payment_service_for(order, account, options = {}, &proc)
      raise ArgumentError, "Missing block" unless block_given?

      integration_module = ActiveMerchant::Billing::Integrations.const_get(options.delete(:service).to_s.classify)

      if ignore_binding?
        concat(form_tag(integration_module.service_url, options.delete(:html) || {}))
      else
        concat(form_tag(integration_module.service_url, options.delete(:html) || {}), proc.binding)
      end
      result = "\n".html_safe

      service_class = integration_module.const_get('Helper')
      service = service_class.new(order, account, options)
      yield service

      result << service.form_fields.collect do |field, value|
        hidden_field_tag(field, value)
      end.join("\n").html_safe

      result << "\n".html_safe
      result << '</form>'.html_safe

      if ignore_binding?
        concat(result)
      else
        concat(result, proc.binding)
      end
    end

CreditCard validation

If type credit card number - "000000000000", validation will be successfully in production mode.

Rails 3 fails to load if ActiveMerchant is in the Gemfile

# Gemfile
gem 'rails', '3.0.0.beta4'
gem 'activemerchant', '>=1.6.0'

rails c (or any other rails command) then results in /path/to/gems/activemerchant-1.6.0/lib/active_merchant/common/validateable.rb:31:inmodule:Validateable': uninitialized constant ActiveMerchant::Validateable::HashWithIndifferentAccess (NameError)`

In irb, requiring active_support doesn't require the Hash extensions in active_support/core_ext so HashWithIndifferentAccess is not yet available.

Errors Running Test Suite

Hello I am looking to extend a gateway.

When running rake, rake test:remote, or rake test:units, I get the following error. I do have ActionPack installed as a gem!


/Users/matt/forks/active_merchant/test/test_helper.rb:22:in `rescue in ': The view tests need ActionPack installed as gem to run (StandardError)
    from /Users/matt/forks/active_merchant/test/test_helper.rb:19:in `'
    from :29:in `require'
    from :29:in `require'
    from test/unit/avs_result_test.rb:1:in `'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `block in '
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `'
rake aborted!
Command failed with status (1): [/Users/matt/.rvm/rubies/ruby-1.9.2-p136/bi...]

(See full trace by running task with --trace)

The error is being thrown here:


begin
  gem 'actionpack'
rescue LoadError
  raise StandardError, "The view tests need ActionPack installed as gem to run"
end

When I run gem 'actionpack' in irb, or in a standalone file no LoadError is thrown.

If I comment out the begin block, I get this error:


/Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:274:in `activate': can't activate builder (~> 2.1.2, runtime) for ["activemodel-3.0.4", "actionpack-3.0.4"], already activated builder-3.0.0 for [] (Gem::LoadError)
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:290:in `block in activate'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:289:in `each'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:289:in `activate'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:290:in `block in activate'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:289:in `each'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:289:in `activate'
    from /Users/matt/.rvm/rubies/ruby-1.9.2-p136/lib/ruby/site_ruby/1.9.1/rubygems.rb:216:in `try_activate'
    from :32:in `rescue in require'
    from :29:in `require'
    from /Users/matt/forks/active_merchant/test/test_helper.rb:25:in `'
    from :29:in `require'
    from :29:in `require'
    from test/unit/avs_result_test.rb:1:in `'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `load'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `block in '
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `each'
    from /Users/matt/.rvm/gems/ruby-1.9.2-p136/gems/rake-0.8.7/lib/rake/rake_test_loader.rb:5:in `'
rake aborted!
Command failed with status (1): [/Users/matt/.rvm/rubies/ruby-1.9.2-p136/bi...]

(See full trace by running task with --trace)

What am I missing?

Much thanks!

GData gem interference

I have what is rather rapidly becoming an urgent problem with what I
can only assume is an ActiveMerchant bug.
I am using the google GData gem to post data to the sites api using an
atom feed.
This works perfectly until I reference the ActiveMerchant gem in my
environment.rb file and as soon as I do this I get 415 unsupported
content type errors along the lines of
GData::Client::UnknownError: request error 415: Content-Type
application/x-www-form-urlencoded is not a valid input type
So somehow ActiveMerchant when included in the environment.rb gems
list has overriden the content-Type setting somewhere for NET::HTTP
post requests (and I assume put requests but untested)

Quickpay also supports Sweden

So you can add SE after the DK in the Readme.

As they support Swedbank they might also work in other scandinavian countries. But I can vouch for Sweden as we're using them ourselves over here.

active merchant view helpers breka Clearance

Bug: ActiveMerchant view helpers loads Routes early if ActiveMerchant is used as a plugin. Specifically, this breaks Clearance's routing extensions. Really crazy bug to try to track down!

Workaround: Use ActiveMerchant as a gem

Braintree Partial Refunds

Braintree allow for partial refunds. I notice that the #refund for the Braintree Gateway removes the amount options. Is this intentional?

One can use #credit but it is generally better to do a refund against an order with a transaction_id when possible.

Including ActiveMerchant forces routes reload

Including ActiveMerchant forces routes reload.
The routes reload is very slow.

Tracked down to including this or any subnamespaced modules:
ActiveMerchant::Billing::Integrations

The problem is probably caused by defining inflections in there.

Gem support?

Is creating an active_merchant gem in the pipeline? It would be a great way to keep up to date on the latest stable version for production use.

PayPal: Rounding Value errors

Hey,

I'm trying to do a shop system for a customer and I'm using activemerchant for that. The problem is: If the user has to pay 1.30€ (130 cents) paypal just substracts 100ct from the user's paypal account - if the user has to pay 13.80€ (1380 cents) paypal just substracts 1300 cents from the user's paypal account - so it's always flooring it.

Can you tell me where this comes from?

Braintree::Configuration.logger can be nil resulting in a NoMethodError

Line 25 tries to set #level on the logger which fails if the logger is nil. Should check for the presence of logger before sending it a message.

Relevant part of the stack trace (also see http://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/gateways/braintree_blue.rb#L25):

/Users/dave/.rvm/gems/ruby-1.9.2-head/gems/activesupport-3.0.0.rc/lib/active_support/whiny_nil.rb:48:in `method_missing': undefined method `level=' for nil:NilClass (NoMethodError)
    from /Users/dave/.rvm/gems/ruby-1.9.2-head/gems/activemerchant-1.7.1/lib/active_merchant/billing/gateways/braintree_blue.rb:25:in `initialize'
    from /Users/dave/.rvm/gems/ruby-1.9.2-head/gems/activemerchant-1.7.1/lib/active_merchant/billing/gateways/braintree.rb:12:in `new'
    from /Users/dave/.rvm/gems/ruby-1.9.2-head/gems/activemerchant-1.7.1/lib/active_merchant/billing/gateways/braintree.rb:12:in `new'

Gateways should be packaged as separate gems

Currently all Active Merchant's gateways ship as part of the active_merchant gem, but there would be a lot of benefit to shipping only a kernel in active_merchant and separating out gateways into their own gems (i.e. active_merchant_paypal, active_merchant_authorize, etc..)

Benefits

  • Releasing a new kernel would be far easier that releasing an entire suite of gateways
  • A single gateway version could support multiple kernel versions
  • A gateway could be created and maintained by anyone who had the need
  • A gateway could be forked and merged without having to effect every user of active merchant
  • Development is decentralized and democratized

Trident Gateway?

Any plans to support the Trident payment gateway? Kohana in PHP supports it, but it would be great if it were in AM.

Thanks in advance.

add method for GetTransactionDetails API Operation

Here's the monkey patch I'm using (it works):

module ActiveMerchant module Billing class PaypalExpressGateway def transaction_details_for(transaction_id)
    xml = Builder::XmlMarkup.new :indent => 2
    xml.tag! 'GetTransactionDetailsReq', 'xmlns' => PAYPAL_NAMESPACE do
      xml.tag! 'GetTransactionDetailsRequest', 'xmlns:n2' => EBAY_NAMESPACE do
        xml.tag! 'n2:Version', API_VERSION
        xml.tag! 'TransactionID', transaction_id
      end
    end

    commit 'GetTransactionDetails', xml.target!
  end
end

end
end

no such file to load -- lib/active_merchant (MissingSourceFile)

we use jruby+warbler running fine on development mode, but running on stagging, we got the following error log, any hint?

[INFO] no such file to load -- lib/active_merchant (MissingSourceFile)
[INFO] file:/var/lib/hudson/.m2/repository/org/jruby/jruby-complete/1.5.0.RC3/jruby-complete-1.5.0.RC3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in require' [INFO] file:/var/lib/hudson/.m2/repository/org/jruby/jruby-complete/1.5.0.RC3/jruby-complete-1.5.0.RC3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire'
[INFO] /var/lib/hudson/.m2/repository/.jruby/gems/activesupport-2.3.3/lib/active_support/dependencies.rb:158:in require' [INFO] /etc/hudson/jobs/staging--master--ebs/workspace/fliptop-f4p/src/main/rails/tmp/war/WEB-INF/gems/gems/activemerchant-1.5.1/lib/support/gateway_support.rb:3 [INFO] /etc/hudson/jobs/staging--master--ebs/workspace/fliptop-f4p/src/main/rails/tmp/war/WEB-INF/gems/gems/activemerchant-1.5.1/lib/support/gateway_support.rb:31:inrequire'

nil object error from form helpers with new CreditCard object

When passing a newly created credit card object with an empty errors collection to a form helper, I get the "nil object when you didn't expect it" error. It seems to be popping when the rails infrastructure calls error_message.any? in active_model_helper.rb. error_message is a method defined like this: object.errors[@method_name]
So, it seems if there are no errors for a given attribute, the ActiveMerchant Errors object returns nil, whereas the built-in rails one returns an empty array (maybe - can't verify that).

Issue with Rails3 (edge rails)

This is what I get whenever run any rake task:

DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /Users/katz/.rvm/gems/ruby-1.9.2-p136/gems/active_merchant-1.5.2/lib/active_merchant/lib/post_data.rb:4)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /Users/katz/.rvm/gems/ruby-1.9.2-p136/gems/active_merchant-1.5.2/lib/active_merchant/lib/post_data.rb:4)
DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from  at /Users/katz/.rvm/gems/ruby-1.9.2-p136/gems/active_merchant-1.5.2/lib/active_merchant/lib/post_data.rb:5)
rake aborted!
uninitialized constant Rack::Session::Abstract::SessionHash

Braintree Blue Billing Address With Credit Card Store

I was surprised to see that the implementation of #store for credit cards to the Braintree Blue vault does not allow for the passing of billing address fields. This seems like it would be simple to add as follows:

def store(creditcard, options = {})
    commit do
      parameters = {   
        :first_name => creditcard.first_name,
        :last_name => creditcard.last_name,
        :email => options[:email],
        :credit_card => {
          :number => creditcard.number,
          :cvv => creditcard.verification_value,
          :expiration_month => creditcard.month.to_s.rjust(2, "0"),
          :expiration_year => creditcard.year.to_s}
      }
      if options[:billing_address]
        parameters[:credit_card].merge!(:billing_address => map_address(options[:billing_address]))
      end 

      result = Braintree::Customer.create(parameters)
      Response.new(result.success?, message_from_result(result),
        {
          :braintree_customer => (result.customer if result.success?),
          :customer_vault_id => (result.customer.id if result.success?)
        }
      )
    end

My guess is something similar could be done for #update as well.

Was this ever considered and not implemented intentionally or would a patch including a remote test be in order?

uninitialized constant ActiveMerchant::Billing::PaypalExpressResponse

I'm having a weird load problem.

The system says me that this constant is not defined ActiveMerchant::Billing::PaypalExpressResponse

See the example:

$ irb
irb(main):001:0> require 'rubygems'
irb(main):002:0> require 'activemerchant'
irb(main):003:0> ActiveMerchant::Billing::PaypalExpressResponse
NameError: uninitialized constant ActiveMerchant::Billing::PaypalExpressResponse

But I can charge any other gateway:

irb(main):004:0> ActiveMerchant::Billing::BraintreeGateway
=> ActiveMerchant::Billing::BraintreeGateway
irb(main):005:0> ActiveMerchant::Billing::DataCashGateway
=> ActiveMerchant::Billing::DataCashGateway

But not the PaypalExpressResponse:

irb(main):006:0> ActiveMerchant::Billing::PaypalExpressResponse
NameError: uninitialized constant ActiveMerchant::Billing::PaypalExpressResponse

The issue becomes more weird if possible if I try to charge PaypalExpressResponseGateway:

irb(main):007:0> ActiveMerchant::Billing::PaypalExpressResponseGateway
NameError: uninitialized constant ActiveMerchant::Billing::PaypalExpressResponseGateway

Which not exists, but then I can charge PaypalExpressResponse

irb(main):008:0> ActiveMerchant::Billing::PaypalExpressResponse
=> ActiveMerchant::Billing::PaypalExpressResponse

:?

  • activemerchant (1.9.0)
  • ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0]

Problem with Rails 2.3+

When trying to migrate a database to add a new model the Active Merchant plugin seems to prevent it from happening. I was using Rails 2.3.3. I've done a trace and these are the results displayed.

UPDATE: (I believe this Google post has the same problem but explains it better? http://groups.google.com/group/activemerchant/browse_thread/thread/650b28ef74c63f96)

** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
rake aborted!
You have a nil object when you didn't expect it!
You might have expected an instance of ActiveRecord::Base.
The error occurred while evaluating nil.[]=
C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/lib/active_me
rchant/billing/integrations/helper.rb:27:in mapping' C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/lib/active_me rchant/billing/integrations/bogus/helper.rb:6 C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ing
em_original_require'
C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in r equire' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:521:in new_constants_in' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/lib/active_me
rchant/billing/integrations/bogus.rb:1
C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in g em_original_require' C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inr
equire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:156:in require' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:521:innew_constants_in'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:156:in require' C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/lib/active_me rchant/billing/integrations.rb:4 C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ing
em_original_require'
C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in r equire' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:521:in new_constants_in' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/lib/active_me
rchant.rb:60
C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in g em_original_require' C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inr
equire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:156:in require' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:521:innew_constants_in'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:156:in require' C:/RailsProjects/rails_apps/fashion/vendor/plugins/active_merchant/init.rb:1:in evaluate_init_rb'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl
ugin.rb:146:in evaluate_init_rb' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/core_ext/kernel/reporting.rb:11:insilence_warnings'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl
ugin.rb:142:in evaluate_init_rb' C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl ugin.rb:48:inload'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl
ugin/loader.rb:38:in load_plugins' C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl ugin/loader.rb:37:ineach'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/rails/pl
ugin/loader.rb:37:in load_plugins' C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/initiali zer.rb:348:inload_plugins'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/initiali
zer.rb:163:in process' C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/initiali zer.rb:113:insend'
C:/RailsProjects/rails_apps/fashion/config/../vendor/rails/railties/lib/initiali
zer.rb:113:in run' C:/RailsProjects/rails_apps/fashion/config/environment.rb:18 C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:ing
em_original_require'
C:/RailsProjects/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in r equire' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor
t/dependencies.rb:521:in new_constants_in' C:/RailsProjects/rails_apps/fashion/vendor/rails/activesupport/lib/active_suppor t/dependencies.rb:156:inrequire'
C:/RailsProjects/rails_apps/fashion/vendor/rails/railties/lib/tasks/misc.rake:4
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:in call ' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:636:inexec
ute'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:in each ' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:631:inexec
ute'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:597:in invo ke_with_call_chain' C:/RailsProjects/ruby/lib/ruby/1.8/monitor.rb:242:insynchronize'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invo ke_with_call_chain' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:607:ininvo
ke_prerequisites'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:in each ' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:604:ininvo
ke_prerequisites'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:596:in invo ke_with_call_chain' C:/RailsProjects/ruby/lib/ruby/1.8/monitor.rb:242:insynchronize'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:590:in invo ke_with_call_chain' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:583:ininvo
ke'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2051:in inv oke_task' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop
_level'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:in eac h' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2029:intop
_level'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:in sta ndard_exception_handling' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2023:intop
_level'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2001:in run ' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:2068:insta
ndard_exception_handling'
C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/lib/rake.rb:1998:in run ' C:/RailsProjects/ruby/lib/ruby/gems/1.8/gems/rake-0.8.7/bin/rake:31 C:/RailsProjects/ruby/bin/rake:19:inload'
C:/RailsProjects/ruby/bin/rake:19

New gem release?

The 1.4.2 gem is currently un-usable on ruby 1.9. The issue was fixed back in May (in commit eb334c9) - are you able to release a new gem that includes the fix?

cheers!

class_inheritable_attribute deprecations in Gateway and BogusGateway

This is on edge Rails 3.1.pre and with activemerchant 1.10.0.

DEPRECATION WARNING: class_inheritable_attribute is deprecated, please use class_attribute method instead. Notice their behavior are slightly different, so refer to class_attribute documentation first. (called from ~/.rvm/gems/ree-1.8.7-2010.02/gems/activemerchant-1.10.0/lib/active_merchant/billing/gateways/bogus.rb:18)

nil object error from form helpers with new CreditCard object

Calling errors[:someattribute] on an ActiveRecord object will return an empty array if there are no errors for :someattribute. Calling the same on the CreditCard object will return nil which throws off the Rails form helpers. Can't pass a newly created CreditCard object to the form helpers in Rails in order to create a new CreditCard object - it'll give back a "nil object" error when Rails tries to call any? on the nil object (which would be an empty array if using the built-in Rails Error object.)

bug in gem dependencies

Looks like a fresh active_merchant gem install also installs activesupport 3.0.0 which then causes many errors. This patch should fix it (didn't think this warranted the entire fork/patch/pull process but I can if you want):

http://gist.github.com/583700

BogusGateway and conflicting Card Validation

If a type is provided (such as visa) to the bogus gateway, the card validates that the type does not match the number (1,2,3,4) (ie visa starts with 4), this validation should not take place when the gateway is the bogus gateway for development/testing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.