Browse files

bugfixes

  • Loading branch information...
1 parent ae86989 commit ecd210803e424306e6fefa9ff8620db0b183e2de @jeanmartin jeanmartin committed May 23, 2012
Showing with 7 additions and 6 deletions.
  1. +1 −1 VERSION
  2. +1 −1 lib/micropayment-rails/classes/base.rb
  3. +3 −2 lib/micropayment-rails/classes/customer.rb
  4. +2 −2 micropayment-rails.gemspec
View
2 VERSION
@@ -1 +1 @@
-0.1.4
+0.1.5
View
2 lib/micropayment-rails/classes/base.rb
@@ -8,7 +8,7 @@ def self.valid_attributes(attrs)
def id
- send self::IDENTIFIER
+ send self.class::IDENTIFIER
end
View
5 lib/micropayment-rails/classes/customer.rb
@@ -5,15 +5,15 @@ class Customer < Micropayment::Base
def address=(params={})
- @address = Micropayment::Address.create( id, params )
+ @address = Micropayment::Address.create!( id, params )
end
def address
@address ||= (Micropayment::Address.find( id ) rescue nil)
end
def bank_account=(params={})
- @bank_account = Micropayment::BankAccount.create( id, params )
+ @bank_account = Micropayment::BankAccount.create!( id, params )
end
def bank_account
@@ -64,6 +64,7 @@ def self.create!(params={})
end
result = Micropayment::Debit.customerCreate( create_params )
if result["error"] == "0"
+ create_params[:customerId] ||= result["customerId"]
customer = self.new( create_params )
customer.bank_account = bank_account_params if bank_account_params
customer.address = address_params if address_params
View
4 micropayment-rails.gemspec
@@ -5,11 +5,11 @@
Gem::Specification.new do |s|
s.name = "micropayment-rails"
- s.version = "0.1.4"
+ s.version = "0.1.5"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Jan Schwenzien"]
- s.date = "2012-05-22"
+ s.date = "2012-05-23"
s.description = "Use the micropayment API in your Rails project."
s.email = "jan@general-scripting.com"
s.extra_rdoc_files = [

0 comments on commit ecd2108

Please sign in to comment.