so_paid 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
@@ -9,8 +9,11 @@ module SoPaid
9
9
  end
10
10
 
11
11
  def add_payment_vendor(name="cybersource", options={})
12
- new_vendor = ("SoPaid::" + name.classify).safe_constantize
13
- raise "Payment Vendor '#{name}' gem/plugin not supported." if new_vendor.blank?
12
+ begin
13
+ new_vendor = ("SoPaid::" + name.classify).constantize
14
+ rescue NameError => e
15
+ raise "Payment Vendor '#{name}' gem/plugin not supported."
16
+ end
14
17
  vo = options.delete(:vendor_options) || {}
15
18
  co = options.delete(:config_options) || {}
16
19
  vo ||= options
data/lib/so_paid/hop.rb CHANGED
@@ -47,7 +47,7 @@ module SoPaid
47
47
  @config_options = self.merge_defaults(config_options, @@config_defaults)
48
48
 
49
49
  @order = order
50
- @current_user_email = @config_options[:current_user_email] || @config_options[:current_user].try(:email) || (@order.user.try(:email) if @order.respond_to?(:user))
50
+ @current_user_email = @config_options[:current_user_email] || @config_options[:current_user].try(:email) || ( @order.respond_to?(:user) and @order.user.try(:email))
51
51
  generate_params
52
52
  return self
53
53
  end
@@ -1,3 +1,3 @@
1
1
  module SoPaid
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: so_paid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-31 00:00:00.000000000 Z
12
+ date: 2014-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -124,7 +124,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
124
  version: '0'
125
125
  requirements: []
126
126
  rubyforge_project:
127
- rubygems_version: 1.8.23
127
+ rubygems_version: 1.8.23.2
128
128
  signing_key:
129
129
  specification_version: 3
130
130
  summary: There was a need to consolidate all credit card processing vendors for our