blsm-vd-core 0.3.9 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -6
- data/blsm-vd-core.gemspec +1 -1
- data/lib/blsm-vd-core/version.rb +1 -1
- data/lib/blsm-vd-core.rb +11 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf07cda0da972dc53eac58aca880cdfbee8ff55d
|
4
|
+
data.tar.gz: 1f744ca8b99dc5e9c0ba68ce695d2606d4fd4e39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10b1a91b040c16bfa282589a7467ea989a57a7f00ed61c605af4757c6a273229e8da68d21f96d378c2374d1922505aa3a190f2582b6f7f42e0c4381089b19f4b
|
7
|
+
data.tar.gz: 50e46ea162f5ba6d3181a55711848e0e5972649bd79bc33800cbff5a28ddffd3cf2defa6f2b8c909d73094f203c810e244263a1aa874cccc4d5ed839f0d6f382
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
blsm-vd-core (0.3.
|
4
|
+
blsm-vd-core (0.3.9)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://ruby.taobao.org/
|
@@ -34,7 +34,7 @@ GEM
|
|
34
34
|
i18n (~> 0.6)
|
35
35
|
multi_json (~> 1.0)
|
36
36
|
arel (3.0.2)
|
37
|
-
blsm-mp-wx (0.
|
37
|
+
blsm-mp-wx (0.2.3)
|
38
38
|
builder (3.0.0)
|
39
39
|
diff-lcs (1.2.5)
|
40
40
|
erubis (2.7.0)
|
@@ -109,7 +109,7 @@ DEPENDENCIES
|
|
109
109
|
activemodel (~> 3.2)
|
110
110
|
activerecord (~> 3.2)
|
111
111
|
activesupport (~> 3.2)
|
112
|
-
blsm-mp-wx (~> 0.
|
112
|
+
blsm-mp-wx (~> 0.2.3)
|
113
113
|
blsm-vd-core!
|
114
114
|
bundler (~> 1.9)
|
115
115
|
faraday (~> 0.9)
|
@@ -117,6 +117,3 @@ DEPENDENCIES
|
|
117
117
|
rails (~> 3.2)
|
118
118
|
rake (~> 10.0)
|
119
119
|
rspec (~> 3.2)
|
120
|
-
|
121
|
-
BUNDLED WITH
|
122
|
-
1.10.3
|
data/blsm-vd-core.gemspec
CHANGED
@@ -37,5 +37,5 @@ Gem::Specification.new do |spec|
|
|
37
37
|
spec.add_development_dependency "activerecord", "~> 3.2"
|
38
38
|
spec.add_development_dependency "activesupport", "~> 3.2"
|
39
39
|
spec.add_development_dependency "faraday", "~> 0.9"
|
40
|
-
spec.add_development_dependency "blsm-mp-wx", "~> 0.
|
40
|
+
spec.add_development_dependency "blsm-mp-wx", "~> 0.2.3"
|
41
41
|
end
|
data/lib/blsm-vd-core/version.rb
CHANGED
data/lib/blsm-vd-core.rb
CHANGED
@@ -87,10 +87,12 @@ module BlsmVdCore
|
|
87
87
|
def on_order_signed(order_id, sign_type)
|
88
88
|
order = Order.where(id: order_id).first
|
89
89
|
clearing_item = ClearingItem.where(order_id: order.id).first if order
|
90
|
+
seller = order.application.user if order && order.application
|
90
91
|
|
91
92
|
#数据校验
|
92
93
|
return ERROR_CODES[404] unless order
|
93
94
|
return ERROR_CODES[4042] unless clearing_item
|
95
|
+
return ERROR_CODES[4045] unless seller
|
94
96
|
return ERROR_CODES[0] if sign_type =~ /sign_ok/ && clearing_item.state.to_s =~ /CASH_BACK/
|
95
97
|
|
96
98
|
#安全校验
|
@@ -98,20 +100,26 @@ module BlsmVdCore
|
|
98
100
|
danger = VdInfoSec.dangerous?(vd_transaction)
|
99
101
|
return danger if danger
|
100
102
|
|
101
|
-
|
102
|
-
if sign_type =~ /sign_ok/
|
103
|
+
#(物流返款成功,订单完成)
|
104
|
+
if sign_type =~ /sign_ok/
|
103
105
|
note = Order.latest_notes(clearing_item, {username: '首趣'}, '标记物流返款')
|
104
106
|
clearing_item.marking_confirm(note)
|
107
|
+
|
108
|
+
#物流返款通知
|
109
|
+
seller_notify = {touser: seller.openid, order_id: Order.encrypt(Order.encrypted_id_key, order.id.to_s), content: "【物流返款通知】"}
|
110
|
+
BlsmMpWx.create_msg(nil, seller.openid, seller_notify, 'order')
|
111
|
+
|
105
112
|
VdInfoSec.committed(vd_transaction)
|
106
113
|
return ERROR_CODES[200]
|
107
114
|
end
|
108
115
|
|
116
|
+
|
109
117
|
#签收失败(拒签)
|
110
118
|
if sign_type =~ /sign_fail/
|
111
119
|
VdInfoSec.committed(vd_transaction)
|
112
120
|
user = order.application.user if order && order.application
|
113
121
|
#拒签删除积分
|
114
|
-
on_order_sign_fail(user.id,order_id) if user
|
122
|
+
on_order_sign_fail(user.id, order_id) if user
|
115
123
|
if clearing_item.clearing && clearing_item.clearing.state == "BALANCED"
|
116
124
|
i_clearing = clearing_item.clone
|
117
125
|
i_clearing.clearing_id = nil
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blsm-vd-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- saxer
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-09-11 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -143,14 +143,14 @@ dependencies:
|
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 0.
|
146
|
+
version: 0.2.3
|
147
147
|
type: :development
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 0.
|
153
|
+
version: 0.2.3
|
154
154
|
description: 首趣微店核心模块,包含结算项的创建、更新、删除,微店主积分的更改等信息
|
155
155
|
email:
|
156
156
|
- 15201280641@qq.com
|