braintree 3.2.0 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (150) hide show
  1. checksums.yaml +4 -4
  2. data/braintree.gemspec +3 -3
  3. data/lib/braintree.rb +6 -1
  4. data/lib/braintree/account_updater_daily_report.rb +1 -1
  5. data/lib/braintree/address.rb +2 -1
  6. data/lib/braintree/apple_pay.rb +1 -1
  7. data/lib/braintree/apple_pay_card.rb +1 -1
  8. data/lib/braintree/apple_pay_options.rb +1 -1
  9. data/lib/braintree/authorization_adjustment.rb +1 -1
  10. data/lib/braintree/client_token.rb +1 -1
  11. data/lib/braintree/configuration.rb +11 -11
  12. data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
  13. data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
  14. data/lib/braintree/credit_card.rb +2 -2
  15. data/lib/braintree/credit_card_gateway.rb +14 -4
  16. data/lib/braintree/credit_card_verification.rb +5 -5
  17. data/lib/braintree/credit_card_verification_search.rb +1 -1
  18. data/lib/braintree/customer.rb +6 -4
  19. data/lib/braintree/customer_gateway.rb +2 -0
  20. data/lib/braintree/customer_search.rb +1 -1
  21. data/lib/braintree/disbursement.rb +1 -1
  22. data/lib/braintree/dispute.rb +15 -1
  23. data/lib/braintree/dispute/paypal_message.rb +15 -0
  24. data/lib/braintree/dispute_gateway.rb +2 -2
  25. data/lib/braintree/dispute_search.rb +3 -2
  26. data/lib/braintree/document_upload.rb +1 -1
  27. data/lib/braintree/error_codes.rb +10 -6
  28. data/lib/braintree/google_pay_card.rb +1 -1
  29. data/lib/braintree/granted_payment_instrument_update.rb +1 -1
  30. data/lib/braintree/graphql_client.rb +7 -7
  31. data/lib/braintree/http.rb +3 -3
  32. data/lib/braintree/local_payment_completed.rb +1 -1
  33. data/lib/braintree/local_payment_reversed.rb +19 -0
  34. data/lib/braintree/merchant.rb +1 -1
  35. data/lib/braintree/merchant_account.rb +1 -1
  36. data/lib/braintree/merchant_account_gateway.rb +1 -1
  37. data/lib/braintree/merchant_gateway.rb +1 -1
  38. data/lib/braintree/modification.rb +1 -1
  39. data/lib/braintree/oauth_credentials.rb +1 -1
  40. data/lib/braintree/oauth_gateway.rb +5 -5
  41. data/lib/braintree/payment_instrument_type.rb +10 -10
  42. data/lib/braintree/payment_method_gateway.rb +10 -7
  43. data/lib/braintree/payment_method_nonce.rb +7 -4
  44. data/lib/braintree/payment_method_nonce_details.rb +37 -0
  45. data/lib/braintree/payment_method_nonce_details_payer_info.rb +32 -0
  46. data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
  47. data/lib/braintree/plan.rb +1 -1
  48. data/lib/braintree/processor_response_types.rb +3 -3
  49. data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
  50. data/lib/braintree/risk_data.rb +3 -1
  51. data/lib/braintree/samsung_pay_card.rb +1 -1
  52. data/lib/braintree/settlement_batch_summary.rb +2 -2
  53. data/lib/braintree/subscription.rb +6 -6
  54. data/lib/braintree/three_d_secure_info.rb +22 -12
  55. data/lib/braintree/transaction.rb +32 -24
  56. data/lib/braintree/transaction_gateway.rb +24 -5
  57. data/lib/braintree/transaction_line_item.rb +1 -1
  58. data/lib/braintree/transaction_search.rb +3 -1
  59. data/lib/braintree/unknown_payment_method.rb +1 -1
  60. data/lib/braintree/us_bank_account.rb +3 -3
  61. data/lib/braintree/us_bank_account_verification.rb +1 -1
  62. data/lib/braintree/us_bank_account_verification_gateway.rb +1 -1
  63. data/lib/braintree/util.rb +4 -4
  64. data/lib/braintree/venmo_account.rb +1 -1
  65. data/lib/braintree/version.rb +1 -1
  66. data/lib/braintree/visa_checkout_card.rb +2 -2
  67. data/lib/braintree/webhook_notification.rb +30 -20
  68. data/lib/braintree/webhook_notification_gateway.rb +5 -5
  69. data/lib/braintree/webhook_testing_gateway.rb +30 -0
  70. data/lib/braintree/xml/generator.rb +5 -4
  71. data/lib/braintree/xml/libxml.rb +0 -1
  72. data/lib/braintree/xml/parser.rb +22 -12
  73. data/lib/braintree/xml/rexml.rb +70 -0
  74. data/spec/integration/braintree/add_on_spec.rb +1 -1
  75. data/spec/integration/braintree/address_spec.rb +28 -24
  76. data/spec/integration/braintree/advanced_search_spec.rb +45 -45
  77. data/spec/integration/braintree/apple_pay_spec.rb +3 -3
  78. data/spec/integration/braintree/braintree_gateway_spec.rb +2 -1
  79. data/spec/integration/braintree/client_api/client_token_spec.rb +14 -14
  80. data/spec/integration/braintree/client_api/spec_helper.rb +5 -5
  81. data/spec/integration/braintree/credit_card_spec.rb +213 -122
  82. data/spec/integration/braintree/credit_card_verification_search_spec.rb +2 -2
  83. data/spec/integration/braintree/credit_card_verification_spec.rb +1 -1
  84. data/spec/integration/braintree/customer_search_spec.rb +8 -8
  85. data/spec/integration/braintree/customer_spec.rb +282 -165
  86. data/spec/integration/braintree/dispute_search_spec.rb +28 -3
  87. data/spec/integration/braintree/dispute_spec.rb +6 -6
  88. data/spec/integration/braintree/error_codes_spec.rb +1 -1
  89. data/spec/integration/braintree/http_spec.rb +2 -2
  90. data/spec/integration/braintree/merchant_account_spec.rb +25 -26
  91. data/spec/integration/braintree/merchant_spec.rb +14 -14
  92. data/spec/integration/braintree/oauth_spec.rb +11 -11
  93. data/spec/integration/braintree/payment_method_nonce_spec.rb +28 -35
  94. data/spec/integration/braintree/payment_method_spec.rb +269 -165
  95. data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +9 -9
  96. data/spec/integration/braintree/paypal_account_spec.rb +28 -28
  97. data/spec/integration/braintree/samsung_pay_card_spec.rb +9 -9
  98. data/spec/integration/braintree/settlement_batch_summary_spec.rb +8 -8
  99. data/spec/integration/braintree/subscription_spec.rb +133 -133
  100. data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
  101. data/spec/integration/braintree/test_transaction_spec.rb +10 -10
  102. data/spec/integration/braintree/transaction_search_spec.rb +93 -67
  103. data/spec/integration/braintree/transaction_spec.rb +574 -360
  104. data/spec/integration/braintree/transaction_us_bank_account_spec.rb +20 -20
  105. data/spec/integration/braintree/us_bank_account_spec.rb +6 -6
  106. data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +7 -7
  107. data/spec/integration/braintree/us_bank_account_verification_spec.rb +8 -8
  108. data/spec/integration/braintree/visa_checkout_card_spec.rb +5 -5
  109. data/spec/integration/spec_helper.rb +9 -3
  110. data/spec/oauth_test_helper.rb +1 -1
  111. data/spec/script/httpsd.rb +6 -6
  112. data/spec/spec_helper.rb +6 -3
  113. data/spec/unit/braintree/address_spec.rb +1 -1
  114. data/spec/unit/braintree/apple_pay_card_spec.rb +1 -1
  115. data/spec/unit/braintree/client_token_spec.rb +2 -2
  116. data/spec/unit/braintree/configuration_spec.rb +42 -42
  117. data/spec/unit/braintree/credit_card_spec.rb +13 -13
  118. data/spec/unit/braintree/credit_card_verification_search_spec.rb +1 -1
  119. data/spec/unit/braintree/credit_card_verification_spec.rb +8 -4
  120. data/spec/unit/braintree/customer_spec.rb +20 -10
  121. data/spec/unit/braintree/disbursement_spec.rb +7 -7
  122. data/spec/unit/braintree/dispute_search_spec.rb +1 -0
  123. data/spec/unit/braintree/dispute_spec.rb +34 -9
  124. data/spec/unit/braintree/error_result_spec.rb +5 -5
  125. data/spec/unit/braintree/errors_spec.rb +8 -8
  126. data/spec/unit/braintree/http_spec.rb +5 -5
  127. data/spec/unit/braintree/merchant_account_spec.rb +1 -1
  128. data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +31 -0
  129. data/spec/unit/braintree/payment_method_nonce_details_spec.rb +43 -0
  130. data/spec/unit/braintree/payment_method_nonce_spec.rb +40 -0
  131. data/spec/unit/braintree/payment_method_spec.rb +1 -1
  132. data/spec/unit/braintree/paypal_account_spec.rb +2 -2
  133. data/spec/unit/braintree/resource_collection_spec.rb +9 -9
  134. data/spec/unit/braintree/risk_data_spec.rb +9 -5
  135. data/spec/unit/braintree/subscription_search_spec.rb +1 -1
  136. data/spec/unit/braintree/successful_result_spec.rb +1 -1
  137. data/spec/unit/braintree/three_d_secure_info_spec.rb +32 -14
  138. data/spec/unit/braintree/transaction/credit_card_details_spec.rb +3 -3
  139. data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
  140. data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
  141. data/spec/unit/braintree/transaction/paypal_details_spec.rb +1 -1
  142. data/spec/unit/braintree/transaction_search_spec.rb +12 -12
  143. data/spec/unit/braintree/transaction_spec.rb +25 -17
  144. data/spec/unit/braintree/util_spec.rb +18 -18
  145. data/spec/unit/braintree/validation_error_collection_spec.rb +36 -36
  146. data/spec/unit/braintree/webhook_notification_spec.rb +88 -56
  147. data/spec/unit/braintree/xml/rexml_spec.rb +51 -0
  148. data/spec/unit/braintree/xml_spec.rb +31 -31
  149. metadata +16 -8
  150. data/lib/braintree/settlement_batch.rb +0 -0
