pagseguro-oficial 2.4.0 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +17 -1
- data/Gemfile +0 -2
- data/README.md +1 -1
- data/docs/transparent_checkout.md +3 -3
- data/examples/authorization/create_authorization.rb +32 -0
- data/examples/authorization/create_authorization_with_account.rb +56 -0
- data/examples/authorization/{authorization_by_code.rb → search/search_authorization_by_code.rb} +4 -4
- data/examples/authorization/search/search_authorization_by_date.rb +35 -0
- data/examples/authorization/{authorization_by_notification_code.rb → search/search_authorization_by_notification_code.rb} +4 -5
- data/examples/authorization/search/search_authorization_by_reference.rb +31 -0
- data/examples/{payment_request.rb → checkout/create_payment_request.rb} +5 -7
- data/examples/{transaction/abandoned_transactions.rb → checkout/search/search_abandoned_transactions.rb} +6 -3
- data/examples/{transaction/transaction_by_code.rb → checkout/search/search_transaction_by_code.rb} +3 -3
- data/examples/{transaction/transaction_by_notification_code.rb → checkout/search/search_transaction_by_notification_code.rb} +3 -3
- data/examples/{transaction/transaction_by_reference.rb → checkout/search/search_transaction_by_reference.rb} +3 -3
- data/examples/{transaction/transaction_status_history.rb → checkout/search/search_transaction_status_history.rb} +2 -2
- data/examples/{transaction/transactions_by_date.rb → checkout/search/search_transactions_by_date.rb} +3 -3
- data/examples/{transaction/boleto_transaction_request.rb → direct/create_transaction_using_boleto.rb} +1 -1
- data/examples/{transaction/credit_card_transaction_request.rb → direct/create_transaction_using_credit_card.rb} +1 -1
- data/examples/{transaction/online_debit_transaction.rb → direct/create_transaction_using_online_debit.rb} +1 -1
- data/examples/{installment.rb → get_installments.rb} +3 -3
- data/examples/{transaction/transaction_cancellation.rb → request_transaction_cancellation.rb} +2 -2
- data/examples/{authorization/authorization.rb → split_payment/create_authorization.rb} +5 -4
- data/examples/split_payment/create_payment_request.rb +71 -0
- data/lib/pagseguro.rb +14 -8
- data/lib/pagseguro/account.rb +29 -0
- data/lib/pagseguro/authorization.rb +10 -4
- data/lib/pagseguro/authorization/collection.rb +3 -1
- data/lib/pagseguro/authorization/request_serializer.rb +6 -6
- data/lib/pagseguro/authorization/response.rb +2 -2
- data/lib/pagseguro/authorization_request.rb +16 -4
- data/lib/pagseguro/authorization_request/request_serializer.rb +127 -15
- data/lib/pagseguro/authorization_request/response.rb +2 -2
- data/lib/pagseguro/company.rb +41 -0
- data/lib/pagseguro/document.rb +4 -0
- data/lib/pagseguro/documents.rb +5 -0
- data/lib/pagseguro/errors.rb +27 -5
- data/lib/pagseguro/extensions/collection_object.rb +34 -0
- data/lib/pagseguro/item.rb +4 -0
- data/lib/pagseguro/items.rb +10 -17
- data/lib/pagseguro/partner.rb +20 -0
- data/lib/pagseguro/payment_request.rb +30 -2
- data/lib/pagseguro/payment_request/{serializer.rb → request_serializer.rb} +86 -1
- data/lib/pagseguro/person.rb +40 -0
- data/lib/pagseguro/phone.rb +8 -0
- data/lib/pagseguro/phones.rb +5 -0
- data/lib/pagseguro/receiver.rb +17 -0
- data/lib/pagseguro/receiver_split.rb +15 -0
- data/lib/pagseguro/request.rb +25 -1
- data/lib/pagseguro/transaction.rb +7 -5
- data/lib/pagseguro/transaction_cancellation.rb +3 -6
- data/lib/pagseguro/transaction_cancellation/response.rb +7 -6
- data/lib/pagseguro/{refund.rb → transaction_refund.rb} +2 -2
- data/lib/pagseguro/{refund → transaction_refund}/request_serializer.rb +1 -1
- data/lib/pagseguro/{refund → transaction_refund}/response.rb +9 -9
- data/lib/pagseguro/{refund → transaction_refund}/response_serializer.rb +1 -1
- data/lib/pagseguro/transaction_request.rb +1 -4
- data/lib/pagseguro/transaction_request/response.rb +8 -7
- data/lib/pagseguro/version.rb +1 -1
- data/locales/pt-BR.yml +1 -0
- data/pagseguro-oficial.gemspec +13 -13
- data/spec/fixtures/authorization/search_authorization.xml +47 -0
- data/spec/fixtures/authorization_request/authorization_request.xml +11 -0
- data/spec/fixtures/authorization_request/authorization_request_with_account.xml +47 -0
- data/spec/pagseguro/account_spec.rb +27 -0
- data/spec/pagseguro/authorization/collection_spec.rb +3 -3
- data/spec/pagseguro/authorization/request_serializer_spec.rb +1 -2
- data/spec/pagseguro/authorization/response_spec.rb +70 -15
- data/spec/pagseguro/authorization_request/request_serializer_spec.rb +314 -14
- data/spec/pagseguro/authorization_request_spec.rb +96 -31
- data/spec/pagseguro/authorization_spec.rb +52 -10
- data/spec/pagseguro/company_spec.rb +12 -0
- data/spec/pagseguro/documents_spec.rb +37 -0
- data/spec/pagseguro/errors_spec.rb +45 -6
- data/spec/pagseguro/extensions/collection_object_spec.rb +77 -0
- data/spec/pagseguro/features/create_transaction_request_spec.rb +2 -2
- data/spec/pagseguro/installment/response_spec.rb +5 -3
- data/spec/pagseguro/installment_spec.rb +5 -2
- data/spec/pagseguro/items_spec.rb +104 -12
- data/spec/pagseguro/pagseguro_spec.rb +8 -8
- data/spec/pagseguro/partner_spec.rb +8 -0
- data/spec/pagseguro/payment_request/request_serializer_spec.rb +251 -0
- data/spec/pagseguro/payment_request_spec.rb +67 -11
- data/spec/pagseguro/person_spec.rb +10 -0
- data/spec/pagseguro/phones_spec.rb +38 -0
- data/spec/pagseguro/receiver_spec.rb +6 -0
- data/spec/pagseguro/receiver_split_spec.rb +7 -0
- data/spec/pagseguro/request_spec.rb +27 -4
- data/spec/pagseguro/session/response_spec.rb +6 -2
- data/spec/pagseguro/session_spec.rb +5 -2
- data/spec/pagseguro/transaction/response_spec.rb +14 -8
- data/spec/pagseguro/transaction/search_spec.rb +15 -8
- data/spec/pagseguro/transaction_cancellation/response_spec.rb +6 -3
- data/spec/pagseguro/transaction_cancellation_spec.rb +7 -5
- data/spec/pagseguro/{refund → transaction_refund}/request_serializer_spec.rb +3 -3
- data/spec/pagseguro/{refund → transaction_refund}/response_serializer_spec.rb +1 -1
- data/spec/pagseguro/{refund → transaction_refund}/response_spec.rb +3 -3
- data/spec/pagseguro/{refund_spec.rb → transaction_refund_spec.rb} +15 -7
- data/spec/pagseguro/transaction_request/request_serializer_spec.rb +9 -9
- data/spec/pagseguro/transaction_request/response_spec.rb +5 -2
- data/spec/pagseguro/transaction_request_spec.rb +14 -9
- data/spec/pagseguro/transaction_spec.rb +37 -30
- data/spec/spec_helper.rb +0 -3
- data/spec/support/ensure_type_macro.rb +20 -2
- data/{examples/refund.rb → transaction/transaction_refund.rb} +1 -1
- metadata +112 -96
- data/examples/transaction/invalid_transaction_by_notification_code.rb +0 -22
- data/lib/pagseguro/refund/serializer.rb +0 -24
- data/lib/pagseguro/transaction_cancellation/serializer.rb +0 -18
- data/spec/pagseguro/payment_request/serializer_spec.rb +0 -166
- data/spec/pagseguro/refund/serializer_spec.rb +0 -15
- data/spec/pagseguro/transaction_cancellation/serializer_spec.rb +0 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fca1219acbd801903f2b2bb735bed9ce7803b064
|
4
|
+
data.tar.gz: 7b9daf1da4f391c5896fe9d53b20a18fd18786ea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a405d53942d7a402fce7510d23d1b0b37cddc78c4e5bb9e32cdbd3905a8af8e119c0160cf3fd02c9e933f7464c0200a3085da0b1555da81c50ca181997b8a35
|
7
|
+
data.tar.gz: 68a7d881ac81697f229c5d389dbc5d09446e416c9f3b9fa00555b640a1bddacba3dce5e000df4a1f809f787e05f6b1f35be20e87bd57c7caa1fc29f911473a42
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,20 @@
|
|
1
|
-
## Next release - 2.
|
1
|
+
## Next release - 2.5.0
|
2
|
+
|
3
|
+
- Atualizado a sintaxe do rspec
|
4
|
+
|
5
|
+
2.4.0
|
6
|
+
|
7
|
+
- Estorno de transações
|
8
|
+
- Cancelamento de transações
|
9
|
+
- Consulta de histórico de status de transações
|
10
|
+
|
11
|
+
2.3.0
|
12
|
+
|
13
|
+
- Modelo de aplicações (autenticação na api como vendedor ou como aplicação)
|
14
|
+
- Removendo utilização de threads para armazenar o objeto de configuração (a abordagem com threads não funciona no Rails 4, que é threadsafe)
|
15
|
+
- Adicionando deprecation warnings para configuration writers do módulo PagSeguro. Será removido no futuro. Utilizar o bloco de configuração.
|
16
|
+
|
17
|
+
2.2.0
|
2
18
|
|
3
19
|
- Estorno de transações
|
4
20
|
- Cancelamento de transações
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -26,7 +26,7 @@ A biblioteca PagSeguro em Ruby é um conjunto de classes de domínio que facilit
|
|
26
26
|
- Adicione a biblioteca ao seu Gemfile.
|
27
27
|
|
28
28
|
```ruby
|
29
|
-
gem "pagseguro-oficial", "~> 2.
|
29
|
+
gem "pagseguro-oficial", "~> 2.5.0"
|
30
30
|
```
|
31
31
|
|
32
32
|
- Execute o comando `bundle install`.
|
@@ -194,8 +194,8 @@ Este serviço envia os dados do comprador e do pagamento para realizar a cobran
|
|
194
194
|
|
195
195
|
A criação das transações podem ser feitas utilizando três métodos de pagamento:
|
196
196
|
|
197
|
-
[Boleto Bancário](https://github.com/pagseguro/ruby/blob/master/examples/boleto_transaction_request.rb)
|
197
|
+
[Boleto Bancário](https://github.com/pagseguro/ruby/blob/master/examples/transaction/boleto_transaction_request.rb)
|
198
198
|
|
199
|
-
[Cartão de Crédito](https://github.com/pagseguro/ruby/blob/master/examples/credit_card_transaction_request.rb)
|
199
|
+
[Cartão de Crédito](https://github.com/pagseguro/ruby/blob/master/examples/transaction/credit_card_transaction_request.rb)
|
200
200
|
|
201
|
-
[Transferência Eletrônica](https://github.com/pagseguro/ruby/blob/master/examples/online_debit_transaction.rb)
|
201
|
+
[Transferência Eletrônica](https://github.com/pagseguro/ruby/blob/master/examples/transaction/online_debit_transaction.rb)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require_relative "../boot"
|
2
|
+
|
3
|
+
# Create Authorization
|
4
|
+
#
|
5
|
+
# You need to give:
|
6
|
+
# - notification_url
|
7
|
+
# - redirect_url
|
8
|
+
# - permissions defaults to all permissions
|
9
|
+
# - application credentials (APP_ID, APP_KEY)
|
10
|
+
#
|
11
|
+
# You can pass these parameters to PagSeguro::AuthorizationRequest#new
|
12
|
+
#
|
13
|
+
# PS: For more details take a look at the class PagSeguro::AuthorizationRequest
|
14
|
+
|
15
|
+
credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
16
|
+
|
17
|
+
options = {
|
18
|
+
credentials: credentials, # Unnecessary if you set in application config
|
19
|
+
permissions: [:searches, :notifications],
|
20
|
+
notification_url: 'http://example.com/',
|
21
|
+
redirect_url: 'http://example.com/',
|
22
|
+
reference: 'REF4321' # optional
|
23
|
+
}
|
24
|
+
|
25
|
+
authorization_request = PagSeguro::AuthorizationRequest.new(options)
|
26
|
+
|
27
|
+
if authorization_request.create
|
28
|
+
print "Use this link to confirm authorizations: "
|
29
|
+
puts authorization_request.url
|
30
|
+
else
|
31
|
+
puts authorization_request.errors.join("\n")
|
32
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require_relative "../boot"
|
2
|
+
|
3
|
+
# Create Authorization with Account
|
4
|
+
#
|
5
|
+
# You need to give:
|
6
|
+
# - notification_url
|
7
|
+
# - redirect_url
|
8
|
+
# - permissions defaults to all permissions
|
9
|
+
# - application credentials (APP_ID, APP_KEY)
|
10
|
+
# - account params
|
11
|
+
#
|
12
|
+
# You can pass these parameters to PagSeguro::AuthorizationRequest#new
|
13
|
+
#
|
14
|
+
# PS: For more details take a look at the class PagSeguro::AuthorizationRequest
|
15
|
+
|
16
|
+
credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
17
|
+
|
18
|
+
options = {
|
19
|
+
credentials: credentials, # Unnecessary if you set in application config
|
20
|
+
permissions: [:checkouts, :searches, :notifications],
|
21
|
+
notification_url: 'http://seusite.com.br/redirect',
|
22
|
+
redirect_url: 'http://seusite.com.br/notification',
|
23
|
+
reference: '123',
|
24
|
+
account: {
|
25
|
+
email: 'usuario@seusite.com.br',
|
26
|
+
type: 'SELLER',
|
27
|
+
person: {
|
28
|
+
name: 'Antonio Carlos',
|
29
|
+
birth_date: Date.new(1982, 2, 5),
|
30
|
+
address: {
|
31
|
+
postal_code: '01452002',
|
32
|
+
street: 'Av. Brig. Faria Lima',
|
33
|
+
number: '1384',
|
34
|
+
complement: '5o andar',
|
35
|
+
district: 'Jardim Paulistano',
|
36
|
+
city: 'Sao Paulo',
|
37
|
+
state: 'SP',
|
38
|
+
country: 'BRA'
|
39
|
+
},
|
40
|
+
documents: [{type: 'CPF', value: '23606838450'}],
|
41
|
+
phones: [
|
42
|
+
{type: 'HOME', area_code: '11', number: '30302323'},
|
43
|
+
{type: 'MOBILE', area_code: '11', number: '976302323'},
|
44
|
+
]
|
45
|
+
}
|
46
|
+
}
|
47
|
+
}
|
48
|
+
|
49
|
+
authorization_request = PagSeguro::AuthorizationRequest.new(options)
|
50
|
+
|
51
|
+
if authorization_request.create
|
52
|
+
print "Use this link to confirm authorizations: "
|
53
|
+
puts authorization_request.url
|
54
|
+
else
|
55
|
+
puts authorization_request.errors.join("\n")
|
56
|
+
end
|
data/examples/authorization/{authorization_by_code.rb → search/search_authorization_by_code.rb}
RENAMED
@@ -1,14 +1,14 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
|
3
|
-
# Authorization by
|
3
|
+
# Search Authorization by Code
|
4
4
|
#
|
5
5
|
# You need to give:
|
6
6
|
# - authorization code
|
7
7
|
# - application credentials (APP_ID, APP_KEY) OR account credentials (EMAIL, TOKEN)
|
8
8
|
#
|
9
|
-
# You can pass
|
9
|
+
# You can pass these parameters to PagSeguro::Authorization#find_by_code
|
10
10
|
#
|
11
|
-
# PS: For more details look the class PagSeguro::Authorization#find_by_code
|
11
|
+
# PS: For more details take a look at the class PagSeguro::Authorization#find_by_code
|
12
12
|
|
13
13
|
# credentials = PagSeguro::AccountCredentials.new("EMAIL", "TOKEN")
|
14
14
|
credentials = PagSeguro::ApplicationCredentials.new("APP_ID", "APP_KEY")
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require_relative "../../boot"
|
2
|
+
|
3
|
+
# Search Authorization by Code
|
4
|
+
#
|
5
|
+
# You need to give:
|
6
|
+
# - authorization code
|
7
|
+
# - application credentials (APP_ID, APP_KEY) OR account credentials (EMAIL, TOKEN)
|
8
|
+
#
|
9
|
+
# You can pass these parameters to PagSeguro::Authorization#find_by
|
10
|
+
#
|
11
|
+
# PS: For more details take a look at the class PagSeguro::Authorization#find_by
|
12
|
+
|
13
|
+
# credentials = PagSeguro::AccountCredentials.new("EMAIL", "TOKEN")
|
14
|
+
credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
15
|
+
|
16
|
+
options = {
|
17
|
+
initial_date: Time.new(2015, 10, 1, 0, 0),
|
18
|
+
final_date: Time.now,
|
19
|
+
credentials: credentials
|
20
|
+
}
|
21
|
+
|
22
|
+
collection = PagSeguro::Authorization.find_by(options)
|
23
|
+
|
24
|
+
if collection.errors.any?
|
25
|
+
puts collection.errors.join("\n")
|
26
|
+
else
|
27
|
+
collection.each do |authorization|
|
28
|
+
puts "# #{authorization.code}"
|
29
|
+
authorization.permissions.each do |permission|
|
30
|
+
puts "Permission: "
|
31
|
+
puts permission.code
|
32
|
+
puts permission.status
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -1,15 +1,14 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
|
3
|
-
# Authorization by
|
3
|
+
# Seach Authorization by Notification Code
|
4
4
|
#
|
5
5
|
# You need to give:
|
6
6
|
# - authorization code
|
7
7
|
# - application credentials (APP_ID, APP_KEY)
|
8
8
|
#
|
9
|
-
# You can pass
|
9
|
+
# You can pass these parameters to PagSeguro::Authorization#find_by_notification_code
|
10
10
|
#
|
11
|
-
# PS: For more details look the class PagSeguro::Authorization#find_by_notification_code
|
12
|
-
|
11
|
+
# PS: For more details take a look at the class PagSeguro::Authorization#find_by_notification_code
|
13
12
|
|
14
13
|
credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
15
14
|
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require_relative "../../boot"
|
2
|
+
|
3
|
+
# Search Authorization by Reference
|
4
|
+
#
|
5
|
+
# You need to give:
|
6
|
+
# - reference
|
7
|
+
# - application credentials (APP_ID, APP_KEY)
|
8
|
+
#
|
9
|
+
# You can pass these parameters to PagSeguro::Authorization#find_by
|
10
|
+
|
11
|
+
credentials = PagSeguro::ApplicationCredentials.new("APP_ID", "APP_KEY")
|
12
|
+
|
13
|
+
options = {
|
14
|
+
reference: 'REF4321',
|
15
|
+
credentials: credentials
|
16
|
+
}
|
17
|
+
|
18
|
+
collection = PagSeguro::Authorization.find_by(options)
|
19
|
+
|
20
|
+
if collection.errors.any?
|
21
|
+
puts collection.errors.join("\n")
|
22
|
+
else
|
23
|
+
collection.each do |authorization|
|
24
|
+
puts "# #{authorization.code}"
|
25
|
+
authorization.permissions.each do |permission|
|
26
|
+
puts "Permission: "
|
27
|
+
puts permission.code
|
28
|
+
puts permission.status
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
-
require_relative "boot"
|
2
|
+
require_relative "../boot"
|
3
3
|
|
4
|
-
# Payment
|
4
|
+
# Create Payment Request
|
5
5
|
#
|
6
6
|
# You need to set your AccountCredentials (EMAIL, TOKEN) in the application config
|
7
7
|
#
|
@@ -12,10 +12,8 @@ payment.abandon_url = "http://dev.simplesideias.com.br/?abandoned"
|
|
12
12
|
payment.notification_url = "http://dev.simplesideias.com.br/?notification"
|
13
13
|
payment.redirect_url = "http://dev.simplesideias.com.br/?redirect"
|
14
14
|
|
15
|
-
#
|
16
|
-
|
17
|
-
# payment.credentials = PagSeguro::AccountCredentials.new('rafaelrpbelo@gmail.com', 'E280E0A9B6FA48A2AA9E4E73B5A6FC60')
|
18
|
-
|
15
|
+
# If you don't want to use payment request credentials you can use application config
|
16
|
+
payment.credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
19
17
|
|
20
18
|
payment.items << {
|
21
19
|
id: 1234,
|
@@ -53,7 +51,7 @@ payment.shipping = {
|
|
53
51
|
# payment.extra_params << { extraAmount: '-15.00' }
|
54
52
|
|
55
53
|
puts "=> REQUEST"
|
56
|
-
puts PagSeguro::PaymentRequest::
|
54
|
+
puts PagSeguro::PaymentRequest::RequestSerializer.new(payment).to_params
|
57
55
|
|
58
56
|
response = payment.register
|
59
57
|
|
@@ -1,14 +1,17 @@
|
|
1
1
|
require "active_support/all"
|
2
|
-
require_relative "
|
2
|
+
require_relative "../../boot"
|
3
3
|
|
4
|
-
# Abandoned Transactions
|
4
|
+
# Search Abandoned Transactions
|
5
5
|
#
|
6
6
|
# The acount credentials (EMAIL, TOKEN) are required
|
7
7
|
#
|
8
8
|
# You can pass the credentials parameters to PagSeguro::Transaction#find_abandoned
|
9
9
|
|
10
10
|
options = {
|
11
|
-
credentials: PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
11
|
+
credentials: PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN'),
|
12
|
+
starts_at: Time.new(2016, 2, 10, 14, 0),
|
13
|
+
ends_at: Time.new(2016, 2, 11, 14, 0),
|
14
|
+
per_page: 50
|
12
15
|
# You can pass more arguments by params, look (/lib/pagseguro/transaction.rb)
|
13
16
|
}
|
14
17
|
|
data/examples/{transaction/transaction_by_code.rb → checkout/search/search_transaction_by_code.rb}
RENAMED
@@ -1,12 +1,12 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
|
3
|
-
# Transaction by
|
3
|
+
# Search Transaction by Code
|
4
4
|
#
|
5
5
|
# You need to give:
|
6
6
|
# - transaction code
|
7
7
|
# - account credentials (EMAIL, TOKEN) OR application credentials (APP_ID, APP_KEY)
|
8
8
|
#
|
9
|
-
# You can pass
|
9
|
+
# You can pass these parameters to PagSeguro::Transaction#find_by_code
|
10
10
|
|
11
11
|
# credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
12
12
|
credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
@@ -1,12 +1,12 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
|
3
|
-
# Transaction by
|
3
|
+
# Search Transaction by Notification Code
|
4
4
|
#
|
5
5
|
# You need to give:
|
6
6
|
# - transaction notification code
|
7
7
|
# - account credentials (EMAIL, TOKEN) OR application credentials (APP_ID, APP_KEY)
|
8
8
|
#
|
9
|
-
# You can pass
|
9
|
+
# You can pass these parameters to PagSeguro::Transaction#find_by_code
|
10
10
|
|
11
11
|
# credentials = PagSeguro::ApplicationCredentials.new('APP_ID', 'APP_KEY')
|
12
12
|
credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
@@ -1,12 +1,12 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
|
3
|
-
# Transaction by
|
3
|
+
# Search Transaction by Reference
|
4
4
|
#
|
5
5
|
# You need to give:
|
6
6
|
# - reference code
|
7
7
|
# - account credentials (EMAIL, TOKEN)
|
8
8
|
#
|
9
|
-
# You can pass
|
9
|
+
# You can pass these parameters to PagSeguro::Transaction#find_by_reference
|
10
10
|
|
11
11
|
credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
12
12
|
|
data/examples/{transaction/transactions_by_date.rb → checkout/search/search_transactions_by_date.rb}
RENAMED
@@ -1,13 +1,13 @@
|
|
1
|
-
require_relative "
|
1
|
+
require_relative "../../boot"
|
2
2
|
require "active_support/all"
|
3
3
|
|
4
|
-
# Transactions by
|
4
|
+
# Search Transactions by Date
|
5
5
|
#
|
6
6
|
# You need to give:
|
7
7
|
# - reference code
|
8
8
|
# - account credentials (EMAIL, TOKEN)
|
9
9
|
#
|
10
|
-
# You can pass
|
10
|
+
# You can pass these parameters to PagSeguro::Transaction#find_by_date
|
11
11
|
|
12
12
|
credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
13
13
|
|
@@ -1,15 +1,15 @@
|
|
1
1
|
require_relative "boot"
|
2
2
|
|
3
|
-
#
|
3
|
+
# Get Installments
|
4
4
|
#
|
5
5
|
# Required AccountCredentials
|
6
6
|
#
|
7
7
|
# You need to give:
|
8
8
|
# - amount
|
9
|
-
# -
|
9
|
+
# - card_brand
|
10
10
|
# - account credentials (EMAIL, TOKEN)
|
11
11
|
#
|
12
|
-
# You can pass
|
12
|
+
# You can pass these parameters to PagSeguro::Installment#find
|
13
13
|
|
14
14
|
credentials = PagSeguro::AccountCredentials.new('EMAIL', 'TOKEN')
|
15
15
|
|