Commit ce26768dd26e603d855ace4cdbe8394c4685eed5

Authored by jasl
1 parent 30ec2ae2
Exists in master

issue #98 round 3

Showing 1 changed file with 1 additions and 0 deletions   Show diff stats
lib/wx_pay/sign.rb
@@ -8,6 +8,7 @@ module WxPay @@ -8,6 +8,7 @@ module WxPay
8 8
9 def self.generate(params, sign_type = SIGN_TYPE_MD5) 9 def self.generate(params, sign_type = SIGN_TYPE_MD5)
10 key = params.delete(:key) 10 key = params.delete(:key)
  11 + key = params.delete("key") if params["key"]
11 12
12 query = params.sort.map do |k, v| 13 query = params.sort.map do |k, v|
13 "#{k}=#{v}" if v.to_s != '' 14 "#{k}=#{v}" if v.to_s != ''