@@ -0,0 +1,37 @@
1
+ module Braintree
2
+ class PaymentMethodNonceDetails # :nodoc:
3
+ include BaseModule
4
+
5
+ attr_reader :bin
6
+ attr_reader :card_type
7
+ attr_reader :expiration_month
8
+ attr_reader :expiration_year
9
+ attr_reader :is_network_tokenized
10
+ attr_reader :last_two
11
+ attr_reader :payer_info
12
+
13
+ alias_method :is_network_tokenized?, :is_network_tokenized
14
+
15
+ def initialize(attributes)
16
+ set_instance_variables_from_hash attributes unless attributes.nil?
17
+ @payer_info = PaymentMethodNonceDetailsPayerInfo.new(attributes[:payer_info]) if attributes[:payer_info]
18
+ end
19
+
20
+ def inspect
21
+ attr_order = [
22
+ :bin,
23
+ :card_type,
24
+ :expiration_month,
25
+ :expiration_year,
26
+ :is_network_tokenized,
27
+ :last_two,
28
+ :payer_info,
29
+ ]
30
+
31
+ formatted_attrs = attr_order.map do |attr|
32
+ "#{attr}: #{send(attr).inspect}"
33
+ end
34
+ "#<PaymentMethodNonceDetails #{formatted_attrs.join(", ")}>"
35
+ end
36
+ end
37
+ end
@@ -0,0 +1,32 @@
1
+ module Braintree
2
+ class PaymentMethodNonceDetailsPayerInfo # :nodoc:
3
+ include BaseModule
4
+
5
+ attr_reader :billing_agreement_id
6
+ attr_reader :country_code
7
+ attr_reader :email
8
+ attr_reader :first_name
9
+ attr_reader :last_name
10
+ attr_reader :payer_id
11
+
12
+ def initialize(attributes)
13
+ set_instance_variables_from_hash attributes unless attributes.nil?
14
+ end
15
+
16
+ def inspect
17
+ attr_order = [
18
+ :billing_agreement_id,
19
+ :country_code,
20
+ :email,
21
+ :first_name,
22
+ :last_name,
23
+ :payer_id,
24
+ ]
25
+
26
+ formatted_attrs = attr_order.map do |attr|
27
+ "#{attr}: #{send(attr).inspect}"
28
+ end
29
+ "#<PaymentMethodNonceDetailsPayerInfo #{formatted_attrs.join(", ")}>"
30
+ end
31
+ end
32
+ end
@@ -8,7 +8,7 @@ module Braintree
8
8
  @config.assert_has_access_token_or_keys
