pagarme 1.9.1 → 1.9.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/lib/pagarme/request.rb +1 -2
- data/pagarme.gemspec +1 -1
- data/test/pagarme/transaction.rb +1 -16
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db8bb546fef78ef9030feaa67e4b2653b954b605
|
4
|
+
data.tar.gz: 791ac20fa6349679658a591df295df1fe60af23c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f268fc7eb1887d3cebbf0b93cc14f5d220023f793d16a9969baafc3de5acc6df4471d0554a031e28c955ae66699629d5d6367de19f58e5589facf4dafd7b8b8
|
7
|
+
data.tar.gz: e2a77cf16a0297be1d12536b34a255de4dc448b373c72d379eaa302396fbb355503ddeac4b05634ca5363935ede8be52fd42ecd884bf835626a55656f25fe64c
|
data/Gemfile.lock
CHANGED
data/lib/pagarme/request.rb
CHANGED
@@ -38,8 +38,7 @@ module PagarMe
|
|
38
38
|
:headers => self.headers,
|
39
39
|
:open_timeout => 30,
|
40
40
|
:payload => self.class.encode(parameters),
|
41
|
-
:timeout => 90
|
42
|
-
:verify_ssl => false # TODO: change to verify SSL
|
41
|
+
:timeout => 90
|
43
42
|
})
|
44
43
|
rescue SocketError => e
|
45
44
|
error = "Error connecting to server (#{e.message})."
|
data/pagarme.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "pagarme"
|
7
|
-
spec.version = '1.9.
|
7
|
+
spec.version = '1.9.2'
|
8
8
|
spec.authors = ["Pedro Franceschi", "Henrique Dubugras"]
|
9
9
|
spec.email = ["pedrohfranceschi@gmail.com", "henrique@pagar.me"]
|
10
10
|
spec.description = %q{Pagar.me's ruby gem}
|
data/test/pagarme/transaction.rb
CHANGED
@@ -11,21 +11,6 @@ module PagarMe
|
|
11
11
|
test_transaction_response(transaction)
|
12
12
|
end
|
13
13
|
|
14
|
-
should 'be able to simulate a boleto payment' do
|
15
|
-
transaction = PagarMe::Transaction.new({
|
16
|
-
:payment_method => "boleto",
|
17
|
-
:amount => "1000"
|
18
|
-
})
|
19
|
-
transaction.charge
|
20
|
-
|
21
|
-
assert transaction.status == 'waiting_payment'
|
22
|
-
|
23
|
-
transaction.status = 'paid'
|
24
|
-
transaction.save
|
25
|
-
|
26
|
-
assert transaction.status == 'paid'
|
27
|
-
end
|
28
|
-
|
29
14
|
should 'be able to refund' do
|
30
15
|
transaction = test_transaction
|
31
16
|
transaction.charge
|
@@ -37,7 +22,7 @@ module PagarMe
|
|
37
22
|
should 'be able to search by anything' do
|
38
23
|
transaction = test_transaction_with_customer
|
39
24
|
transaction.charge
|
40
|
-
transactions = PagarMe::Transaction.find_by({
|
25
|
+
transactions = PagarMe::Transaction.find_by({'customer[document_number]' => 36433809847}, 2, 10)
|
41
26
|
assert transactions.size == 10
|
42
27
|
transactions.each do |t|
|
43
28
|
assert t.customer.document_number == '36433809847'
|