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
data/lib/pagseguro/phone.rb
CHANGED
@@ -2,11 +2,19 @@ module PagSeguro
|
|
2
2
|
class Phone
|
3
3
|
include Extensions::MassAssignment
|
4
4
|
|
5
|
+
# Set the type phone
|
6
|
+
# Must be HOME, MOBILE or BUSINESS
|
7
|
+
attr_accessor :type
|
8
|
+
|
5
9
|
# Set the area code.
|
6
10
|
attr_accessor :area_code
|
7
11
|
|
8
12
|
# Set the phone number.
|
9
13
|
# Must have 7-9 numbers.
|
10
14
|
attr_accessor :number
|
15
|
+
|
16
|
+
def ==(other)
|
17
|
+
[type, area_code, number] == [other.type, other.area_code, other.number]
|
18
|
+
end
|
11
19
|
end
|
12
20
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module PagSeguro
|
2
|
+
class Receiver
|
3
|
+
include Extensions::MassAssignment
|
4
|
+
include Extensions::EnsureType
|
5
|
+
|
6
|
+
# Set receiver's email.
|
7
|
+
attr_accessor :email
|
8
|
+
|
9
|
+
# Get receiver split.
|
10
|
+
attr_reader :split
|
11
|
+
|
12
|
+
# Set receiver split.
|
13
|
+
def split=(split)
|
14
|
+
@split = ensure_type(ReceiverSplit, split)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module PagSeguro
|
2
|
+
class ReceiverSplit
|
3
|
+
include Extensions::MassAssignment
|
4
|
+
include Extensions::EnsureType
|
5
|
+
|
6
|
+
# Set amount.
|
7
|
+
attr_accessor :amount
|
8
|
+
|
9
|
+
# Set rate percent.
|
10
|
+
attr_accessor :rate_percent
|
11
|
+
|
12
|
+
# Set fee percent.
|
13
|
+
attr_accessor :fee_percent
|
14
|
+
end
|
15
|
+
end
|
data/lib/pagseguro/request.rb
CHANGED
@@ -29,6 +29,23 @@ module PagSeguro
|
|
29
29
|
execute :post, path, api_version, data, headers
|
30
30
|
end
|
31
31
|
|
32
|
+
# Perform a POST request, sending XML data.
|
33
|
+
#
|
34
|
+
# # +path+: the path that will be requested. Must be something like <tt>"checkout"</tt>.
|
35
|
+
# # +api_version+: the current PagSeguro API version of the requested service
|
36
|
+
# # +credentials+: the credentials like ApplicationCredentials or AccountCredentials.
|
37
|
+
# # +data+: the data that will be sent as body data. Must be a XML.
|
38
|
+
#
|
39
|
+
def post_xml(path, api_version, credentials, data)
|
40
|
+
credentials_params = credentials_to_params(credentials)
|
41
|
+
|
42
|
+
request.post do
|
43
|
+
url PagSeguro.api_url("#{api_version}/#{path}?#{credentials_params}")
|
44
|
+
headers "Content-Type" => "application/xml; charset=#{PagSeguro.encoding}"
|
45
|
+
body data
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
32
49
|
# Perform the specified HTTP request. It will include the API credentials,
|
33
50
|
# api_version, encoding and additional headers.
|
34
51
|
def execute(request_method, path, api_version, data, headers) # :nodoc:
|
@@ -52,7 +69,7 @@ module PagSeguro
|
|
52
69
|
data.merge!(global_credentials(data))
|
53
70
|
end
|
54
71
|
data.merge!({ charset: PagSeguro.encoding })
|
55
|
-
data.delete_if { |
|
72
|
+
data.delete_if { |_, value| value.nil? }
|
56
73
|
end
|
57
74
|
|
58
75
|
def extended_headers(request_method, headers)
|
@@ -72,6 +89,13 @@ module PagSeguro
|
|
72
89
|
}
|
73
90
|
end
|
74
91
|
|
92
|
+
def credentials_to_params(credentials)
|
93
|
+
credentials_object(credentials: credentials)
|
94
|
+
.delete_if { |_, value| value.nil? }
|
95
|
+
.map { |key, value| "#{key}=#{value}" }
|
96
|
+
.join('&')
|
97
|
+
end
|
98
|
+
|
75
99
|
def credentials_object(data)
|
76
100
|
credentials = data.delete(:credentials)
|
77
101
|
if credentials.respond_to? :app_id
|
@@ -1,5 +1,8 @@
|
|
1
1
|
module PagSeguro
|
2
2
|
class Transaction
|
3
|
+
ONE_DAY_IN_SECONDS = 86400
|
4
|
+
FIFTEEN_MINUTES_IN_SECONDS = 900
|
5
|
+
|
3
6
|
include Extensions::MassAssignment
|
4
7
|
include Extensions::EnsureType
|
5
8
|
include Extensions::Credentiable
|
@@ -81,8 +84,7 @@ module PagSeguro
|
|
81
84
|
def self.find_status_history(code)
|
82
85
|
request = send_request("transactions/#{code}/statusHistory")
|
83
86
|
collection = StatusCollection.new
|
84
|
-
|
85
|
-
response.serialize_statuses
|
87
|
+
Response.new(request, collection).serialize_statuses
|
86
88
|
|
87
89
|
collection
|
88
90
|
end
|
@@ -99,7 +101,7 @@ module PagSeguro
|
|
99
101
|
#
|
100
102
|
def self.find_by_date(options = {}, page = 0)
|
101
103
|
options = {
|
102
|
-
starts_at: Time.now -
|
104
|
+
starts_at: Time.now - ONE_DAY_IN_SECONDS,
|
103
105
|
ends_at: Time.now,
|
104
106
|
per_page: 50
|
105
107
|
}.merge(options)
|
@@ -129,8 +131,8 @@ module PagSeguro
|
|
129
131
|
#
|
130
132
|
def self.find_abandoned(options = {}, page = 0)
|
131
133
|
options = {
|
132
|
-
starts_at: Time.now -
|
133
|
-
ends_at: Time.now -
|
134
|
+
starts_at: Time.now - ONE_DAY_IN_SECONDS,
|
135
|
+
ends_at: Time.now - FIFTEEN_MINUTES_IN_SECONDS,
|
134
136
|
per_page: 50
|
135
137
|
}.merge(options)
|
136
138
|
|
@@ -10,13 +10,10 @@ module PagSeguro
|
|
10
10
|
attr_accessor :result
|
11
11
|
|
12
12
|
# Calls the PagSeguro webservice and register the cancellation.
|
13
|
-
#
|
13
|
+
# Returns PagSeguro::TransactionCancellation.
|
14
14
|
def register
|
15
|
-
|
16
|
-
|
17
|
-
response.serialize
|
18
|
-
|
19
|
-
response.success?
|
15
|
+
response_request = Request.post("transactions/cancels", api_version, params)
|
16
|
+
Response.new(response_request, self).serialize
|
20
17
|
end
|
21
18
|
|
22
19
|
# Errors object.
|
@@ -1,20 +1,21 @@
|
|
1
1
|
module PagSeguro
|
2
2
|
class TransactionCancellation
|
3
3
|
class Response
|
4
|
-
def initialize(response,
|
4
|
+
def initialize(response, object)
|
5
5
|
@response = response
|
6
|
-
@
|
6
|
+
@object = object
|
7
7
|
end
|
8
8
|
|
9
9
|
def serialize
|
10
10
|
if success?
|
11
11
|
xml = Nokogiri::XML(response.body)
|
12
|
-
|
12
|
+
serializer = ResponseSerializer.new(xml).serialize
|
13
|
+
object.update_attributes(serializer)
|
13
14
|
else
|
14
|
-
|
15
|
+
object.errors.add(response)
|
15
16
|
end
|
16
17
|
|
17
|
-
|
18
|
+
object
|
18
19
|
end
|
19
20
|
|
20
21
|
def success?
|
@@ -26,7 +27,7 @@ module PagSeguro
|
|
26
27
|
attr_reader :response
|
27
28
|
|
28
29
|
# The PagSeguro::TransactionCancellation instance.
|
29
|
-
attr_reader :
|
30
|
+
attr_reader :object
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module PagSeguro
|
2
|
-
class
|
2
|
+
class TransactionRefund
|
3
3
|
include Extensions::MassAssignment
|
4
4
|
|
5
5
|
# Set the transaction code.
|
@@ -18,7 +18,7 @@ module PagSeguro
|
|
18
18
|
attr_reader :errors
|
19
19
|
|
20
20
|
# Calls the PagSeguro webservice and register the refund.
|
21
|
-
# Return PagSeguro::
|
21
|
+
# Return PagSeguro::TransactionRefund.
|
22
22
|
def register
|
23
23
|
response_request = Request.post("transactions/refunds", api_version, params)
|
24
24
|
Response.new(response_request, self).serialize
|
@@ -1,21 +1,21 @@
|
|
1
1
|
module PagSeguro
|
2
|
-
class
|
2
|
+
class TransactionRefund
|
3
3
|
class Response
|
4
|
-
def initialize(response,
|
4
|
+
def initialize(response, object)
|
5
5
|
@response = response
|
6
|
-
@
|
6
|
+
@object = object
|
7
7
|
end
|
8
8
|
|
9
9
|
def serialize
|
10
10
|
if success?
|
11
11
|
xml = Nokogiri::XML(response.body)
|
12
|
-
|
13
|
-
|
12
|
+
serializer = ResponseSerializer.new(xml).serialize
|
13
|
+
object.update_attributes(serializer)
|
14
14
|
else
|
15
|
-
|
15
|
+
object.errors.add(response)
|
16
16
|
end
|
17
17
|
|
18
|
-
|
18
|
+
object
|
19
19
|
end
|
20
20
|
|
21
21
|
def success?
|
@@ -26,8 +26,8 @@ module PagSeguro
|
|
26
26
|
# The request response.
|
27
27
|
attr_reader :response
|
28
28
|
|
29
|
-
# The
|
30
|
-
attr_reader :
|
29
|
+
# The PagSeguro::Refund object to return
|
30
|
+
attr_reader :object
|
31
31
|
end
|
32
32
|
end
|
33
33
|
end
|
@@ -100,10 +100,7 @@ module PagSeguro
|
|
100
100
|
# Return boolean.
|
101
101
|
def create
|
102
102
|
request = Request.post("transactions", api_version, params)
|
103
|
-
|
104
|
-
response.serialize
|
105
|
-
|
106
|
-
response.success?
|
103
|
+
Response.new(request, self).serialize
|
107
104
|
end
|
108
105
|
|
109
106
|
def update_attributes(attrs)
|
@@ -1,20 +1,21 @@
|
|
1
1
|
module PagSeguro
|
2
2
|
class TransactionRequest
|
3
3
|
class Response
|
4
|
-
def initialize(response,
|
4
|
+
def initialize(response, object)
|
5
5
|
@response = response
|
6
|
-
@
|
6
|
+
@object = object
|
7
7
|
end
|
8
8
|
|
9
9
|
def serialize
|
10
10
|
if success?
|
11
11
|
xml = Nokogiri::XML(response.body).css("transaction").first
|
12
|
-
|
12
|
+
serializer = ResponseSerializer.new(xml).serialize
|
13
|
+
object.update_attributes(serializer)
|
13
14
|
else
|
14
|
-
|
15
|
+
object.errors.add(response)
|
15
16
|
end
|
16
17
|
|
17
|
-
|
18
|
+
object
|
18
19
|
end
|
19
20
|
|
20
21
|
def success?
|
@@ -25,8 +26,8 @@ module PagSeguro
|
|
25
26
|
# The request response.
|
26
27
|
attr_reader :response
|
27
28
|
|
28
|
-
# The TransactionRequest instance.
|
29
|
-
attr_reader :
|
29
|
+
# The PagSeguro::TransactionRequest instance.
|
30
|
+
attr_reader :object
|
30
31
|
end
|
31
32
|
end
|
32
33
|
end
|
data/lib/pagseguro/version.rb
CHANGED
data/locales/pt-BR.yml
CHANGED
data/pagseguro-oficial.gemspec
CHANGED
@@ -2,13 +2,12 @@
|
|
2
2
|
require "./lib/pagseguro/version"
|
3
3
|
|
4
4
|
Gem::Specification.new do |spec|
|
5
|
-
spec.required_ruby_version = ">= 1.9.3"
|
6
5
|
spec.name = "pagseguro-oficial"
|
7
6
|
spec.version = PagSeguro::VERSION
|
8
7
|
spec.authors = ["Nando Vieira"]
|
9
8
|
spec.email = ["fnando.vieira@gmail.com"]
|
10
|
-
spec.
|
11
|
-
spec.
|
9
|
+
spec.summary = "Biblioteca de integração com o PagSeguro"
|
10
|
+
spec.description = "Biblioteca oficial de integração via API com o PagSeguro"
|
12
11
|
spec.homepage = "http://www.pagseguro.com.br"
|
13
12
|
spec.license = "ASL"
|
14
13
|
|
@@ -17,15 +16,16 @@ Gem::Specification.new do |spec|
|
|
17
16
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
17
|
spec.require_paths = ["lib"]
|
19
18
|
|
20
|
-
spec.
|
21
|
-
|
22
|
-
spec.
|
23
|
-
spec.
|
19
|
+
spec.required_ruby_version = ">= 1.9.3"
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "aitch", "~> 0.2"
|
22
|
+
spec.add_runtime_dependency "nokogiri", "~> 1.6"
|
23
|
+
spec.add_runtime_dependency "i18n", "~> 0.7"
|
24
|
+
spec.add_runtime_dependency "json", "~> 1.8"
|
24
25
|
|
25
|
-
spec.add_development_dependency "bundler"
|
26
|
-
spec.add_development_dependency "rake"
|
27
|
-
spec.add_development_dependency "rspec"
|
28
|
-
spec.add_development_dependency "
|
29
|
-
spec.add_development_dependency "
|
30
|
-
spec.add_development_dependency "fakeweb"
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
+
spec.add_development_dependency "fakeweb", "~> 1.3"
|
30
|
+
spec.add_development_dependency "activesupport", "~> 4.0"
|
31
31
|
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
<?xml version="1.0" encoding="ISO-8859-1" standalone="yes"?>
|
2
|
+
<authorizationSearchResult>
|
3
|
+
<date>2015-12-03T15:58:33.000-02:00</date>
|
4
|
+
<authorizations>
|
5
|
+
<authorization>
|
6
|
+
<code>aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa</code>
|
7
|
+
<creationDate>2015-10-28T17:23:05.000-02:00</creationDate>
|
8
|
+
<account>
|
9
|
+
<publicKey>PUB11111111111111111111111111111111</publicKey>
|
10
|
+
</account>
|
11
|
+
<permissions>
|
12
|
+
<permission>
|
13
|
+
<code>SEARCH_TRANSACTIONS</code>
|
14
|
+
<status>APPROVED</status>
|
15
|
+
<lastUpdate>2015-10-28T17:23:08.000-02:00</lastUpdate>
|
16
|
+
</permission>
|
17
|
+
<permission>
|
18
|
+
<code>RECEIVE_TRANSACTION_NOTIFICATIONS</code>
|
19
|
+
<status>APPROVED</status>
|
20
|
+
<lastUpdate>2015-10-28T17:23:08.000-02:00</lastUpdate>
|
21
|
+
</permission>
|
22
|
+
</permissions>
|
23
|
+
</authorization>
|
24
|
+
<authorization>
|
25
|
+
<code>bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb</code>
|
26
|
+
<creationDate>2015-10-27T17:54:01.000-02:00</creationDate>
|
27
|
+
<account>
|
28
|
+
<publicKey>PUBC2222222222222222222222222222222</publicKey>
|
29
|
+
</account>
|
30
|
+
<permissions>
|
31
|
+
<permission>
|
32
|
+
<code>SEARCH_TRANSACTIONS</code>
|
33
|
+
<status>APPROVED</status>
|
34
|
+
<lastUpdate>2015-10-27T17:54:04.000-02:00</lastUpdate>
|
35
|
+
</permission>
|
36
|
+
<permission>
|
37
|
+
<code>RECEIVE_TRANSACTION_NOTIFICATIONS</code>
|
38
|
+
<status>APPROVED</status>
|
39
|
+
<lastUpdate>2015-10-27T17:54:04.000-02:00</lastUpdate>
|
40
|
+
</permission>
|
41
|
+
</permissions>
|
42
|
+
</authorization>
|
43
|
+
</authorizations>
|
44
|
+
<resultsInThisPage>2</resultsInThisPage>
|
45
|
+
<currentPage>1</currentPage>
|
46
|
+
<totalPages>1</totalPages>
|
47
|
+
</authorizationSearchResult>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<authorizationRequest>
|
3
|
+
<reference>123</reference>
|
4
|
+
<redirectURL>http://seusite.com.br/redirect</redirectURL>
|
5
|
+
<notificationURL>http://seusite.com.br/notification</notificationURL>
|
6
|
+
<permissions>
|
7
|
+
<code>CREATE_CHECKOUTS</code>
|
8
|
+
<code>SEARCH_TRANSACTIONS</code>
|
9
|
+
<code>RECEIVE_TRANSACTION_NOTIFICATIONS</code>
|
10
|
+
</permissions>
|
11
|
+
</authorizationRequest>
|