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.
Files changed (114) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -1
  3. data/CHANGELOG.md +17 -1
  4. data/Gemfile +0 -2
  5. data/README.md +1 -1
  6. data/docs/transparent_checkout.md +3 -3
  7. data/examples/authorization/create_authorization.rb +32 -0
  8. data/examples/authorization/create_authorization_with_account.rb +56 -0
  9. data/examples/authorization/{authorization_by_code.rb → search/search_authorization_by_code.rb} +4 -4
  10. data/examples/authorization/search/search_authorization_by_date.rb +35 -0
  11. data/examples/authorization/{authorization_by_notification_code.rb → search/search_authorization_by_notification_code.rb} +4 -5
  12. data/examples/authorization/search/search_authorization_by_reference.rb +31 -0
  13. data/examples/{payment_request.rb → checkout/create_payment_request.rb} +5 -7
  14. data/examples/{transaction/abandoned_transactions.rb → checkout/search/search_abandoned_transactions.rb} +6 -3
  15. data/examples/{transaction/transaction_by_code.rb → checkout/search/search_transaction_by_code.rb} +3 -3
  16. data/examples/{transaction/transaction_by_notification_code.rb → checkout/search/search_transaction_by_notification_code.rb} +3 -3
  17. data/examples/{transaction/transaction_by_reference.rb → checkout/search/search_transaction_by_reference.rb} +3 -3
  18. data/examples/{transaction/transaction_status_history.rb → checkout/search/search_transaction_status_history.rb} +2 -2
  19. data/examples/{transaction/transactions_by_date.rb → checkout/search/search_transactions_by_date.rb} +3 -3
  20. data/examples/{transaction/boleto_transaction_request.rb → direct/create_transaction_using_boleto.rb} +1 -1
  21. data/examples/{transaction/credit_card_transaction_request.rb → direct/create_transaction_using_credit_card.rb} +1 -1
  22. data/examples/{transaction/online_debit_transaction.rb → direct/create_transaction_using_online_debit.rb} +1 -1
  23. data/examples/{installment.rb → get_installments.rb} +3 -3
  24. data/examples/{transaction/transaction_cancellation.rb → request_transaction_cancellation.rb} +2 -2
  25. data/examples/{authorization/authorization.rb → split_payment/create_authorization.rb} +5 -4
  26. data/examples/split_payment/create_payment_request.rb +71 -0
  27. data/lib/pagseguro.rb +14 -8
  28. data/lib/pagseguro/account.rb +29 -0
  29. data/lib/pagseguro/authorization.rb +10 -4
  30. data/lib/pagseguro/authorization/collection.rb +3 -1
  31. data/lib/pagseguro/authorization/request_serializer.rb +6 -6
  32. data/lib/pagseguro/authorization/response.rb +2 -2
  33. data/lib/pagseguro/authorization_request.rb +16 -4
  34. data/lib/pagseguro/authorization_request/request_serializer.rb +127 -15
  35. data/lib/pagseguro/authorization_request/response.rb +2 -2
  36. data/lib/pagseguro/company.rb +41 -0
  37. data/lib/pagseguro/document.rb +4 -0
  38. data/lib/pagseguro/documents.rb +5 -0
  39. data/lib/pagseguro/errors.rb +27 -5
  40. data/lib/pagseguro/extensions/collection_object.rb +34 -0
  41. data/lib/pagseguro/item.rb +4 -0
  42. data/lib/pagseguro/items.rb +10 -17
  43. data/lib/pagseguro/partner.rb +20 -0
  44. data/lib/pagseguro/payment_request.rb +30 -2
  45. data/lib/pagseguro/payment_request/{serializer.rb → request_serializer.rb} +86 -1
  46. data/lib/pagseguro/person.rb +40 -0
  47. data/lib/pagseguro/phone.rb +8 -0
  48. data/lib/pagseguro/phones.rb +5 -0
  49. data/lib/pagseguro/receiver.rb +17 -0
  50. data/lib/pagseguro/receiver_split.rb +15 -0
  51. data/lib/pagseguro/request.rb +25 -1
  52. data/lib/pagseguro/transaction.rb +7 -5
  53. data/lib/pagseguro/transaction_cancellation.rb +3 -6
  54. data/lib/pagseguro/transaction_cancellation/response.rb +7 -6
  55. data/lib/pagseguro/{refund.rb → transaction_refund.rb} +2 -2
  56. data/lib/pagseguro/{refund → transaction_refund}/request_serializer.rb +1 -1
  57. data/lib/pagseguro/{refund → transaction_refund}/response.rb +9 -9
  58. data/lib/pagseguro/{refund → transaction_refund}/response_serializer.rb +1 -1
  59. data/lib/pagseguro/transaction_request.rb +1 -4
  60. data/lib/pagseguro/transaction_request/response.rb +8 -7
  61. data/lib/pagseguro/version.rb +1 -1
  62. data/locales/pt-BR.yml +1 -0
  63. data/pagseguro-oficial.gemspec +13 -13
  64. data/spec/fixtures/authorization/search_authorization.xml +47 -0
  65. data/spec/fixtures/authorization_request/authorization_request.xml +11 -0
  66. data/spec/fixtures/authorization_request/authorization_request_with_account.xml +47 -0
  67. data/spec/pagseguro/account_spec.rb +27 -0
  68. data/spec/pagseguro/authorization/collection_spec.rb +3 -3
  69. data/spec/pagseguro/authorization/request_serializer_spec.rb +1 -2
  70. data/spec/pagseguro/authorization/response_spec.rb +70 -15
  71. data/spec/pagseguro/authorization_request/request_serializer_spec.rb +314 -14
  72. data/spec/pagseguro/authorization_request_spec.rb +96 -31
  73. data/spec/pagseguro/authorization_spec.rb +52 -10
  74. data/spec/pagseguro/company_spec.rb +12 -0
  75. data/spec/pagseguro/documents_spec.rb +37 -0
  76. data/spec/pagseguro/errors_spec.rb +45 -6
  77. data/spec/pagseguro/extensions/collection_object_spec.rb +77 -0
  78. data/spec/pagseguro/features/create_transaction_request_spec.rb +2 -2
  79. data/spec/pagseguro/installment/response_spec.rb +5 -3
  80. data/spec/pagseguro/installment_spec.rb +5 -2
  81. data/spec/pagseguro/items_spec.rb +104 -12
  82. data/spec/pagseguro/pagseguro_spec.rb +8 -8
  83. data/spec/pagseguro/partner_spec.rb +8 -0
  84. data/spec/pagseguro/payment_request/request_serializer_spec.rb +251 -0
  85. data/spec/pagseguro/payment_request_spec.rb +67 -11
  86. data/spec/pagseguro/person_spec.rb +10 -0
  87. data/spec/pagseguro/phones_spec.rb +38 -0
  88. data/spec/pagseguro/receiver_spec.rb +6 -0
  89. data/spec/pagseguro/receiver_split_spec.rb +7 -0
  90. data/spec/pagseguro/request_spec.rb +27 -4
  91. data/spec/pagseguro/session/response_spec.rb +6 -2
  92. data/spec/pagseguro/session_spec.rb +5 -2
  93. data/spec/pagseguro/transaction/response_spec.rb +14 -8
  94. data/spec/pagseguro/transaction/search_spec.rb +15 -8
  95. data/spec/pagseguro/transaction_cancellation/response_spec.rb +6 -3
  96. data/spec/pagseguro/transaction_cancellation_spec.rb +7 -5
  97. data/spec/pagseguro/{refund → transaction_refund}/request_serializer_spec.rb +3 -3
  98. data/spec/pagseguro/{refund → transaction_refund}/response_serializer_spec.rb +1 -1
  99. data/spec/pagseguro/{refund → transaction_refund}/response_spec.rb +3 -3
  100. data/spec/pagseguro/{refund_spec.rb → transaction_refund_spec.rb} +15 -7
  101. data/spec/pagseguro/transaction_request/request_serializer_spec.rb +9 -9
  102. data/spec/pagseguro/transaction_request/response_spec.rb +5 -2
  103. data/spec/pagseguro/transaction_request_spec.rb +14 -9
  104. data/spec/pagseguro/transaction_spec.rb +37 -30
  105. data/spec/spec_helper.rb +0 -3
  106. data/spec/support/ensure_type_macro.rb +20 -2
  107. data/{examples/refund.rb → transaction/transaction_refund.rb} +1 -1
  108. metadata +112 -96
  109. data/examples/transaction/invalid_transaction_by_notification_code.rb +0 -22
  110. data/lib/pagseguro/refund/serializer.rb +0 -24
  111. data/lib/pagseguro/transaction_cancellation/serializer.rb +0 -18
  112. data/spec/pagseguro/payment_request/serializer_spec.rb +0 -166
  113. data/spec/pagseguro/refund/serializer_spec.rb +0 -15
  114. data/spec/pagseguro/transaction_cancellation/serializer_spec.rb +0 -13
