Commit 891b008ca937a7626e97f65d5e027a84345592ea

Authored by jasl
1 parent 34f8efe3
Exists in master

refactor Result

Showing 1 changed file with 3 additions and 1 deletions   Show diff stats
lib/wx_pay/result.rb
... ... @@ -3,8 +3,10 @@ module WxPay
3 3 SUCCESS_FLAG = 'SUCCESS'.freeze
4 4  
5 5 def initialize(result)
6   - super
  6 + super nil # Or it will call `super result`
7 7  
  8 + self[:raw] = result
  9 +
8 10 if result['xml'].class == Hash
9 11 result['xml'].each_pair do |k, v|
10 12 self[k] = v
... ...