braintree 3.4.0 → 4.3.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.
- checksums.yaml +4 -4
- data/braintree.gemspec +2 -2
- data/lib/braintree.rb +4 -0
- data/lib/braintree/address.rb +1 -0
- data/lib/braintree/apple_pay_card.rb +9 -0
- data/lib/braintree/credit_card_gateway.rb +11 -1
- data/lib/braintree/customer.rb +4 -2
- data/lib/braintree/customer_gateway.rb +2 -0
- data/lib/braintree/dispute.rb +14 -0
- data/lib/braintree/dispute/paypal_message.rb +15 -0
- data/lib/braintree/dispute_search.rb +1 -0
- data/lib/braintree/error_codes.rb +4 -6
- data/lib/braintree/google_pay_card.rb +9 -0
- data/lib/braintree/payment_method_gateway.rb +7 -4
- data/lib/braintree/payment_method_nonce.rb +7 -4
- data/lib/braintree/payment_method_nonce_details.rb +37 -0
- data/lib/braintree/payment_method_nonce_details_payer_info.rb +32 -0
- data/lib/braintree/transaction/paypal_details.rb +2 -0
- data/lib/braintree/transaction_gateway.rb +3 -3
- data/lib/braintree/version.rb +2 -2
- data/lib/braintree/webhook_notification.rb +2 -1
- data/lib/braintree/webhook_testing_gateway.rb +20 -0
- data/lib/braintree/xml/libxml.rb +0 -1
- data/lib/braintree/xml/parser.rb +12 -2
- data/lib/braintree/xml/rexml.rb +70 -0
- data/spec/integration/braintree/address_spec.rb +4 -0
- data/spec/integration/braintree/credit_card_spec.rb +89 -0
- data/spec/integration/braintree/customer_spec.rb +144 -0
- data/spec/integration/braintree/dispute_search_spec.rb +25 -0
- data/spec/integration/braintree/merchant_account_spec.rb +3 -3
- data/spec/integration/braintree/payment_method_nonce_spec.rb +16 -23
- data/spec/integration/braintree/payment_method_spec.rb +131 -0
- data/spec/integration/braintree/transaction_spec.rb +82 -2
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/braintree/credit_card_spec.rb +6 -6
- data/spec/unit/braintree/customer_spec.rb +17 -7
- data/spec/unit/braintree/dispute_search_spec.rb +1 -0
- data/spec/unit/braintree/dispute_spec.rb +26 -1
- data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +31 -0
- data/spec/unit/braintree/payment_method_nonce_details_spec.rb +43 -0
- data/spec/unit/braintree/payment_method_nonce_spec.rb +40 -0
- data/spec/unit/braintree/transaction/paypal_details_spec.rb +4 -0
- data/spec/unit/braintree/transaction_spec.rb +3 -3
- data/spec/unit/braintree/webhook_notification_spec.rb +16 -0
- data/spec/unit/braintree/xml/rexml_spec.rb +51 -0
- metadata +15 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 47a154939f137c75bb981bb87bc53531502190ebd6dc8541e6df267c4692f520
|
4
|
+
data.tar.gz: 8acb4e0255f8b0ae61bcf7749f05b93bb4f09aa451fb5f1951d7605ce2b1f6b5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a00d9aa6efeaf3e218f01470941c218fbcd3f3551f8259af0b2e4acdb55349c9c17ac36fd4e4163216e3569e2fbf6b3e247ba49ecdfea853dc63b9387b921ff9
|
7
|
+
data.tar.gz: 85d512a9b6b445d7a0e17c48b020a9ccbf1491f067ab7d845f7bc554bb9597aea1cd62d965396b86b9f45f06fd2c5707acbb17a848b699ca7500772bcff97656
|
data/braintree.gemspec
CHANGED
@@ -12,8 +12,8 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = "https://www.braintreepayments.com/"
|
13
13
|
s.files = Dir.glob ["README.rdoc", "LICENSE", "lib/**/*.{rb,crt}", "spec/**/*", "*.gemspec"]
|
14
14
|
s.add_dependency "builder", ">= 3.2.4"
|
15
|
-
s.add_dependency "
|
16
|
-
s.required_ruby_version = ">=2.
|
15
|
+
s.add_dependency "rexml", ">= 3.1.9" # Use rexml version associated with minimum supported Ruby version
|
16
|
+
s.required_ruby_version = ">=2.6.0"
|
17
17
|
s.metadata = {
|
18
18
|
"bug_tracker_uri" => "https://github.com/braintree/braintree_ruby/issues",
|
19
19
|
"changelog_uri" => "https://github.com/braintree/braintree_ruby/blob/master/CHANGELOG.md",
|
data/lib/braintree.rb
CHANGED
@@ -59,6 +59,7 @@ require "braintree/discount_gateway"
|
|
59
59
|
require "braintree/dispute"
|
60
60
|
require "braintree/dispute_gateway"
|
61
61
|
require "braintree/dispute/evidence"
|
62
|
+
require "braintree/dispute/paypal_message"
|
62
63
|
require "braintree/dispute/status_history"
|
63
64
|
require "braintree/dispute/transaction"
|
64
65
|
require "braintree/dispute/transaction_details"
|
@@ -87,6 +88,8 @@ require "braintree/payment_instrument_type"
|
|
87
88
|
require "braintree/payment_method"
|
88
89
|
require "braintree/payment_method_gateway"
|
89
90
|
require "braintree/payment_method_nonce"
|
91
|
+
require "braintree/payment_method_nonce_details"
|
92
|
+
require "braintree/payment_method_nonce_details_payer_info"
|
90
93
|
require "braintree/payment_method_nonce_gateway"
|
91
94
|
require "braintree/payment_method_parser"
|
92
95
|
require "braintree/paypal_account"
|
@@ -160,4 +163,5 @@ require "braintree/webhook_testing_gateway"
|
|
160
163
|
require "braintree/xml"
|
161
164
|
require "braintree/xml/generator"
|
162
165
|
require "braintree/xml/libxml"
|
166
|
+
require "braintree/xml/rexml"
|
163
167
|
require "braintree/xml/parser"
|
data/lib/braintree/address.rb
CHANGED
@@ -12,15 +12,24 @@ module Braintree
|
|
12
12
|
|
13
13
|
attr_reader :bin
|
14
14
|
attr_reader :card_type
|
15
|
+
attr_reader :commercial
|
16
|
+
attr_reader :country_of_issuance
|
15
17
|
attr_reader :created_at
|
16
18
|
attr_reader :customer_id
|
19
|
+
attr_reader :debit
|
17
20
|
attr_reader :default
|
21
|
+
attr_reader :durbin_regulated
|
18
22
|
attr_reader :expiration_month
|
19
23
|
attr_reader :expiration_year
|
20
24
|
attr_reader :expired
|
25
|
+
attr_reader :healthcare
|
21
26
|
attr_reader :image_url
|
27
|
+
attr_reader :issuing_bank
|
22
28
|
attr_reader :last_4
|
23
29
|
attr_reader :payment_instrument_name
|
30
|
+
attr_reader :payroll
|
31
|
+
attr_reader :prepaid
|
32
|
+
attr_reader :product_id
|
24
33
|
attr_reader :source_description
|
25
34
|
attr_reader :subscriptions
|
26
35
|
attr_reader :token
|
@@ -79,7 +79,17 @@ module Braintree
|
|
79
79
|
|
80
80
|
def self._signature(type) # :nodoc:
|
81
81
|
billing_address_params = AddressGateway._shared_signature
|
82
|
-
options = [
|
82
|
+
options = [
|
83
|
+
:fail_on_duplicate_payment_method,
|
84
|
+
:make_default,
|
85
|
+
:skip_advanced_fraud_checking,
|
86
|
+
:venmo_sdk_session,
|
87
|
+
:verification_account_type,
|
88
|
+
:verification_amount,
|
89
|
+
:verification_currency_iso_code,
|
90
|
+
:verification_merchant_account_id,
|
91
|
+
:verify_card
|
92
|
+
]
|
83
93
|
signature = [
|
84
94
|
:billing_address_id, :cardholder_name, :cvv, :expiration_date, :expiration_month,
|
85
95
|
:expiration_year, :number, :token, :venmo_sdk_payment_method_code, :device_data,
|
data/lib/braintree/customer.rb
CHANGED
@@ -19,6 +19,7 @@ module Braintree
|
|
19
19
|
attr_reader :paypal_accounts
|
20
20
|
attr_reader :phone
|
21
21
|
attr_reader :samsung_pay_cards
|
22
|
+
attr_reader :tax_identifiers
|
22
23
|
attr_reader :updated_at
|
23
24
|
attr_reader :us_bank_accounts
|
24
25
|
attr_reader :venmo_accounts
|
@@ -90,6 +91,7 @@ module Braintree
|
|
90
91
|
@visa_checkout_cards = (@visa_checkout_cards|| []).map { |pm| VisaCheckoutCard._new gateway, pm }
|
91
92
|
@samsung_pay_cards = (@samsung_pay_cards|| []).map { |pm| SamsungPayCard._new gateway, pm }
|
92
93
|
@addresses = (@addresses || []).map { |addr| Address._new gateway, addr }
|
94
|
+
@tax_identifiers = (@tax_identifiers || []).map { |addr| TaxIdentifier._new gateway, addr }
|
93
95
|
@custom_fields = attributes[:custom_fields].is_a?(Hash) ? attributes[:custom_fields] : {}
|
94
96
|
end
|
95
97
|
|
@@ -124,7 +126,7 @@ module Braintree
|
|
124
126
|
|
125
127
|
def inspect # :nodoc:
|
126
128
|
first = [:id]
|
127
|
-
last = [:addresses, :credit_cards, :paypal_accounts]
|
129
|
+
last = [:addresses, :credit_cards, :paypal_accounts, :tax_identifiers]
|
128
130
|
order = first + (self.class._attributes - first - last) + last
|
129
131
|
nice_attributes = order.map do |attr|
|
130
132
|
"#{attr}: #{send(attr).inspect}"
|
@@ -148,7 +150,7 @@ module Braintree
|
|
148
150
|
def self._attributes # :nodoc:
|
149
151
|
[
|
150
152
|
:addresses, :company, :credit_cards, :email, :fax, :first_name, :id, :last_name, :phone, :website,
|
151
|
-
:created_at, :updated_at
|
153
|
+
:created_at, :updated_at, :tax_identifiers
|
152
154
|
]
|
153
155
|
end
|
154
156
|
|
@@ -80,6 +80,7 @@ module Braintree
|
|
80
80
|
{:risk_data => [:customer_browser, :customer_ip]},
|
81
81
|
{:credit_card => credit_card_signature},
|
82
82
|
{:paypal_account => paypal_account_signature},
|
83
|
+
{:tax_identifiers => [:country_code, :identifier]},
|
83
84
|
{:options => options},
|
84
85
|
{:custom_fields => :_any_key_}
|
85
86
|
]
|
@@ -141,6 +142,7 @@ module Braintree
|
|
141
142
|
:company, :email, :fax, :first_name, :id, :last_name, :phone, :website,
|
142
143
|
:device_data, :payment_method_nonce, :default_payment_method_token,
|
143
144
|
{:credit_card => credit_card_signature},
|
145
|
+
{:tax_identifiers => [:country_code, :identifier]},
|
144
146
|
{:options => options},
|
145
147
|
{:custom_fields => :_any_key_}
|
146
148
|
]
|
data/lib/braintree/dispute.rb
CHANGED
@@ -7,6 +7,7 @@ module Braintree
|
|
7
7
|
attr_reader :amount_disputed
|
8
8
|
attr_reader :amount_won
|
9
9
|
attr_reader :case_number
|
10
|
+
attr_reader :chargeback_protection_level
|
10
11
|
attr_reader :created_at
|
11
12
|
attr_reader :currency_iso_code
|
12
13
|
attr_reader :date_opened
|
@@ -17,6 +18,7 @@ module Braintree
|
|
17
18
|
attr_reader :kind
|
18
19
|
attr_reader :merchant_account_id
|
19
20
|
attr_reader :original_dispute_id
|
21
|
+
attr_reader :paypal_messages
|
20
22
|
attr_reader :processor_comments
|
21
23
|
attr_reader :reason
|
22
24
|
attr_reader :reason_code
|
@@ -65,6 +67,14 @@ module Braintree
|
|
65
67
|
All = constants.map { |c| const_get(c) }
|
66
68
|
end
|
67
69
|
|
70
|
+
module ChargebackProtectionLevel
|
71
|
+
Effortless = "effortless"
|
72
|
+
Standard = "standard"
|
73
|
+
NotProtected = "not_protected"
|
74
|
+
|
75
|
+
All = constants.map { |c| const_get(c) }
|
76
|
+
end
|
77
|
+
|
68
78
|
class << self
|
69
79
|
protected :new
|
70
80
|
def _new(*args) # :nodoc:
|
@@ -114,6 +124,10 @@ module Braintree
|
|
114
124
|
Braintree::Dispute::Evidence.new(record)
|
115
125
|
end unless evidence.nil?
|
116
126
|
|
127
|
+
@paypal_messages = paypal_messages.map do |record|
|
128
|
+
Braintree::Dispute::PayPalMessage.new(record)
|
129
|
+
end unless paypal_messages.nil?
|
130
|
+
|
117
131
|
@transaction_details = TransactionDetails.new(transaction)
|
118
132
|
@transaction = Transaction.new(transaction)
|
119
133
|
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module Braintree
|
2
|
+
class Dispute
|
3
|
+
class PayPalMessage # :nodoc:
|
4
|
+
include BaseModule
|
5
|
+
|
6
|
+
attr_reader :message,
|
7
|
+
:sender,
|
8
|
+
:sent_at
|
9
|
+
|
10
|
+
def initialize(attributes)
|
11
|
+
set_instance_variables_from_hash attributes unless attributes.nil?
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -8,6 +8,7 @@ module Braintree
|
|
8
8
|
:transaction_id,
|
9
9
|
)
|
10
10
|
|
11
|
+
multiple_value_field :chargeback_protection_level, :allows => Dispute::ChargebackProtectionLevel::All
|
11
12
|
multiple_value_field :kind, :allows => Dispute::Kind::All
|
12
13
|
multiple_value_field :merchant_account_id
|
13
14
|
multiple_value_field :reason, :allows => Dispute::Reason::All
|
@@ -312,6 +312,7 @@ module Braintree
|
|
312
312
|
DiscountAmountCannotBeNegative = "915160"
|
313
313
|
DiscountAmountFormatIsInvalid = "915159"
|
314
314
|
DiscountAmountIsTooLarge = "915161"
|
315
|
+
ExchangeRateQuoteIdTooLong = "915229"
|
315
316
|
FailedAuthAdjustmentAllowRetry = "95603"
|
316
317
|
FailedAuthAdjustmentHardDecline = "95602"
|
317
318
|
FinalAuthSubmitForSettlementForDifferentAmount = "95601"
|
@@ -385,6 +386,7 @@ module Braintree
|
|
385
386
|
SubscriptionStatusMustBePastDue = "91531"
|
386
387
|
TaxAmountCannotBeNegative = "81534"
|
387
388
|
TaxAmountFormatIsInvalid = "81535"
|
389
|
+
TaxAmountIsRequiredForAibSwedish = "815224"
|
388
390
|
TaxAmountIsTooLarge = "81536"
|
389
391
|
ThreeDSecureAuthenticationFailed = "81571"
|
390
392
|
ThreeDSecureAuthenticationIdDoesntMatchNonceThreeDSecureAuthentication = "915198"
|
@@ -517,8 +519,6 @@ module Braintree
|
|
517
519
|
end
|
518
520
|
|
519
521
|
module ExternalVault
|
520
|
-
# NEXT_MAJOR_VERSION remove this validation error as it is no longer returned by the gateway
|
521
|
-
CardTypeIsInvalid = "915178"
|
522
522
|
PreviousNetworkTransactionIdIsInvalid = "915179"
|
523
523
|
StatusIsInvalid = "915175"
|
524
524
|
StatusWithPreviousNetworkTransactionIdIsInvalid = "915177"
|
@@ -705,13 +705,13 @@ module Braintree
|
|
705
705
|
end
|
706
706
|
|
707
707
|
module PaymentMethod
|
708
|
-
CannotForwardPaymentMethodType = "
|
708
|
+
CannotForwardPaymentMethodType = "93106"
|
709
709
|
CustomerIdIsInvalid = "93105"
|
710
710
|
CustomerIdIsRequired = "93104"
|
711
711
|
NonceIsInvalid = "93102"
|
712
712
|
NonceIsRequired = "93103"
|
713
713
|
PaymentMethodNoLongerSupported = "93117"
|
714
|
-
PaymentMethodNonceConsumed = "
|
714
|
+
PaymentMethodNonceConsumed = "93107"
|
715
715
|
PaymentMethodNonceLocked = "93109"
|
716
716
|
PaymentMethodNonceUnknown = "93108"
|
717
717
|
PaymentMethodParamsAreRequired = "93101"
|
@@ -786,8 +786,6 @@ module Braintree
|
|
786
786
|
end
|
787
787
|
|
788
788
|
module RiskData
|
789
|
-
# NEXT_MAJOR_VERSION Remove CustomerBrowserIsTooLong (this validation is no longer applied)
|
790
|
-
CustomerBrowserIsTooLong = "94701"
|
791
789
|
CustomerDeviceIdIsTooLong = "94702"
|
792
790
|
CustomerLocationZipInvalidCharacters = "94703"
|
793
791
|
CustomerLocationZipIsInvalid = "94704"
|
@@ -3,13 +3,22 @@ module Braintree
|
|
3
3
|
include BaseModule # :nodoc:
|
4
4
|
|
5
5
|
attr_reader :bin
|
6
|
+
attr_reader :commercial
|
7
|
+
attr_reader :country_of_issuance
|
6
8
|
attr_reader :created_at
|
7
9
|
attr_reader :customer_id
|
10
|
+
attr_reader :debit
|
8
11
|
attr_reader :default
|
12
|
+
attr_reader :durbin_regulated
|
9
13
|
attr_reader :expiration_month
|
10
14
|
attr_reader :expiration_year
|
11
15
|
attr_reader :google_transaction_id
|
16
|
+
attr_reader :healthcare
|
12
17
|
attr_reader :image_url
|
18
|
+
attr_reader :issuing_bank
|
19
|
+
attr_reader :payroll
|
20
|
+
attr_reader :prepaid
|
21
|
+
attr_reader :product_id
|
13
22
|
attr_reader :source_card_last_4
|
14
23
|
attr_reader :source_card_type
|
15
24
|
attr_reader :source_description
|
@@ -148,10 +148,15 @@ module Braintree
|
|
148
148
|
billing_address_params = AddressGateway._shared_signature
|
149
149
|
paypal_options_shipping_signature = AddressGateway._shared_signature
|
150
150
|
options = [
|
151
|
-
:make_default,
|
152
|
-
:
|
151
|
+
:make_default,
|
152
|
+
:skip_advanced_fraud_checking,
|
153
|
+
:us_bank_account_verification_method,
|
154
|
+
:venmo_sdk_session,
|
153
155
|
:verification_account_type,
|
156
|
+
:verification_amount,
|
154
157
|
:verification_currency_iso_code,
|
158
|
+
:verification_merchant_account_id,
|
159
|
+
:verify_card,
|
155
160
|
:paypal => [
|
156
161
|
:payee_email,
|
157
162
|
:order_id,
|
@@ -186,8 +191,6 @@ module Braintree
|
|
186
191
|
options << :fail_on_duplicate_payment_method
|
187
192
|
signature << :customer_id
|
188
193
|
signature << :paypal_refresh_token
|
189
|
-
# NEXT_MAJOR_VERSION remove this from the signature
|
190
|
-
signature << :paypal_vault_without_upgrade
|
191
194
|
when :update
|
192
195
|
billing_address_params << {:options => [:update_existing]}
|
193
196
|
else
|
@@ -15,6 +15,7 @@ module Braintree
|
|
15
15
|
end
|
16
16
|
|
17
17
|
attr_reader :bin_data
|
18
|
+
attr_reader :default
|
18
19
|
attr_reader :details
|
19
20
|
attr_reader :nonce
|
20
21
|
attr_reader :three_d_secure_info
|
@@ -23,14 +24,16 @@ module Braintree
|
|
23
24
|
|
24
25
|
def initialize(gateway, attributes) # :nodoc:
|
25
26
|
@gateway = gateway
|
26
|
-
|
27
|
-
@
|
28
|
-
@details = attributes.fetch(:details)
|
29
|
-
@authentication_insight = attributes.fetch(:authentication_insight, nil)
|
27
|
+
set_instance_variables_from_hash(attributes)
|
28
|
+
@details = PaymentMethodNonceDetails.new(attributes[:details]) if attributes[:details]
|
30
29
|
@three_d_secure_info = ThreeDSecureInfo.new(attributes[:three_d_secure_info]) if attributes[:three_d_secure_info]
|
31
30
|
@bin_data = BinData.new(attributes[:bin_data]) if attributes[:bin_data]
|
32
31
|
end
|
33
32
|
|
33
|
+
def default?
|
34
|
+
@default
|
35
|
+
end
|
36
|
+
|
34
37
|
def to_s # :nodoc:
|
35
38
|
nonce
|
36
39
|
end
|
@@ -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
|
@@ -24,6 +24,8 @@ module Braintree
|
|
24
24
|
attr_reader :refund_from_transaction_fee_currency_iso_code
|
25
25
|
attr_reader :refund_id
|
26
26
|
attr_reader :seller_protection_status
|
27
|
+
attr_reader :tax_id
|
28
|
+
attr_reader :tax_id_type
|
27
29
|
attr_reader :token
|
28
30
|
attr_reader :transaction_fee_amount
|
29
31
|
attr_reader :transaction_fee_currency_iso_code
|
@@ -61,7 +61,7 @@ module Braintree
|
|
61
61
|
end
|
62
62
|
|
63
63
|
def find(id)
|
64
|
-
raise ArgumentError if id.nil? || id.strip.to_s == ""
|
64
|
+
raise ArgumentError, "id can not be empty" if id.nil? || id.strip.to_s == ""
|
65
65
|
response = @config.http.get("#{@config.base_merchant_path}/transactions/#{id}")
|
66
66
|
Transaction._new(@gateway, response[:transaction])
|
67
67
|
rescue NotFoundError
|
@@ -192,10 +192,10 @@ module Braintree
|
|
192
192
|
:shared_shipping_address_id, :shipping_address_id, :shipping_amount,
|
193
193
|
:ships_from_postal_code, :tax_amount, :tax_exempt, :three_d_secure_authentication_id,
|
194
194
|
:three_d_secure_token, :transaction_source, :type, :venmo_sdk_payment_method_code,
|
195
|
-
:sca_exemption, :currency_iso_code,
|
195
|
+
:sca_exemption, :currency_iso_code, :exchange_rate_quote_id,
|
196
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]},
|
197
197
|
{:risk_data => [:customer_browser, :customer_device_id, :customer_ip, :customer_location_zip, :customer_tenure]},
|
198
|
-
{: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]}]},
|
199
199
|
{:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
|
200
200
|
{
|
201
201
|
:billing => AddressGateway._shared_signature
|