diff --git a/active_merchant_tranzila.gemspec b/active_merchant_tranzila.gemspec index 81187e2..a0cb00b 100644 --- a/active_merchant_tranzila.gemspec +++ b/active_merchant_tranzila.gemspec @@ -10,7 +10,7 @@ Gem::Specification.new do |s| s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Vitaly Kushner"] s.date = %q{2010-08-11} - s.description = %q{TODO: longer description of your gem} + s.description = %q{longer description of your gem} s.email = %q{vitaly@astrails.com} s.extra_rdoc_files = [ "LICENSE", @@ -30,7 +30,7 @@ Gem::Specification.new do |s| s.rdoc_options = ["--charset=UTF-8"] s.require_paths = ["lib"] s.rubygems_version = %q{1.3.6} - s.summary = %q{TODO: one-line summary of your gem} + s.summary = %q{one-line summary of your gem} s.test_files = [ "test/helper.rb", "test/remote/gateways/remote_tranzila_test.rb", diff --git a/lib/active_merchant/billing/gateways/tranzila.rb b/lib/active_merchant/billing/gateways/tranzila.rb index e1983c0..6a4c1a8 100644 --- a/lib/active_merchant/billing/gateways/tranzila.rb +++ b/lib/active_merchant/billing/gateways/tranzila.rb @@ -399,7 +399,7 @@ def purchase_parameters(money, creditcard, options = {}) end def default_parameters_hash(money, creditcard, options = {}) - { + default_params = { :sum => amount(money), :ccno => creditcard.number, :expyear => creditcard.year.to_s[-2, 2], @@ -419,7 +419,6 @@ def default_parameters_hash(money, creditcard, options = {}) :cred_type => options[:cred_type], :currency => @options[:currency], :myid => options[:myid], - #transaction with monthly installments not supported yet #:fpay => options[:myid], #:spay => options[:spay], @@ -428,6 +427,12 @@ def default_parameters_hash(money, creditcard, options = {}) #tranzila registered supplier (test3) :supplier => @options[:supplier] } + + [:email, :company, :contact].each do |param| + default_params[param] = options[param].encode("windows-1255") if options.key?(param) + end + + default_params end def to_query_s(hash)