@@ -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,5 @@
1
+ module PagSeguro
2
+ class Phones
3
+ include Extensions::CollectionObject
4
+ end
5
+ 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
@@ -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 { |key, value| value.nil? }
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
- response = Response.new(request, collection)
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 - 86400,
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 - 86400,
133
- ends_at: Time.now - 900,
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
- # Return boolean.
13
+ # Returns PagSeguro::TransactionCancellation.
14
14
  def register
15
- request = Request.post("transactions/cancels", api_version, params)
16
- response = Response.new(request, self)
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, cancellation)
4
+ def initialize(response, object)
5
5
  @response = response
6
- @cancellation = cancellation
6
+ @object = object
7
7
  end
8
8
 
9
9
  def serialize
10
10
  if success?
11
11
  xml = Nokogiri::XML(response.body)
12
- cancellation.update_attributes(ResponseSerializer.new(xml).serialize)
12
+ serializer = ResponseSerializer.new(xml).serialize
13
+ object.update_attributes(serializer)
13
14
  else
14
- cancellation.errors.add(response)
15
+ object.errors.add(response)
15
16
  end
16
17
 
17
- cancellation
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 :cancellation
30
+ attr_reader :object
30
31
  end
31
32
  end
32
33
  end
@@ -1,5 +1,5 @@
1
1
  module PagSeguro
