braintree 2.61.1 → 2.62.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,6 +107,7 @@ module Braintree
107
107
  UseBillingForShippingDisabled = "91572"
108
108
  VerificationAmountCannotBeNegative = "91739"
109
109
  VerificationAmountFormatIsInvalid = "91740"
110
+ VerificationAmountIsTooLarge = "91752"
110
111
  VerificationAmountNotSupportedByProcessor = "91741"
111
112
  VerificationMerchantAccountIdIsInvalid = "91728"
112
113
  VerificationMerchantAccountIsForbidden = "91743"
@@ -553,6 +554,7 @@ module Braintree
553
554
  module Options
554
555
  AmountCannotBeNegative = "94201"
555
556
  AmountFormatIsInvalid = "94202"
557
+ AmountIsTooLarge = "94207"
556
558
  AmountNotSupportedByProcessor = "94203"
557
559
  MerchantAccountIdIsInvalid = "94204"
558
560
  MerchantAccountIsSuspended = "94205"
@@ -31,6 +31,17 @@ module Braintree
31
31
  end
32
32
  end
33
33
 
34
+ def revoke_access_token(access_token)
35
+ response = @config.http.post("/oauth/revoke_access_token", {
36
+ :token => access_token
37
+ })
38
+ if response[:result][:success] == true
39
+ Braintree::SuccessfulResult.new
40
+ else
41
+ ErrorResult.new(@gateway, "could not revoke access token")
42
+ end
43
+ end
44
+
34
45
  def connect_url(params)
35
46
  params[:client_id] = @config.client_id
36
47
  user_params = _sub_query(params, :user)
@@ -1,8 +1,8 @@
1
1
  module Braintree
2
2
  module Version
3
3
  Major = 2
4
- Minor = 61
5
- Tiny = 1
4
+ Minor = 62
5
+ Tiny = 0
6
6
 
7
7
  String = "#{Major}.#{Minor}.#{Tiny}"
8
8
  end
@@ -1 +1 @@
1
- 10203
1
+ 2502
@@ -80,6 +80,31 @@ describe "OAuth" do
80
80
  end
81
81
  end
82
82
 
83
+ describe "revoke_access_token" do
84
+ it "revokes an access token" do
85
+ code = Braintree::OAuthTestHelper.create_grant(@gateway, {
86
+ :merchant_public_id => "integration_merchant_id",
87
+ :scope => "read_write"
88
+ })
89
+ access_token = @gateway.oauth.create_token_from_code(
90
+ :code => code,
91
+ :scope => "read_write"
92
+ ).credentials.access_token
93
+
94
+ result = @gateway.oauth.revoke_access_token(access_token)
95
+ result.should be_success
96
+
97
+ gateway = Braintree::Gateway.new(
98
+ :access_token => access_token,
99
+ :logger => Logger.new("/dev/null")
100
+ )
101
+
102
+ expect do
103
+ gateway.customer.create
104
+ end.to raise_error(Braintree::AuthenticationError)
105
+ end
106
+ end
107
+
83
108
  describe "connect_url" do
84
109
  it "builds a connect url" do
