catarse_pagarme 2.7.1 → 2.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/controllers/catarse_pagarme/credit_cards_controller.rb +1 -1
- data/app/models/catarse_pagarme/credit_card_transaction.rb +4 -2
- data/lib/catarse_pagarme/version.rb +1 -1
- data/spec/controllers/catarse_pagarme/credit_cards_controller_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: ee9a86472ff099391c0c8e6325a1c3c59df75b58
|
4
|
+
data.tar.gz: 7cd444703b838f678225f581badc6692ea1cf968
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4fb7aa8f70997d872699120360bb10c9317ab0174697b2c6d5270ec0c22e749158b8a5bee4b1a77db63c2438deec9833fb7873db04a086c0a3c492749dbd5f82
|
7
|
+
data.tar.gz: 386474b3167a359fc2b78a2b23792b9377d756632dbb591731a3f915ec6eb283deee770ff7b2c3eb344a902c3dda2c72cece9d2dee5fa965e7b086d7973a9537
|
data/Gemfile.lock
CHANGED
@@ -5,7 +5,7 @@ module CatarsePagarme
|
|
5
5
|
transaction = CreditCardTransaction.new(credit_card_attributes, payment).charge!
|
6
6
|
|
7
7
|
render json: { payment_status: transaction.status }
|
8
|
-
rescue
|
8
|
+
rescue PagarMe::PagarMeError => e
|
9
9
|
render json: { payment_status: 'failed', message: e.message }
|
10
10
|
end
|
11
11
|
|
@@ -7,8 +7,10 @@ module CatarsePagarme
|
|
7
7
|
self.transaction = PagarMe::Transaction.new(self.attributes)
|
8
8
|
|
9
9
|
payment.update_attributes({
|
10
|
-
gateway: 'Pagarme',
|
11
|
-
|
10
|
+
gateway: 'Pagarme',
|
11
|
+
payment_method: payment_method
|
12
|
+
})
|
13
|
+
payment.save!
|
12
14
|
|
13
15
|
self.transaction.charge
|
14
16
|
|
@@ -47,7 +47,7 @@ describe CatarsePagarme::CreditCardsController do
|
|
47
47
|
|
48
48
|
context "when charges fails" do
|
49
49
|
before do
|
50
|
-
allow_any_instance_of(PagarMe::Transaction).to receive(:charge).and_raise(
|
50
|
+
allow_any_instance_of(PagarMe::Transaction).to receive(:charge).and_raise(PagarMe::PagarMeError)
|
51
51
|
post :create, {
|
52
52
|
locale: :pt, id: contribution.id, use_route: 'catarse_pagarme',
|
53
53
|
card_hash: sample_card_hash }
|
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.7.
|
4
|
+
version: 2.7.2
|
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: 2015-07-
|
12
|
+
date: 2015-07-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|