9
9
  end
10
10
 
11
- def create(payment_method_token, args = { payment_method_nonce: {} })
11
+ def create(payment_method_token, args = {payment_method_nonce: {}})
12
12
  Util.verify_keys(PaymentMethodNonceGateway._create_signature, args)
13
13
 
14
14
  response = @config.http.post("#{@config.base_merchant_path}/payment_methods/#{payment_method_token}/nonces", args)
@@ -36,7 +36,7 @@ module Braintree
36
36
  end
37
37
 
38
38
  def self._new(*args)
39
- self.new *args
39
+ self.new(*args)
40
40
  end
41
41
  end
42
42
  end
@@ -1,7 +1,7 @@
1
1
  module Braintree
2
2
  module ProcessorResponseTypes
3
- Approved = 'approved'
4
- SoftDeclined = 'soft_declined'
5
- HardDeclined = 'hard_declined'
3
+ Approved = "approved"
4
+ SoftDeclined = "soft_declined"
5
+ HardDeclined = "hard_declined"
6
6
  end
7
7
  end
@@ -15,7 +15,7 @@ module Braintree
15
15
  class << self
16
16
  protected :new
17
17
  def _new(*args) # :nodoc:
18
- self.new *args
18
+ self.new(*args)
19
19
  end
20
20
  end
