catarse_moip 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/catarse_moip/moip_controller.rb +11 -10
- data/lib/catarse_moip/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 38c0d176ff9755f2c79b8472c7d5d57ffe491db3
|
4
|
+
data.tar.gz: 9f444b18ac44a26125af2a37d5371c95deb9e30b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ce8b0a39d1e76268d6bede05238ff01160e09807cb3e7ed072ed9895c87c1ea8859f3dd63a0adce3c9555f1d8b3a25a92a834adba3f5b05f0c6cdbbdcfc6981
|
7
|
+
data.tar.gz: 269a733ff5fea482ef79ac5b782c0f8d79ac78b8ed18d248eaec17e897975e208081c550cc5cf79d2ab75b0dd86d81e3edcce19bee89da758607b640b654c14b
|
data/Gemfile.lock
CHANGED
@@ -94,22 +94,23 @@ module CatarseMoip
|
|
94
94
|
params = response["Autorizacao"]["Pagamento"]
|
95
95
|
params = params.first unless params.respond_to?(:key)
|
96
96
|
|
97
|
-
|
98
|
-
|
99
|
-
|
97
|
+
backer.with_lock do
|
98
|
+
if params["Status"] == "Autorizado"
|
99
|
+
backer.confirm!
|
100
|
+
end
|
100
101
|
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
102
|
+
backer.update_attributes({
|
103
|
+
:payment_id => params["CodigoMoIP"],
|
104
|
+
:payment_choice => params["FormaPagamento"],
|
105
|
+
:payment_service_fee => params["TaxaMoIP"]
|
106
|
+
}) if params
|
107
|
+
end
|
106
108
|
end
|
107
109
|
end
|
108
110
|
|
109
111
|
def process_moip_message
|
110
|
-
PaymentEngines.create_payment_notification backer_id: backer.id, extra_data: JSON.parse(params.to_json.force_encoding('iso-8859-1').encode('utf-8'))
|
111
|
-
|
112
112
|
backer.with_lock do
|
113
|
+
PaymentEngines.create_payment_notification backer_id: backer.id, extra_data: JSON.parse(params.to_json.force_encoding('iso-8859-1').encode('utf-8'))
|
113
114
|
payment_id = (backer.payment_id.gsub(".", "").to_i rescue 0)
|
114
115
|
|
115
116
|
if payment_id <= params[:cod_moip].to_i
|
data/lib/catarse_moip/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catarse_moip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antônio Roberto Silva
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-09-
|
13
|
+
date: 2013-09-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|