new_alipay 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: def41a10fcc4cb5ed4986c2d4896db9edf486135
4
- data.tar.gz: 5cf4e211b26c5a8929f4c3d3f20b75544f124994
3
+ metadata.gz: 76e803de1088f5a3321df787853ba542af4b5bd9
4
+ data.tar.gz: f65f9514b92176b77b8ac4843d092777e1d61f43
5
5
  SHA512:
6
- metadata.gz: c291cfa75b8eebc2465eee2a7364f0858b1000a97dba4a4b79bbb192a397213655d558bd42b63b63882e21ba425b507c719a779904ed2e6ed6001a44f23a117f
7
- data.tar.gz: 109e2d2c9eb4cba8c7cc0f1febe58a557c4eb8a623018a27815913f63356ec73d665250b3cf16fcfcbed031b455816fa2ecfbb4b32c1cbf4aa9985d946cf755c
6
+ metadata.gz: 8f75c1e48f0f8576e370ced4e293c13d336d3761074b761cd1f322591b2dcb5fba386a15c6838d203b5fea228537ccd9c014aede5fab9f2f1ecdae70772c8bbc
7
+ data.tar.gz: 265c46c7cf64d3784e01431acec95e86e27c2087b803a242c3248acf9c09ad22620b29779339e0181329f86400254f19e2db9018a77906dbba3f0a67962b735a
@@ -34,6 +34,8 @@ module NewAlipay
34
34
  "detail_data" => para_temp[:detail_data],
35
35
  "_input_charset" => "utf-8"
36
36
  }
37
+ parameters = parameters.merge({buyer_account_name: para_temp[:buyer_account_name]}) if para_temp[:buyer_account_name]
38
+
37
39
  signing_str_array = parameters.inject([]) { |memo, (key, v)| memo << "#{key}=#{v}"; memo }
38
40
  sorted_signing_str_array = signing_str_array.sort! { |m, n| m.to_s <=> n.to_s }
39
41
  sign = Digest::MD5.hexdigest(sorted_signing_str_array.join('&')+NewAlipay.key)
@@ -59,6 +61,7 @@ module NewAlipay
59
61
  "detail_data" => para_temp[:detail_data],
60
62
  "_input_charset" => "utf-8"
61
63
  }
64
+ parameters = parameters.merge({buyer_account_name: para_temp[:buyer_account_name]}) if para_temp[:buyer_account_name]
62
65
  signing_str_array = parameters.inject([]) { |memo, (key, v)| memo << "#{key}=#{v}"; memo }
63
66
  sorted_signing_str_array = signing_str_array.sort! { |m, n| m.to_s <=> n.to_s }
64
67
  sign = Digest::MD5.hexdigest(sorted_signing_str_array.join('&')+NewAlipay.key)
@@ -1,3 +1,3 @@
1
1
  module NewAlipay
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: new_alipay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - saxer