21
21
  end
@@ -6,16 +6,18 @@ module Braintree
6
6
  attr_reader :customer_location_zip
7
7
  attr_reader :customer_tenure
8
8
  attr_reader :decision
9
+ attr_reader :decision_reasons
9
10
  attr_reader :device_data_captured
10
11
  attr_reader :fraud_service_provider
11
12
  attr_reader :id
13
+ attr_reader :transaction_risk_score
12
14
 
13
15
  def initialize(attributes)
14
16
  set_instance_variables_from_hash attributes unless attributes.nil?
15
17
  end
16
18
 
17
19
  def inspect
18
- attr_order = [:id, :decision, :device_data_captured, :fraud_service_provider]
20
+ attr_order = [:id, :decision, :decision_reasons, :device_data_captured, :fraud_service_provider, :transaction_risk_score]
19
21
  formatted_attrs = attr_order.map do |attr|
20
22
  "#{attr}: #{send(attr).inspect}"
21
23
  end
@@ -77,7 +77,7 @@ module Braintree
77
77
  end
78
78
 
79
79
  def self._new(*args) # :nodoc:
80
- self.new *args
80
+ self.new(*args)
81
81
  end
82
82
  end
83
83
  end
@@ -1,11 +1,11 @@
1
1
  module Braintree
2
2
  class SettlementBatchSummary
3
3
  include BaseModule
4
-
4
+
5
5
  attr_reader :records
6
6
 
