Skip to content
Browse files

Changed result format (in refill_operation)

  • Loading branch information...
1 parent 1d66e63 commit ed87560a56b4a1878326bc288fa40af144b194db @andreev andreev committed May 14, 2010
Showing with 3 additions and 2 deletions.
  1. +1 −1 eport.gemspec
  2. +2 −1 lib/eport.rb
View
2 eport.gemspec
@@ -1,6 +1,6 @@
spec = Gem::Specification.new do |s|
s.name = "eport"
- s.version = "0.0.1.1"
+ s.version = "0.0.3"
s.author = "Alexander Lomakin, Dmitry Andreev"
s.email = "d.g.andreev@gmail.com"
s.homepage = ""
View
3 lib/eport.rb
@@ -56,7 +56,8 @@ def refill_operation(operation_name, operation_id, product_id, value, account)
end
ic = Iconv.new('UTF-8', 'WINDOWS-1251')
- ic.iconv(req.confirm)
+ res = ic.iconv(req.confirm).split("RESULT\r\n")[1..-1].collect{|o| Hash[o.split("\r\n").collect{|o| o.split("=")}].symbolize_keys}
+ res.inject({}){|h,o| h = o if o[:id] == operation_id.to_s ;h}
end

0 comments on commit ed87560

Please sign in to comment.
Something went wrong with that request. Please try again.