catarse_pagarme 2.10.9 → 2.10.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/app/controllers/catarse_pagarme/slip_controller.rb +1 -0
- data/app/models/catarse_pagarme/slip_transaction.rb +8 -0
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/dummy/app/models/payment.rb +2 -0
- data/spec/models/catarse_pagarme/bank_account_concern_spec.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: 4f1e3a365192c4dc5d2db50ee85d4203c39c46a7
|
4
|
+
data.tar.gz: d08d60e4e26b8d3459cd43516aaf3872f092e09b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f9c38e66e2679a065f1a6e405ba9f53b8163c11f22061e615fd31056beacfb40cd0b80c67c58dd2ca786b7444ae6eff6082595ab7d3fa11bc93f7311677922b
|
7
|
+
data.tar.gz: 1148fad1da62d736bdf3e0e03c939ffa4c3d0c83366e04121b07aab082430045a11086883469717f221ed9c7b4290890592487ad460d5f11517f5e0746df26bd
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
catarse_pagarme (2.10.
|
4
|
+
catarse_pagarme (2.10.10)
|
5
5
|
pagarme (= 2.1.4)
|
6
6
|
rails (~> 4.0)
|
7
7
|
sentry-raven
|
@@ -123,7 +123,7 @@ GEM
|
|
123
123
|
thor (>= 0.18.1, < 2.0)
|
124
124
|
rake (10.4.2)
|
125
125
|
redis (3.3.2)
|
126
|
-
rest-client (2.0.
|
126
|
+
rest-client (2.0.2)
|
127
127
|
http-cookie (>= 1.0.2, < 2.0)
|
128
128
|
mime-types (>= 1.16, < 4.0)
|
129
129
|
netrc (~> 0.8)
|
@@ -1,6 +1,14 @@
|
|
1
1
|
module CatarsePagarme
|
2
2
|
class SlipTransaction < TransactionBase
|
3
3
|
def charge!
|
4
|
+
unless payment.update_attributes({
|
5
|
+
gateway: 'Pagarme',
|
6
|
+
payment_method: payment_method})
|
7
|
+
|
8
|
+
raise ::PagarMe::PagarMeError.new(
|
9
|
+
payment.errors.messages.values.flatten.to_sentence)
|
10
|
+
end
|
11
|
+
|
4
12
|
self.transaction = PagarMe::Transaction.new(self.attributes)
|
5
13
|
self.transaction.charge
|
6
14
|
|
@@ -7,6 +7,8 @@ class Payment < ActiveRecord::Base
|
|
7
7
|
validates_presence_of :state, :key, :gateway, :payment_method, :value, :installments
|
8
8
|
validate :value_should_be_equal_or_greater_than_pledge
|
9
9
|
|
10
|
+
attr_accessor :generating_second_slip
|
11
|
+
|
10
12
|
before_validation do
|
11
13
|
generate_key
|
12
14
|
self.value ||= self.contribution.try(:value)
|
@@ -35,7 +35,7 @@ describe FakeBankAccount do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
it "bank_account_on_pagarme should be not valid with these attrs" do
|
38
|
-
expect(bank_account_on_pagarme.valid?).to
|
38
|
+
expect(bank_account_on_pagarme.valid?).to be_falsey
|
39
39
|
end
|
40
40
|
|
41
41
|
it "bank_account_on_pagarme should be valid with another attrs" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: catarse_pagarme
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Antônio Roberto Silva
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-05-
|
12
|
+
date: 2017-05-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|