7
7
  def self.generate(settlement_date, group_by_custom_field = nil)
8
- criteria = { :settlement_date => settlement_date }
8
+ criteria = {:settlement_date => settlement_date}
9
9
  criteria.merge!({:group_by_custom_field => group_by_custom_field}) if group_by_custom_field
10
10
  Configuration.gateway.settlement_batch_summary.generate(criteria)
11
11
  end
@@ -11,11 +11,11 @@ module Braintree
11
11
  end
12
12
 
13
13
  module Status
14
- Active = 'Active'
15
- Canceled = 'Canceled'
16
- Expired = 'Expired'
17
- PastDue = 'Past Due'
18
- Pending = 'Pending'
14
+ Active = "Active"
15
+ Canceled = "Canceled"
16
+ Expired = "Expired"
17
+ PastDue = "Past Due"
18
+ Pending = "Pending"
19
19
 
20
20
  All = constants.map { |c| const_get(c) }
21
21
  end
@@ -115,7 +115,7 @@ module Braintree
115
115
  class << self
116
116
  protected :new
117
117
  def _new(*args) # :nodoc:
118
- self.new *args
118
+ self.new(*args)
119
119
  end
120
120
  end
121
121
  end
@@ -2,16 +2,21 @@ module Braintree
2
2
  class ThreeDSecureInfo # :nodoc:
3
3
  include BaseModule
4
4
 
5
+ attr_reader :acs_transaction_id
6
+ attr_reader :cavv
7
+ attr_reader :ds_transaction_id
8
+ attr_reader :eci_flag
5
9
  attr_reader :enrolled
6
- attr_reader :liability_shifted
7
10
  attr_reader :liability_shift_possible
11
+ attr_reader :liability_shifted
12
+ attr_reader :pares_status
8
13
  attr_reader :status
9
- attr_reader :cavv
10
- attr_reader :xid
11
- attr_reader :eci_flag
12
- attr_reader :three_d_secure_version
13
- attr_reader :ds_transaction_id
14
14
  attr_reader :three_d_secure_authentication_id
15
+ attr_reader :three_d_secure_transaction_id
16
+ attr_reader :three_d_secure_version
17
+ attr_reader :xid
18
+ attr_reader :lookup
19
+ attr_reader :authentication
15
20
 
16
21
  alias_method :liability_shifted?, :liability_shifted
17
22
  alias_method :liability_shift_possible?, :liability_shift_possible
@@ -22,16 +27,21 @@ module Braintree
22
27
 
23
28
  def inspect
24
29
  attr_order = [
30
+ :acs_transaction_id,
31
+ :authentication,
32
+ :cavv,
33
+ :ds_transaction_id,
34
+ :eci_flag,
25
35
  :enrolled,
26
- :liability_shifted,
27
36
  :liability_shift_possible,
37
+ :liability_shifted,
38
+ :lookup,
39
+ :pares_status,
28
40
  :status,
29
- :cavv,
30
- :xid,
31
- :eci_flag,
32
- :three_d_secure_version,
33
- :ds_transaction_id,
34
41
  :three_d_secure_authentication_id,
42
+ :three_d_secure_transaction_id,
43
+ :three_d_secure_version,
44
+ :xid
35
45
  ]
36
46
 
37
47
  formatted_attrs = attr_order.map do |attr|
@@ -4,18 +4,18 @@ module Braintree
4
4
  include Braintree::Util::IdEquality
5
5
 
6
6
  module CreatedUsing
7
- FullInformation = 'full_information'
8
- Token = 'token'
9
- Unrecognized = 'unrecognized'
7
+ FullInformation = "full_information"
8
+ Token = "token"
9
+ Unrecognized = "unrecognized"
10
10
  end
11
11
 
12
12
  module EscrowStatus
