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: 210302e5d452a5de3554d164fc586dbc2c56dfbe
4
- data.tar.gz: d87627bed00ab8251266545ef3beefe06f04f7d0
3
+ metadata.gz: d16a1550e626fb9eae05ff313dd0295f62a16e0d
4
+ data.tar.gz: 70ad09f8044ad602ccac430460e75be1fbe3dbf6
5
5
  SHA512:
6
- metadata.gz: 54ad034db0521e5c8ab8e5e8692479aca303546f2eee3ec8e49aa5ce42dc7c61f03c751078b78f30c7e4e035021a78cd892f54c9055afc34219afce6638a3241
7
- data.tar.gz: aed5690f1fa4ae39db4c48e0656f8ac8fda5ddde34566bbdf800c10abdc68e3287a87f5b66fb5a44813dbe0e7b006b8d120946043b40e8566a9aaf0894ab5e82
6
+ metadata.gz: 8c6ce4f3311fe998821ac03f3b16e1cda8a3f65aa6c465ca86a3f41744c682cb6a3f4e1999285f0e405a586d2cf1aac3f072a72a1349916856e60766c283b9a4
7
+ data.tar.gz: 67a3ce105e6d099fbd3f01d4bbf521c39ba94808edd5a19361c9dfb0a9e1b4c918cf068b5bc8bab99bed4fa043e5c6d8055ad75d857caf67aeae00eae85e129e
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- catarse_moip (1.0.3)
13
+ catarse_moip (1.0.4)
14
14
  libxml-ruby (~> 2.6.0)
15
15
  rails (~> 3.2.12)
16
16
 
@@ -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"],
@@ -1,3 +1,3 @@
1
1
  module CatarseMoip
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
@@ -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.3
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-04 00:00:00.000000000 Z
13
+ date: 2013-09-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails