lib/lemonway/client.rb in lemonway-1.0.0 vs lib/lemonway/client.rb in lemonway-1.0.1
- old
+ new
@@ -42,10 +42,10 @@
result = result.underscore_keys(true).with_indifferent_access
if result.key?(:e)
raise Error, [result.fetch(:e).try(:fetch, :code), result.fetch(:e).try(:fetch, :msg)].join(' : ')
elsif result.key?(:trans)
- result[:trans][:hpay]
+ result[:trans].fetch(:hpay, result[:trans])
elsif result.key?(:wallet)
result[:wallet]
else
result
end