13
- HoldPending = 'hold_pending'
14
- Held = 'held'
15
- ReleasePending = 'release_pending'
16
- Released = 'released'
17
- Refunded = 'refunded'
18
- Unrecognized = 'unrecognized'
13
+ HoldPending = "hold_pending"
14
+ Held = "held"
15
+ ReleasePending = "release_pending"
16
+ Released = "released"
17
+ Refunded = "refunded"
18
+ Unrecognized = "unrecognized"
19
19
  end
20
20
 
21
21
  module GatewayRejectionReason
@@ -32,20 +32,20 @@ module Braintree
32
32
  end
33
33
 
34
34
  module Status
35
- AuthorizationExpired = 'authorization_expired'
36
- Authorizing = 'authorizing'
37
- Authorized = 'authorized'
38
- GatewayRejected = 'gateway_rejected'
39
- Failed = 'failed'
40
- ProcessorDeclined = 'processor_declined'
41
- Settled = 'settled'
42
- SettlementConfirmed = 'settlement_confirmed'
43
- SettlementDeclined = 'settlement_declined'
44
- SettlementPending = 'settlement_pending'
45
- Settling = 'settling'
46
- SubmittedForSettlement = 'submitted_for_settlement'
47
- Voided = 'voided'
48
- Unrecognized = 'unrecognized'
35
+ AuthorizationExpired = "authorization_expired"
36
+ Authorizing = "authorizing"
37
+ Authorized = "authorized"
38
+ GatewayRejected = "gateway_rejected"
39
+ Failed = "failed"
40
+ ProcessorDeclined = "processor_declined"
41
+ Settled = "settled"
42
+ SettlementConfirmed = "settlement_confirmed"
43
+ SettlementDeclined = "settlement_declined"
44
+ SettlementPending = "settlement_pending"
45
+ Settling = "settling"
46
+ SubmittedForSettlement = "submitted_for_settlement"
47
+ Voided = "voided"
48
+ Unrecognized = "unrecognized"
49
49
 
50
50
  All = constants.map { |c| const_get(c) }
51
51
  end
@@ -169,6 +169,14 @@ module Braintree
169
169
  attr_reader :visa_checkout_card_details
170
170
  attr_reader :voice_referral_number
171
171
 
172
+ def self.adjust_authorization(*args)
173
+ Configuration.gateway.transaction.adjust_authorization(*args)
174
+ end
175
+
176
+ def self.adjust_authorization!(*args)
177
+ Configuration.gateway.transaction.adjust_authorization!(*args)
178
+ end
179
+
172
180
  def self.create(*args)
173
181
  Configuration.gateway.transaction.create(*args)
174
182
  end
@@ -386,7 +394,7 @@ module Braintree
386
394
  class << self
387
395
  protected :new
388
396
  def _new(*args) # :nodoc:
389
- self.new *args
397
+ self.new(*args)
390
398
  end
391
399
  end
392
400
 
@@ -53,7 +53,7 @@ module Braintree
53
53
  end
54
54
 
55
55
  def credit(attributes)
56
- create(attributes.merge(:type => 'credit'))
56
+ create(attributes.merge(:type => "credit"))
57
57
  end
58
58
 
59
59
  def credit!(*args)
@@ -72,7 +72,7 @@ module Braintree
72
72
  options = if amount_or_options.is_a?(Hash)
73
73
  amount_or_options
74
74
  else
75
- { :amount => amount_or_options }
75
+ {:amount => amount_or_options}
76
76
  end
77
77
 
78
78
  Util.verify_keys(TransactionGateway._refund_signature, options)
@@ -97,7 +97,7 @@ module Braintree
97
97
  end
98
98
 
99
99
  def sale(attributes)
100
- create(attributes.merge(:type => 'sale'))
100
+ create(attributes.merge(:type => "sale"))
101
101
  end
102
102
 
103
103
  def sale!(*args)
@@ -139,6 +139,18 @@ module Braintree
139
139
  return_object_or_raise(:transaction) { submit_for_settlement(*args) }
140
140
  end
141
141
 
