catarse_moip 2.0.3 → 2.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: 2105749254d2578e1c9382dda6e59e5327decc71
4
- data.tar.gz: 3bae263af5ed0142c8e956e20ca88964aae25151
3
+ metadata.gz: 241f25a32cce31dc74cd24c699ec903052225ca9
4
+ data.tar.gz: 0b4296201bc4ca0182699c3a29d9db7c7cd4e176
5
5
  SHA512:
6
- metadata.gz: 523381ee54f2e75b01f639adfb2c0ff49bc3c0e6b2f57fa71efbb24e6ad69f977320f903d12f573157d4bb22ca0e8a4011c7a8c8385fd8d1f36f1df6f2dd62a9
7
- data.tar.gz: ad2ebf75b11048a882812557ae32f2c709f7b53463d4bd4863cb4a78d5856a23571306d5d15209b8d077da63a03db83fbe261577347ad8963a0aac6f7676a5d2
6
+ metadata.gz: 1d13323d30cabe055055e8acba5701588f0c9a22d994da5ae0051e5eef40f534dbb505afe57a26b9b9f1657570e2eac792c4c9ac741bccf6fa0111602e7e48b0
7
+ data.tar.gz: 369f69068f71a858279e11c235c966275a18ba1df403d7c79816fa7ad0203a2bab6fe157ea63c767983a9405f1e28e07610d7021fb8eccb2aa63a33f929fee46
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- catarse_moip (2.0.3)
13
+ catarse_moip (2.0.4)
14
14
  libxml-ruby (~> 2.6.0)
15
15
  rails (~> 4.0)
16
16
 
@@ -102,6 +102,11 @@ module CatarseMoip
102
102
  if response && response["Autorizacao"]
103
103
  params = response["Autorizacao"]["Pagamento"]
104
104
  params = params.first unless params.respond_to?(:key)
105
+
106
+ if params["Status"] == "Autorizado"
107
+ backer.confirm!
108
+ end
109
+
105
110
  backer.update_attributes({
106
111
  :payment_id => params["CodigoMoIP"],
107
112
  :payment_choice => params["FormaPagamento"],
@@ -1,3 +1,3 @@
1
1
  module CatarseMoip
2
- VERSION = "2.0.3"
2
+ VERSION = "2.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: 2.0.3
4
+ version: 2.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