lib/chan_pay/sign/rsa.rb in chan_pay-0.6.0 vs lib/chan_pay/sign/rsa.rb in chan_pay-0.7.0

- old
+ new

@@ -17,15 +17,19 @@ result end private - def self.link_hash(hash) + def self.link_hash(hash_in) + hash = Marshal.load Marshal.dump(hash_in) hash.delete_if do |key, value| key == :Sign || key == :SignType || value.nil? || value == '' end values = [] hash.sort.to_h.each{|k,v| + if v.kind_of?(Hash) + v = v.to_json + end values << "#{k}=#{v}" } values.join("&") end