142
+ def adjust_authorization(transaction_id, amount)
143
+ raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
144
+ Util.verify_keys(TransactionGateway._adjust_authorization_signature, {})
145
+ transaction_params = {:amount => amount}
146
+ response = @config.http.put("#{@config.base_merchant_path}/transactions/#{transaction_id}/adjust_authorization", :transaction => transaction_params)
147
+ _handle_transaction_response(response)
148
+ end
149
+
150
+ def adjust_authorization!(*args)
151
+ return_object_or_raise(:transaction) { adjust_authorization(*args) }
152
+ end
153
+
142
154
  def update_details(transaction_id, options = {})
143
155
  raise ArgumentError, "transaction_id is invalid" unless transaction_id =~ /\A[0-9a-z]+\z/
144
156
  Util.verify_keys(TransactionGateway._update_details_signature, options)
@@ -183,7 +195,7 @@ module Braintree
183
195
  :sca_exemption, :currency_iso_code,
184
196
  {:line_items => [:quantity, :name, :description, :kind, :unit_amount, :unit_tax_amount, :total_amount, :discount_amount, :tax_amount, :unit_of_measure, :product_code, :commodity_code, :url]},
185
197
  {:risk_data => [:customer_browser, :customer_device_id, :customer_ip, :customer_location_zip, :customer_tenure]},
186
- {:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number]},
198
+ {:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number, {:payment_reader_card_details => [:encrypted_card_data, :key_serial_number]}]},
187
199
  {:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
188
200
  {
189
201
  :billing => AddressGateway._shared_signature
@@ -265,6 +277,12 @@ module Braintree
265
277
  ]
266
278
  end
267
279
 
280
+ def self._adjust_authorization_signature
281
+ [
282
+ :amount
283
+ ]
284
+ end
285
+
268
286
  def self._update_details_signature # :nodoc:
269
287
  [
270
288
  :amount,
@@ -276,7 +294,8 @@ module Braintree
276
294
  def self._refund_signature
277
295
  [
278
296
  :amount,
279
- :order_id
297
+ :merchant_account_id,
298
+ :order_id,
280
299
  ]
281
300
  end
282
301
 
@@ -29,7 +29,7 @@ module Braintree
29
29
  class << self
30
30
  protected :new
31
31
  def _new(*args) # :nodoc:
32
- self.new *args
32
+ self.new(*args)
33
33
  end
34
34
  end
35
35
 
@@ -37,7 +37,8 @@ module Braintree
37
37
  :shipping_locality,
38
38
  :shipping_postal_code,
39
39
  :shipping_region,
40
- :shipping_street_address
40
+ :shipping_street_address,
41
+ :store_id,
41
42
  )
42
43
 
43
44
  equality_fields :credit_card_expiration_date
@@ -59,6 +60,7 @@ module Braintree
59
60
  multiple_value_field :status, :allows => Transaction::Status::All
60
61
  multiple_value_field :source
61
62
  multiple_value_field :type, :allows => Transaction::Type::All
63
+ multiple_value_field :store_ids
62
64
 
63
65
  key_value_fields :refund
64
66
 
@@ -20,7 +20,7 @@ module Braintree
20
20
  end
21
21
 
22
22
  def self._new(*args) # :nodoc:
23
- self.new *args
23
+ self.new(*args)
24
24
  end
25
25
  end
26
26
  end
@@ -35,7 +35,7 @@ module Braintree
35
35
  end
36
36
 
37
37
  def self._new(*args) # :nodoc:
38
- self.new *args
38
+ self.new(*args)
39
39
  end
40
40
 
41
41
  def self.find(*args)
@@ -45,8 +45,8 @@ module Braintree
45
45
  def self.sale(token, transaction_attributes)
46
46
  Configuration.gateway.transaction.sale(transaction_attributes.merge(
47
47
  :payment_method_token => token,
48
- :options => { :submit_for_settlement => true }
49
- )
48
+ :options => {:submit_for_settlement => true},
49
+ ),
50
50
  )
51
51
  end
52
52