85
110
  url = @gateway.oauth.connect_url(
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: braintree
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.61.1
4
+ version: 2.62.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-05-13 00:00:00.000000000 Z
12
+ date: 2016-05-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
@@ -35,205 +35,205 @@ extra_rdoc_files: []
35
35
  files:
36
36
  - README.rdoc
37
37
  - LICENSE
38
- - lib/braintree.rb
39
- - lib/braintree/paypal_account.rb
40
- - lib/braintree/account_updater_daily_report.rb
41
- - lib/braintree/address.rb
42
- - lib/braintree/europe_bank_account.rb
43
- - lib/braintree/credit_card_verification_gateway.rb
44
- - lib/braintree/settlement_batch.rb
45
- - lib/braintree/validation_error_collection.rb
46
- - lib/braintree/resource_collection.rb
47
- - lib/braintree/transaction.rb
48
- - lib/braintree/exceptions.rb
49
- - lib/braintree/dispute/transaction_details.rb
50
- - lib/braintree/testing_gateway.rb
51
- - lib/braintree/xml.rb
52
- - lib/braintree/customer_gateway.rb
53
- - lib/braintree/error_codes.rb
54
- - lib/braintree/settlement_batch_summary.rb
55
38
  - lib/braintree/paypal_account_gateway.rb
56
- - lib/braintree/address/country_names.rb
57
- - lib/braintree/advanced_search.rb
58
- - lib/braintree/base_module.rb
59
- - lib/braintree/amex_express_checkout_card.rb
39
+ - lib/braintree/account_updater_daily_report.rb
40
+ - lib/braintree/webhook_notification_gateway.rb
41
+ - lib/braintree/coinbase_account.rb
42
+ - lib/braintree/payment_method_nonce_gateway.rb
43
+ - lib/braintree/subscription.rb
44
+ - lib/braintree/webhook_testing_gateway.rb
45
+ - lib/braintree/merchant_gateway.rb
60
46
  - lib/braintree/payment_method_nonce.rb
61
- - lib/braintree/signature_service.rb
62
- - lib/braintree/credit_card_verification_search.rb
63
- - lib/braintree/webhook_testing.rb
64
- - lib/braintree/test/transaction_amounts.rb
65
- - lib/braintree/test/credit_card.rb
66
- - lib/braintree/test/nonce.rb
67
- - lib/braintree/test/merchant_account.rb
68
- - lib/braintree/test/venmo_sdk.rb
69
- - lib/braintree/oauth_credentials.rb
47
+ - lib/braintree/add_on_gateway.rb
48
+ - lib/braintree/modification.rb
49
+ - lib/braintree/merchant_account.rb
70
50
  - lib/braintree/test_transaction.rb
71
- - lib/braintree/facilitator_details.rb
72
- - lib/braintree/digest.rb
73
- - lib/braintree/three_d_secure_info.rb
51
+ - lib/braintree/validation_error_collection.rb
52
+ - lib/braintree/europe_bank_account.rb
53
+ - lib/braintree/merchant.rb
54
+ - lib/braintree/amex_express_checkout_card.rb
55
+ - lib/braintree/errors.rb
56
+ - lib/braintree/plan.rb
74
57
  - lib/braintree/settlement_batch_summary_gateway.rb
75
- - lib/braintree/customer.rb
76
- - lib/braintree/http.rb
77
- - lib/braintree/coinbase_account.rb
78
- - lib/braintree/transaction_search.rb
79
- - lib/braintree/credit_card.rb
80
- - lib/braintree/credentials_parser.rb
81
- - lib/braintree/validation_error.rb
82
- - lib/braintree/configuration.rb
83
- - lib/braintree/client_token.rb
84
- - lib/braintree/risk_data.rb
58
+ - lib/braintree/version.rb
59
+ - lib/braintree/oauth_gateway.rb
85
60
  - lib/braintree/util.rb
86
- - lib/braintree/add_on_gateway.rb
87
- - lib/braintree/payment_method_nonce_gateway.rb
88
- - lib/braintree/transparent_redirect.rb
89
- - lib/braintree/payment_method_gateway.rb
90
- - lib/braintree/discount.rb
61
+ - lib/braintree/testing_gateway.rb
62
+ - lib/braintree/webhook_testing.rb
63
+ - lib/braintree/payment_instrument_type.rb
64
+ - lib/braintree/risk_data.rb
91
65
  - lib/braintree/apple_pay_card.rb
92
- - lib/braintree/oauth_gateway.rb
93
- - lib/braintree/subscription/status_details.rb
94
- - lib/braintree/merchant_account_gateway.rb
95
- - lib/braintree/merchant.rb
96
- - lib/braintree/modification.rb
97
- - lib/braintree/webhook_testing_gateway.rb
98
- - lib/braintree/customer_search.rb
99
- - lib/braintree/subscription_gateway.rb
100
- - lib/braintree/payment_method.rb
101
- - lib/braintree/venmo_account.rb
102
66
  - lib/braintree/disbursement.rb
103
- - lib/braintree/credit_card_verification.rb
104
- - lib/braintree/merchant_gateway.rb
105
- - lib/braintree/address_gateway.rb
67
+ - lib/braintree/add_on.rb
68
+ - lib/braintree/credit_card_verification_search.rb
69
+ - lib/braintree/resource_collection.rb
70
+ - lib/braintree/transparent_redirect.rb
71
+ - lib/braintree/unknown_payment_method.rb
72
+ - lib/braintree/address/country_names.rb
73
+ - lib/braintree/client_token.rb
74
+ - lib/braintree/webhook_notification.rb
75
+ - lib/braintree/subscription_search.rb
76
+ - lib/braintree/settlement_batch_summary.rb
77
+ - lib/braintree/base_module.rb
78
+ - lib/braintree/error_result.rb
79
+ - lib/braintree/oauth_credentials.rb
80
+ - lib/braintree/successful_result.rb
81
+ - lib/braintree/configuration.rb
82
+ - lib/braintree/credit_card_verification_gateway.rb
106
83
  - lib/braintree/merchant_account/business_details.rb
107
- - lib/braintree/merchant_account/funding_details.rb
108
84
  - lib/braintree/merchant_account/individual_details.rb
85
+ - lib/braintree/merchant_account/funding_details.rb
109
86
  - lib/braintree/merchant_account/address_details.rb
110
- - lib/braintree/credit_card_gateway.rb
111
- - lib/braintree/europe_bank_account_gateway.rb
112
- - lib/braintree/transaction_gateway.rb
113
- - lib/braintree/error_result.rb
114
- - lib/braintree/dispute.rb
115
- - lib/braintree/merchant_account.rb
116
- - lib/braintree/successful_result.rb
117
- - lib/braintree/add_on.rb
118
- - lib/braintree/sha256_digest.rb
119
- - lib/braintree/transaction/credit_card_details.rb
120
- - lib/braintree/transaction/paypal_details.rb
121
- - lib/braintree/transaction/subscription_details.rb
122
- - lib/braintree/transaction/status_details.rb
87
+ - lib/braintree/transparent_redirect_gateway.rb
88
+ - lib/braintree/android_pay_card.rb
89
+ - lib/braintree/http.rb
90
+ - lib/braintree/settlement_batch.rb
91
+ - lib/braintree/subscription_gateway.rb
92
+ - lib/braintree/credit_card.rb
93
+ - lib/braintree/customer_gateway.rb
94
+ - lib/braintree/xml/generator.rb
95
+ - lib/braintree/xml/parser.rb
96
+ - lib/braintree/xml/libxml.rb
97
+ - lib/braintree/xml/rexml.rb
123
98
  - lib/braintree/transaction/amex_express_checkout_details.rb
99
+ - lib/braintree/transaction/subscription_details.rb
100
+ - lib/braintree/transaction/coinbase_details.rb
101
+ - lib/braintree/transaction/venmo_account_details.rb
102
+ - lib/braintree/transaction/disbursement_details.rb
103
+ - lib/braintree/transaction/paypal_details.rb
124
104
  - lib/braintree/transaction/apple_pay_details.rb
105
+ - lib/braintree/transaction/status_details.rb
125
106
  - lib/braintree/transaction/customer_details.rb
126
- - lib/braintree/transaction/disbursement_details.rb
127
- - lib/braintree/transaction/venmo_account_details.rb
128
- - lib/braintree/transaction/coinbase_details.rb
129
107
  - lib/braintree/transaction/address_details.rb
130
108
  - lib/braintree/transaction/android_pay_details.rb
131
- - lib/braintree/webhook_notification.rb
109
+ - lib/braintree/transaction/credit_card_details.rb
110
+ - lib/braintree/dispute/transaction_details.rb
111
+ - lib/braintree/payment_method.rb
112
+ - lib/braintree/transaction_search.rb
113
+ - lib/braintree/descriptor.rb
114
+ - lib/braintree/advanced_search.rb
115
+ - lib/braintree/validation_error.rb
116
+ - lib/braintree/three_d_secure_info.rb
132
117
  - lib/braintree/client_token_gateway.rb
118
+ - lib/braintree/customer_search.rb
119
+ - lib/braintree/address_gateway.rb
120
+ - lib/braintree/credit_card_gateway.rb
121
+ - lib/braintree/address.rb
122
+ - lib/braintree/signature_service.rb
123
+ - lib/braintree/plan_gateway.rb
124
+ - lib/braintree/exceptions.rb
133
125
  - lib/braintree/gateway.rb
134
- - lib/braintree/payment_instrument_type.rb
135
- - lib/braintree/webhook_notification_gateway.rb
136
- - lib/braintree/android_pay_card.rb
137
- - lib/braintree/subscription_search.rb
138
- - lib/braintree/transparent_redirect_gateway.rb
139
- - lib/braintree/plan.rb
140
- - lib/braintree/unknown_payment_method.rb
141
- - lib/braintree/xml/libxml.rb
142
- - lib/braintree/xml/parser.rb
143
- - lib/braintree/xml/rexml.rb
144
- - lib/braintree/xml/generator.rb
145
- - lib/braintree/errors.rb
126
+ - lib/braintree/discount.rb
127
+ - lib/braintree/transaction.rb
146
128
  - lib/braintree/discount_gateway.rb
147
- - lib/braintree/descriptor.rb
148
- - lib/braintree/version.rb
149
- - lib/braintree/subscription.rb
150
- - lib/braintree/plan_gateway.rb
129
+ - lib/braintree/xml.rb
130
+ - lib/braintree/payment_method_gateway.rb
131
+ - lib/braintree/merchant_account_gateway.rb
132
+ - lib/braintree/credentials_parser.rb
133
+ - lib/braintree/digest.rb
134
+ - lib/braintree/subscription/status_details.rb
135
+ - lib/braintree/europe_bank_account_gateway.rb
136
+ - lib/braintree/credit_card_verification.rb
137
+ - lib/braintree/transaction_gateway.rb
138
+ - lib/braintree/sha256_digest.rb
139
+ - lib/braintree/venmo_account.rb
140
+ - lib/braintree/facilitator_details.rb
141
+ - lib/braintree/dispute.rb
142
+ - lib/braintree/error_codes.rb
143
+ - lib/braintree/customer.rb
144
+ - lib/braintree/paypal_account.rb
145
+ - lib/braintree/test/venmo_sdk.rb
146
+ - lib/braintree/test/merchant_account.rb
147
+ - lib/braintree/test/transaction_amounts.rb
148
+ - lib/braintree/test/nonce.rb
149
+ - lib/braintree/test/credit_card.rb
150
+ - lib/braintree.rb
151
151
  - lib/ssl/securetrust_ca.crt
152
152
  - lib/ssl/api_braintreegateway_com.ca.crt
153
- - spec/oauth_test_helper.rb
154
- - spec/ssl/privateKey.key
153
+ - spec/integration/spec_helper.rb
154
+ - spec/integration/braintree/transaction_search_spec.rb
155
+ - spec/integration/braintree/oauth_spec.rb
156
+ - spec/integration/braintree/paypal_account_spec.rb
157
+ - spec/integration/braintree/advanced_search_spec.rb
158
+ - spec/integration/braintree/disbursement_spec.rb
159
+ - spec/integration/braintree/test_transaction_spec.rb
160
+ - spec/integration/braintree/transaction_spec.rb
161
+ - spec/integration/braintree/address_spec.rb
162
+ - spec/integration/braintree/error_codes_spec.rb
163
+ - spec/integration/braintree/merchant_spec.rb
164
+ - spec/integration/braintree/credit_card_verification_search_spec.rb
165
+ - spec/integration/braintree/customer_spec.rb
166
+ - spec/integration/braintree/client_api/spec_helper.rb
167
+ - spec/integration/braintree/client_api/client_token_spec.rb
168
+ - spec/integration/braintree/payment_method_spec.rb
169
+ - spec/integration/braintree/credit_card_verification_spec.rb
170
+ - spec/integration/braintree/add_on_spec.rb
171
+ - spec/integration/braintree/plan_spec.rb
172
+ - spec/integration/braintree/subscription_spec.rb
173
+ - spec/integration/braintree/merchant_account_spec.rb
174
+ - spec/integration/braintree/transparent_redirect_spec.rb
175
+ - spec/integration/braintree/customer_search_spec.rb
176
+ - spec/integration/braintree/discount_spec.rb
177
+ - spec/integration/braintree/credit_card_spec.rb
178
+ - spec/integration/braintree/http_spec.rb
179
+ - spec/integration/braintree/settlement_batch_summary_spec.rb
180
+ - spec/integration/braintree/payment_method_nonce_spec.rb
181
+ - spec/integration/braintree/coinbase_spec.rb
182
+ - spec/integration/braintree/test/transaction_amounts_spec.rb
183
+ - spec/script/httpsd.rb
184
+ - spec/httpsd.pid
185
+ - spec/spec.opts
155
186
  - spec/ssl/geotrust_global.crt
187
+ - spec/ssl/privateKey.key
156
188
  - spec/ssl/certificate.crt
157
- - spec/script/httpsd.rb
158
- - spec/hacks/tcp_socket.rb
189
+ - spec/oauth_test_helper.rb
159
190
  - spec/spec_helper.rb
160
- - spec/unit/spec_helper.rb
161
191
  - spec/unit/braintree_spec.rb
162
- - spec/unit/braintree/subscription_search_spec.rb
163
- - spec/unit/braintree/transparent_redirect_spec.rb
164
- - spec/unit/braintree/transaction_spec.rb
192
+ - spec/unit/spec_helper.rb
165
193
  - spec/unit/braintree/successful_result_spec.rb
166
- - spec/unit/braintree/http_spec.rb
167
- - spec/unit/braintree/sha256_digest_spec.rb
168
- - spec/unit/braintree/util_spec.rb
169
194
  - spec/unit/braintree/base_module_spec.rb
170
- - spec/unit/braintree/unknown_payment_method_spec.rb
171
- - spec/unit/braintree/address_spec.rb
172
- - spec/unit/braintree/credit_card_spec.rb
173
- - spec/unit/braintree/dispute_spec.rb
195
+ - spec/unit/braintree/transaction_search_spec.rb
196
+ - spec/unit/braintree/sha256_digest_spec.rb
174
197
  - spec/unit/braintree/modification_spec.rb
175
- - spec/unit/braintree/error_result_spec.rb
176
- - spec/unit/braintree/errors_spec.rb
198
+ - spec/unit/braintree/paypal_account_spec.rb
177
199
  - spec/unit/braintree/three_d_secure_info_spec.rb
178
- - spec/unit/braintree/signature_service_spec.rb
179
- - spec/unit/braintree/payment_method_spec.rb
200
+ - spec/unit/braintree/xml_spec.rb
201
+ - spec/unit/braintree/error_result_spec.rb
202
+ - spec/unit/braintree/risk_data_spec.rb
180
203
  - spec/unit/braintree/disbursement_spec.rb
181
- - spec/unit/braintree/subscription_spec.rb
182
- - spec/unit/braintree/validation_error_collection_spec.rb
183
- - spec/unit/braintree/client_token_spec.rb
184
204
  - spec/unit/braintree/webhook_notification_spec.rb
205
+ - spec/unit/braintree/transaction_spec.rb
206
+ - spec/unit/braintree/address_spec.rb
207
+ - spec/unit/braintree/util_spec.rb
185
208
  - spec/unit/braintree/configuration_spec.rb
209
+ - spec/unit/braintree/validation_error_collection_spec.rb
186
210
  - spec/unit/braintree/credit_card_verification_search_spec.rb
187
- - spec/unit/braintree/merchant_account_spec.rb
188
- - spec/unit/braintree/digest_spec.rb
189
- - spec/unit/braintree/credentials_parser_spec.rb
190
- - spec/unit/braintree/apple_pay_card_spec.rb
191
- - spec/unit/braintree/customer_spec.rb
192
- - spec/unit/braintree/risk_data_spec.rb
193
- - spec/unit/braintree/transaction/deposit_details_spec.rb
194
- - spec/unit/braintree/transaction/customer_details_spec.rb
195
- - spec/unit/braintree/transaction/credit_card_details_spec.rb
196
- - spec/unit/braintree/transaction_search_spec.rb
197
- - spec/unit/braintree/xml_spec.rb
211
+ - spec/unit/braintree/dispute_spec.rb
198
212
  - spec/unit/braintree/xml/rexml_spec.rb
199
- - spec/unit/braintree/xml/libxml_spec.rb
200
213
  - spec/unit/braintree/xml/parser_spec.rb
201
- - spec/unit/braintree/resource_collection_spec.rb
202
- - spec/unit/braintree/paypal_account_spec.rb
203
- - spec/unit/braintree/validation_error_spec.rb
214
+ - spec/unit/braintree/xml/libxml_spec.rb
215
+ - spec/unit/braintree/transaction/customer_details_spec.rb
216
+ - spec/unit/braintree/transaction/credit_card_details_spec.rb
217
+ - spec/unit/braintree/transaction/deposit_details_spec.rb
218
+ - spec/unit/braintree/customer_spec.rb
219
+ - spec/unit/braintree/payment_method_spec.rb
204
220
  - spec/unit/braintree/credit_card_verification_spec.rb
205
- - spec/spec.opts
206
- - spec/httpsd.pid
207
- - spec/integration/spec_helper.rb
208
- - spec/integration/braintree/client_api/client_token_spec.rb
209
- - spec/integration/braintree/client_api/spec_helper.rb
210
- - spec/integration/braintree/transparent_redirect_spec.rb
211
- - spec/integration/braintree/oauth_spec.rb
212
- - spec/integration/braintree/transaction_spec.rb
213
- - spec/integration/braintree/http_spec.rb
214
- - spec/integration/braintree/payment_method_nonce_spec.rb
215
- - spec/integration/braintree/plan_spec.rb
216
- - spec/integration/braintree/address_spec.rb
217
- - spec/integration/braintree/test/transaction_amounts_spec.rb
218
- - spec/integration/braintree/credit_card_spec.rb
219
- - spec/integration/braintree/merchant_spec.rb
220
- - spec/integration/braintree/customer_search_spec.rb
221
- - spec/integration/braintree/coinbase_spec.rb
222
- - spec/integration/braintree/advanced_search_spec.rb
223
- - spec/integration/braintree/payment_method_spec.rb
224
- - spec/integration/braintree/disbursement_spec.rb
225
- - spec/integration/braintree/subscription_spec.rb
226
- - spec/integration/braintree/credit_card_verification_search_spec.rb
227
- - spec/integration/braintree/test_transaction_spec.rb
228
- - spec/integration/braintree/merchant_account_spec.rb
229
- - spec/integration/braintree/customer_spec.rb
230
- - spec/integration/braintree/settlement_batch_summary_spec.rb
231
- - spec/integration/braintree/transaction_search_spec.rb
232
- - spec/integration/braintree/error_codes_spec.rb
233
- - spec/integration/braintree/paypal_account_spec.rb
234
- - spec/integration/braintree/discount_spec.rb
235
- - spec/integration/braintree/add_on_spec.rb
236
- - spec/integration/braintree/credit_card_verification_spec.rb
221
+ - spec/unit/braintree/credentials_parser_spec.rb
222
+ - spec/unit/braintree/client_token_spec.rb
223
+ - spec/unit/braintree/validation_error_spec.rb
224
+ - spec/unit/braintree/errors_spec.rb
225
+ - spec/unit/braintree/signature_service_spec.rb
226
+ - spec/unit/braintree/resource_collection_spec.rb
227
+ - spec/unit/braintree/apple_pay_card_spec.rb
228
+ - spec/unit/braintree/subscription_spec.rb
229
+ - spec/unit/braintree/merchant_account_spec.rb
230
+ - spec/unit/braintree/transparent_redirect_spec.rb
231
+ - spec/unit/braintree/credit_card_spec.rb
232
+ - spec/unit/braintree/http_spec.rb
233
+ - spec/unit/braintree/unknown_payment_method_spec.rb
234
+ - spec/unit/braintree/subscription_search_spec.rb
235
+ - spec/unit/braintree/digest_spec.rb
236
+ - spec/hacks/tcp_socket.rb
237
237
  - braintree.gemspec
238
238
  homepage: http://www.braintreepayments.com/
239
239
  licenses: