suning_pay 0.3.0 → 0.3.1

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: a729ab0b12960ae49743dc188564d879a0b70046
4
- data.tar.gz: e94846f05ee12b967bf6822b5fde5a1b75c152f3
3
+ metadata.gz: 9d08ccdbeacfd4700b58052e65b068d863cb350f
4
+ data.tar.gz: 93fb05887b89199efffd6919da1d768b9c036112
5
5
  SHA512:
6
- metadata.gz: b16ab01d62c740fcbbb8dbffe1df02b02e585bdb896f6ce5af18d60d409836b293f78962d6b53d3f2793714ec372e79f7ff99f9483969fa89587d2a516c2e7ab
7
- data.tar.gz: 05a4d313875e15fbbc2cf624af9965cbdccb28e8b4d8cadb1d2137f93d7263662581ba52d0449cd71a56d845b38a0419f5f1f211af3a343b78241c58f19a1b46
6
+ metadata.gz: 81ed60599580d3668002883a7d756c6e53c5cda96b323614a6f4cdbcde1d921d3bd49f8ecc215e34ef35c37d8abfdeae9960e7a404d3023a3b41eaa0a9976916
7
+ data.tar.gz: 984db1e1039a57ca8c41befbd659669fc3c91e76e09449227f79b4b070f798ef65fbcf8ff7813efe5d93a5ebd98e9115822d90c229249b710e840dd3a0c04f96
@@ -71,7 +71,7 @@ module SuningPay
71
71
  :goodsType => goods_type,
72
72
  :goodsName => Base64.urlsafe_encode64(goods_name),
73
73
  :payTimeout => pay_timeout,
74
- :remark => remark,
74
+ :remark => Base64.urlsafe_encode64(remark),
75
75
  :tunnelData => Base64.urlsafe_encode64(tunnel_data)}
76
76
 
77
77
  post_params = SuningPay.client_options.merge(options).merge(input_hash)
@@ -58,17 +58,19 @@ module SuningPay
58
58
  summary = get_summary(func_params_hash)
59
59
  #加签名的查询参数
60
60
  func_params = signature_param(func_params_hash, summary)
61
+ conn = Faraday.new(:url => api_url)
62
+
63
+ response = conn.post '', func_params
64
+ html_response = response.body
65
+
61
66
  if SuningPay.debug_mode
62
67
  logger = Logger.new('suning_pay.log')
63
68
  logger.info('--------------SUNING PAY DEBUG--------------')
64
69
  logger.info("URL:#{api_url.to_s}")
65
70
  logger.info("PARAMS:#{func_params.to_s}")
71
+ logger.info("RESPONSE:#{html_response.to_s}")
66
72
  end
67
73
 
68
- conn = Faraday.new(:url => api_url)
69
-
70
- response = conn.post '', func_params
71
- html_response = response.body
72
74
  begin
73
75
  msg = JSON.parse(html_response)
74
76
  rescue JSON::ParserError => e
@@ -1,3 +1,3 @@
1
1
  module SuningPay
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: suning_pay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Terry.Tu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-15 00:00:00.000000000 Z
11
+ date: 2017-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties