catarse_moip 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d16a1550e626fb9eae05ff313dd0295f62a16e0d
|
|
4
|
+
data.tar.gz: 70ad09f8044ad602ccac430460e75be1fbe3dbf6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8c6ce4f3311fe998821ac03f3b16e1cda8a3f65aa6c465ca86a3f41744c682cb6a3f4e1999285f0e405a586d2cf1aac3f072a72a1349916856e60766c283b9a4
|
|
7
|
+
data.tar.gz: 67a3ce105e6d099fbd3f01d4bbf521c39ba94808edd5a19361c9dfb0a9e1b4c918cf068b5bc8bab99bed4fa043e5c6d8055ad75d857caf67aeae00eae85e129e
|
data/Gemfile.lock
CHANGED
|
@@ -93,6 +93,11 @@ module CatarseMoip
|
|
|
93
93
|
if response && response["Autorizacao"]
|
|
94
94
|
params = response["Autorizacao"]["Pagamento"]
|
|
95
95
|
params = params.first unless params.respond_to?(:key)
|
|
96
|
+
|
|
97
|
+
if params["Status"] == "Autorizado"
|
|
98
|
+
backer.confirm!
|
|
99
|
+
end
|
|
100
|
+
|
|
96
101
|
backer.update_attributes({
|
|
97
102
|
:payment_id => params["CodigoMoIP"],
|
|
98
103
|
:payment_choice => params["FormaPagamento"],
|
data/lib/catarse_moip/version.rb
CHANGED
|
@@ -179,6 +179,7 @@ describe CatarseMoip::MoipController do
|
|
|
179
179
|
before do
|
|
180
180
|
MoIP.should_receive(:query).with(backer.payment_token).and_return(moip_query_response)
|
|
181
181
|
payment = moip_query_response["Autorizacao"]["Pagamento"].first
|
|
182
|
+
backer.should_receive(:confirm!)
|
|
182
183
|
backer.should_receive(:update_attributes).with({
|
|
183
184
|
payment_id: payment["CodigoMoIP"],
|
|
184
185
|
payment_choice: payment["FormaPagamento"],
|
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.4
|
|
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-10 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|