2
- class Refund
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::Refund.
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,5 +1,5 @@
1
1
  module PagSeguro
2
- class Refund
2
+ class TransactionRefund
3
3
  class RequestSerializer
4
4
  # The refund that will be serialized.
5
5
  attr_reader :refund
@@ -1,21 +1,21 @@
1
1
  module PagSeguro
2
- class Refund
2
+ class TransactionRefund
3
3
  class Response
4
- def initialize(response, refund)
4
+ def initialize(response, object)
5
5
  @response = response
6
- @refund = refund
6
+ @object = object
7
7
  end
8
8
 
9
9
  def serialize
10
10
  if success?
11
11
  xml = Nokogiri::XML(response.body)
12
- serialize = ResponseSerializer.new(xml).serialize
13
- refund.update_attributes(serialize)
12
+ serializer = ResponseSerializer.new(xml).serialize
13
+ object.update_attributes(serializer)
14
14
  else
15
- refund.errors.add(response)
15
+ object.errors.add(response)
16
16
  end
17
17
 
18
- refund
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 refund object to return
30
- attr_reader :refund
29
+ # The PagSeguro::Refund object to return
30
+ attr_reader :object
31
31
  end
32
32
  end
33
33
  end
@@ -1,5 +1,5 @@
1
1
  module PagSeguro
2
- class Refund
2
+ class TransactionRefund
3
3
  class ResponseSerializer
4
4
  attr_reader :xml
5
5
 
@@ -100,10 +100,7 @@ module PagSeguro
100
100
  # Return boolean.
101
101
  def create
102
102
  request = Request.post("transactions", api_version, params)
103
- response = Response.new(request, self)
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, transaction_request)
4
+ def initialize(response, object)
5
5
  @response = response
6
- @transaction_request = transaction_request
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
- transaction_request.update_attributes(ResponseSerializer.new(xml).serialize)
12
+ serializer = ResponseSerializer.new(xml).serialize
13
+ object.update_attributes(serializer)
13
14
  else
14
- transaction_request.errors.add(response)
15
+ object.errors.add(response)
15
16
  end
16
17
 
17
- transaction_request
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 :transaction_request
29
+ # The PagSeguro::TransactionRequest instance.
30
+ attr_reader :object
30
31
  end
31
32
  end
32
33
  end
@@ -1,3 +1,3 @@
1
1
  module PagSeguro
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
  end
data/locales/pt-BR.yml CHANGED
@@ -2,6 +2,7 @@ pt-BR:
2
2
  pagseguro:
3
3
  errors:
4
4
  unauthorized: "Não autorizado."
5
+ forbidden: "Proibido."
5
6
  not_found: "Não encontrado."
6
7
  "10001": "O parâmetro email deve ser informado."
7
8
  "10002": "O parâmetro token deve ser informado."
@@ -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.description = "Biblioteca oficial de integração PagSeguro em Ruby"
11
- spec.summary = spec.description
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.add_dependency "aitch", ">= 0.2.1"
21
- spec.add_dependency "nokogiri"
22
- spec.add_dependency "i18n"
23
- spec.add_dependency "json"
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 "autotest-standalone"
29
- spec.add_development_dependency "simplecov"
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>