catarse_moip 1.0.7 → 1.0.8

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: f744a534a553e337c4f4e2d9d3c52d89d7b43c42
4
- data.tar.gz: 513f95aa587ca4400ad3496f5c012209a62b0a38
3
+ metadata.gz: 38c0d176ff9755f2c79b8472c7d5d57ffe491db3
4
+ data.tar.gz: 9f444b18ac44a26125af2a37d5371c95deb9e30b
5
5
  SHA512:
6
- metadata.gz: 4eebae198f56ec30f97edb13b278c3a836ce6d34d669549a5926935e4c564fa34cfd4754eed42238c0b958e7f9cb2f0798caadb38b3749cf265f9e91649df6c0
7
- data.tar.gz: 2e34de7c9da38c56cad9c53fdb29b66eebab03ea1230bd12e3d502724e4004ef15923542c071b6aab0a112d31b548d1652da00a8404a971d20b9d1f65bdcf87e
6
+ metadata.gz: 9ce8b0a39d1e76268d6bede05238ff01160e09807cb3e7ed072ed9895c87c1ea8859f3dd63a0adce3c9555f1d8b3a25a92a834adba3f5b05f0c6cdbbdcfc6981
7
+ data.tar.gz: 269a733ff5fea482ef79ac5b782c0f8d79ac78b8ed18d248eaec17e897975e208081c550cc5cf79d2ab75b0dd86d81e3edcce19bee89da758607b640b654c14b
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- catarse_moip (1.0.7)
13
+ catarse_moip (1.0.8)
14
14
  libxml-ruby (~> 2.6.0)
15
15
  rails (~> 3.2.12)
16
16
 
@@ -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
- if params["Status"] == "Autorizado"
98
- backer.confirm!
99
- end
97
+ backer.with_lock do
98
+ if params["Status"] == "Autorizado"
99
+ backer.confirm!
100
+ end
100
101
 
101
- backer.update_attributes({
102
- :payment_id => params["CodigoMoIP"],
103
- :payment_choice => params["FormaPagamento"],
104
- :payment_service_fee => params["TaxaMoIP"]
105
- }) if params
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
@@ -1,3 +1,3 @@
1
1
  module CatarseMoip
2
- VERSION = "1.0.7"
2
+ VERSION = "1.0.8"
3
3
  end
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.7
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 00:00:00.000000000 Z
13
+ date: 2013-09-18 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails