braintree 4.14.0 → 4.16.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/braintree/account_updater_daily_report.rb +3 -3
- data/lib/braintree/ach_mandate.rb +1 -1
- data/lib/braintree/add_on_gateway.rb +1 -1
- data/lib/braintree/address.rb +4 -4
- data/lib/braintree/address_gateway.rb +5 -5
- data/lib/braintree/advanced_search.rb +10 -10
- data/lib/braintree/apple_pay.rb +3 -3
- data/lib/braintree/apple_pay_card.rb +3 -3
- data/lib/braintree/apple_pay_options.rb +3 -3
- data/lib/braintree/authorization_adjustment.rb +3 -3
- data/lib/braintree/base_module.rb +1 -1
- data/lib/braintree/bin_data.rb +2 -2
- data/lib/braintree/client_token_gateway.rb +1 -1
- data/lib/braintree/configuration.rb +22 -22
- data/lib/braintree/connected_merchant_paypal_status_changed.rb +1 -1
- data/lib/braintree/connected_merchant_status_transitioned.rb +1 -1
- data/lib/braintree/credit_card.rb +22 -9
- data/lib/braintree/credit_card_gateway.rb +23 -11
- data/lib/braintree/credit_card_verification.rb +3 -3
- data/lib/braintree/credit_card_verification_search.rb +1 -1
- data/lib/braintree/customer.rb +5 -9
- data/lib/braintree/customer_gateway.rb +7 -7
- data/lib/braintree/customer_search.rb +1 -1
- data/lib/braintree/descriptor.rb +1 -1
- data/lib/braintree/digest.rb +1 -1
- data/lib/braintree/disbursement.rb +5 -5
- data/lib/braintree/discount_gateway.rb +1 -1
- data/lib/braintree/dispute/evidence.rb +1 -1
- data/lib/braintree/dispute/paypal_message.rb +1 -1
- data/lib/braintree/dispute/status_history.rb +1 -1
- data/lib/braintree/dispute/transaction.rb +1 -1
- data/lib/braintree/dispute/transaction_details.rb +1 -1
- data/lib/braintree/dispute.rb +3 -3
- data/lib/braintree/dispute_gateway.rb +1 -1
- data/lib/braintree/dispute_search.rb +1 -1
- data/lib/braintree/document_upload.rb +2 -2
- data/lib/braintree/document_upload_gateway.rb +3 -3
- data/lib/braintree/enriched_customer_data.rb +2 -2
- data/lib/braintree/error_result.rb +2 -3
- data/lib/braintree/errors.rb +3 -3
- data/lib/braintree/exceptions.rb +1 -2
- data/lib/braintree/exchange_rate.rb +2 -2
- data/lib/braintree/exchange_rate_quote.rb +3 -3
- data/lib/braintree/exchange_rate_quote_gateway.rb +1 -1
- data/lib/braintree/exchange_rate_quote_input.rb +3 -3
- data/lib/braintree/exchange_rate_quote_request.rb +3 -3
- data/lib/braintree/exchange_rate_quote_response.rb +3 -3
- data/lib/braintree/facilitated_details.rb +1 -1
- data/lib/braintree/facilitator_details.rb +1 -1
- data/lib/braintree/google_pay_card.rb +3 -3
- data/lib/braintree/granted_payment_instrument_update.rb +1 -1
- data/lib/braintree/graphql_client.rb +1 -1
- data/lib/braintree/http.rb +1 -1
- data/lib/braintree/local_payment_completed.rb +2 -2
- data/lib/braintree/local_payment_expired.rb +2 -2
- data/lib/braintree/local_payment_funded.rb +2 -2
- data/lib/braintree/local_payment_reversed.rb +2 -2
- data/lib/braintree/merchant.rb +3 -3
- data/lib/braintree/merchant_account.rb +2 -2
- data/lib/braintree/merchant_account_gateway.rb +9 -9
- data/lib/braintree/meta_checkout_card.rb +89 -0
- data/lib/braintree/meta_checkout_token.rb +88 -0
- data/lib/braintree/modification.rb +3 -3
- data/lib/braintree/oauth_credentials.rb +3 -3
- data/lib/braintree/paginated_collection.rb +2 -2
- data/lib/braintree/paginated_result.rb +1 -1
- data/lib/braintree/payment_instrument_type.rb +2 -0
- data/lib/braintree/payment_method_customer_data_updated_metadata.rb +2 -2
- data/lib/braintree/payment_method_gateway.rb +23 -10
- data/lib/braintree/payment_method_nonce.rb +4 -4
- data/lib/braintree/payment_method_nonce_details.rb +1 -1
- data/lib/braintree/payment_method_nonce_details_payer_info.rb +1 -1
- data/lib/braintree/payment_method_nonce_gateway.rb +1 -1
- data/lib/braintree/paypal_account.rb +1 -2
- data/lib/braintree/paypal_account_gateway.rb +5 -5
- data/lib/braintree/plan.rb +1 -1
- data/lib/braintree/plan_gateway.rb +2 -2
- data/lib/braintree/resource_collection.rb +2 -2
- data/lib/braintree/revoked_payment_method_metadata.rb +1 -1
- data/lib/braintree/risk_data.rb +1 -1
- data/lib/braintree/samsung_pay_card.rb +5 -5
- data/lib/braintree/sepa_direct_debit_account.rb +2 -2
- data/lib/braintree/sepa_direct_debit_account_nonce_details.rb +1 -1
- data/lib/braintree/settlement_batch_summary_gateway.rb +1 -1
- data/lib/braintree/sha256_digest.rb +1 -1
- data/lib/braintree/subscription/status_details.rb +1 -1
- data/lib/braintree/subscription.rb +2 -2
- data/lib/braintree/subscription_gateway.rb +6 -6
- data/lib/braintree/subscription_search.rb +1 -1
- data/lib/braintree/successful_result.rb +2 -2
- data/lib/braintree/test/credit_card.rb +7 -10
- data/lib/braintree/test/merchant_account.rb +1 -1
- data/lib/braintree/test/nonce.rb +4 -0
- data/lib/braintree/test/transaction_amounts.rb +2 -3
- data/lib/braintree/test/venmo_sdk.rb +2 -0
- data/lib/braintree/testing_gateway.rb +1 -1
- data/lib/braintree/three_d_secure_info.rb +1 -1
- data/lib/braintree/transaction/address_details.rb +1 -1
- data/lib/braintree/transaction/credit_card_details.rb +4 -1
- data/lib/braintree/transaction/customer_details.rb +1 -1
- data/lib/braintree/transaction/disbursement_details.rb +1 -1
- data/lib/braintree/transaction/local_payment_details.rb +2 -0
- data/lib/braintree/transaction/meta_checkout_card_details.rb +52 -0
- data/lib/braintree/transaction/meta_checkout_token_details.rb +54 -0
- data/lib/braintree/transaction/samsung_pay_card_details.rb +1 -1
- data/lib/braintree/transaction/sepa_direct_debit_account_details.rb +1 -1
- data/lib/braintree/transaction/status_details.rb +1 -1
- data/lib/braintree/transaction/subscription_details.rb +1 -1
- data/lib/braintree/transaction/us_bank_account_details.rb +1 -1
- data/lib/braintree/transaction/visa_checkout_card_details.rb +1 -1
- data/lib/braintree/transaction.rb +27 -20
- data/lib/braintree/transaction_gateway.rb +23 -12
- data/lib/braintree/transaction_line_item.rb +2 -2
- data/lib/braintree/transaction_line_item_gateway.rb +1 -1
- data/lib/braintree/transaction_review.rb +1 -1
- data/lib/braintree/transaction_search.rb +7 -6
- data/lib/braintree/unknown_payment_method.rb +1 -1
- data/lib/braintree/us_bank_account.rb +2 -2
- data/lib/braintree/us_bank_account_verification.rb +23 -15
- data/lib/braintree/us_bank_account_verification_search.rb +1 -1
- data/lib/braintree/util.rb +3 -3
- data/lib/braintree/validation_error.rb +1 -1
- data/lib/braintree/validation_error_collection.rb +3 -3
- data/lib/braintree/venmo_account.rb +3 -3
- data/lib/braintree/venmo_profile_data.rb +6 -4
- data/lib/braintree/version.rb +1 -1
- data/lib/braintree/visa_checkout_card.rb +7 -7
- data/lib/braintree/webhook_notification.rb +3 -2
- data/lib/braintree/webhook_notification_gateway.rb +3 -3
- data/lib/braintree/webhook_testing.rb +1 -1
- data/lib/braintree/webhook_testing_gateway.rb +18 -1
- data/lib/braintree/xml/generator.rb +1 -1
- data/lib/braintree/xml/libxml.rb +1 -1
- data/lib/braintree/xml/parser.rb +2 -2
- data/lib/braintree/xml/rexml.rb +2 -2
- data/lib/braintree/xml.rb +1 -1
- data/lib/braintree.rb +4 -1
- data/spec/integration/braintree/add_on_spec.rb +9 -9
- data/spec/integration/braintree/address_spec.rb +69 -69
- data/spec/integration/braintree/advanced_search_spec.rb +45 -45
- data/spec/integration/braintree/apple_pay_spec.rb +8 -8
- data/spec/integration/braintree/client_api/client_token_spec.rb +15 -15
- data/spec/integration/braintree/credit_card_spec.rb +223 -223
- data/spec/integration/braintree/credit_card_verification_search_spec.rb +16 -16
- data/spec/integration/braintree/credit_card_verification_spec.rb +52 -52
- data/spec/integration/braintree/customer_search_spec.rb +20 -20
- data/spec/integration/braintree/customer_spec.rb +313 -313
- data/spec/integration/braintree/disbursement_spec.rb +2 -2
- data/spec/integration/braintree/discount_spec.rb +9 -9
- data/spec/integration/braintree/dispute_search_spec.rb +0 -1
- data/spec/integration/braintree/dispute_spec.rb +87 -87
- data/spec/integration/braintree/document_upload_spec.rb +17 -17
- data/spec/integration/braintree/error_codes_spec.rb +2 -2
- data/spec/integration/braintree/http_spec.rb +28 -28
- data/spec/integration/braintree/merchant_account_spec.rb +127 -127
- data/spec/integration/braintree/merchant_spec.rb +103 -103
- data/spec/integration/braintree/oauth_spec.rb +61 -61
- data/spec/integration/braintree/payment_method_nonce_spec.rb +89 -69
- data/spec/integration/braintree/payment_method_spec.rb +389 -389
- data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +150 -78
- data/spec/integration/braintree/paypal_account_spec.rb +38 -38
- data/spec/integration/braintree/plan_spec.rb +15 -15
- data/spec/integration/braintree/samsung_pay_card_spec.rb +65 -65
- data/spec/integration/braintree/sepa_direct_debit_account_spec.rb +51 -51
- data/spec/integration/braintree/settlement_batch_summary_spec.rb +11 -11
- data/spec/integration/braintree/subscription_spec.rb +364 -364
- data/spec/integration/braintree/test/transaction_amounts_spec.rb +2 -2
- data/spec/integration/braintree/test_transaction_spec.rb +19 -19
- data/spec/integration/braintree/transaction_line_item_spec.rb +6 -6
- data/spec/integration/braintree/transaction_search_spec.rb +225 -165
- data/spec/integration/braintree/transaction_spec.rb +1502 -1210
- data/spec/integration/braintree/transaction_us_bank_account_spec.rb +32 -32
- data/spec/integration/braintree/us_bank_account_spec.rb +30 -30
- data/spec/integration/braintree/us_bank_account_verification_search_spec.rb +18 -18
- data/spec/integration/braintree/us_bank_account_verification_spec.rb +33 -33
- data/spec/integration/braintree/visa_checkout_card_spec.rb +57 -57
- data/spec/spec_helper.rb +9 -8
- data/spec/unit/braintree/address_spec.rb +8 -8
- data/spec/unit/braintree/base_module_spec.rb +4 -4
- data/spec/unit/braintree/client_token_spec.rb +2 -2
- data/spec/unit/braintree/configuration_spec.rb +57 -57
- data/spec/unit/braintree/credentials_parser_spec.rb +6 -6
- data/spec/unit/braintree/credit_card_spec.rb +31 -29
- data/spec/unit/braintree/credit_card_verification_gateway_spec.rb +28 -28
- data/spec/unit/braintree/credit_card_verification_search_spec.rb +9 -9
- data/spec/unit/braintree/credit_card_verification_spec.rb +17 -17
- data/spec/unit/braintree/customer_spec.rb +41 -40
- data/spec/unit/braintree/digest_spec.rb +5 -5
- data/spec/unit/braintree/disbursement_spec.rb +11 -11
- data/spec/unit/braintree/dispute_search_spec.rb +2 -2
- data/spec/unit/braintree/dispute_spec.rb +56 -56
- data/spec/unit/braintree/document_upload_spec.rb +8 -8
- data/spec/unit/braintree/enriched_customer_data_spec.rb +11 -2
- data/spec/unit/braintree/error_result_spec.rb +5 -5
- data/spec/unit/braintree/errors_spec.rb +9 -9
- data/spec/unit/braintree/http_spec.rb +9 -9
- data/spec/unit/braintree/local_payment_completed_spec.rb +11 -11
- data/spec/unit/braintree/local_payment_expired_spec.rb +2 -2
- data/spec/unit/braintree/local_payment_funded_spec.rb +6 -6
- data/spec/unit/braintree/merchant_account_spec.rb +4 -4
- data/spec/unit/braintree/meta_checkout_card_details_spec.rb +60 -0
- data/spec/unit/braintree/meta_checkout_card_spec.rb +60 -0
- data/spec/unit/braintree/meta_checkout_token_details_spec.rb +63 -0
- data/spec/unit/braintree/meta_checkout_token_spec.rb +63 -0
- data/spec/unit/braintree/modification_spec.rb +1 -1
- data/spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb +6 -6
- data/spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb +7 -7
- data/spec/unit/braintree/payment_method_nonce_details_spec.rb +14 -14
- data/spec/unit/braintree/payment_method_spec.rb +19 -19
- data/spec/unit/braintree/paypal_account_spec.rb +4 -4
- data/spec/unit/braintree/resource_collection_spec.rb +7 -7
- data/spec/unit/braintree/sepa_debit_account_nonce_details_spec.rb +1 -1
- data/spec/unit/braintree/sha256_digest_spec.rb +1 -1
- data/spec/unit/braintree/signature_service_spec.rb +2 -2
- data/spec/unit/braintree/subscription_search_spec.rb +17 -17
- data/spec/unit/braintree/subscription_spec.rb +8 -8
- data/spec/unit/braintree/successful_result_spec.rb +5 -5
- data/spec/unit/braintree/three_d_secure_info_spec.rb +20 -20
- data/spec/unit/braintree/transaction/credit_card_details_spec.rb +5 -5
- data/spec/unit/braintree/transaction/customer_details_spec.rb +1 -1
- data/spec/unit/braintree/transaction/deposit_details_spec.rb +2 -2
- data/spec/unit/braintree/transaction/local_payment_details_spec.rb +30 -0
- data/spec/unit/braintree/transaction_gateway_spec.rb +39 -7
- data/spec/unit/braintree/transaction_search_spec.rb +2 -2
- data/spec/unit/braintree/transaction_spec.rb +101 -93
- data/spec/unit/braintree/unknown_payment_method_spec.rb +4 -4
- data/spec/unit/braintree/us_bank_account_spec.rb +2 -2
- data/spec/unit/braintree/us_bank_account_verification_search_spec.rb +7 -7
- data/spec/unit/braintree/us_bank_account_verification_spec.rb +12 -7
- data/spec/unit/braintree/util_spec.rb +27 -27
- data/spec/unit/braintree/validation_error_collection_spec.rb +34 -34
- data/spec/unit/braintree/validation_error_spec.rb +4 -4
- data/spec/unit/braintree/venmo_profile_data_spec.rb +16 -5
- data/spec/unit/braintree/webhook_notification_spec.rb +206 -191
- data/spec/unit/braintree/xml/libxml_spec.rb +5 -5
- data/spec/unit/braintree/xml/parser_spec.rb +8 -8
- data/spec/unit/braintree/xml/rexml_spec.rb +5 -5
- data/spec/unit/braintree/xml_spec.rb +17 -17
- data/spec/unit/braintree_spec.rb +2 -2
- metadata +11 -2
data/lib/braintree/risk_data.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
module Braintree
|
2
2
|
class SamsungPayCard
|
3
|
-
include BaseModule
|
3
|
+
include BaseModule
|
4
4
|
include Braintree::Util::TokenEquality
|
5
5
|
|
6
6
|
attr_reader :billing_address
|
@@ -29,7 +29,7 @@ module Braintree
|
|
29
29
|
attr_reader :unique_number_identifier
|
30
30
|
attr_reader :updated_at
|
31
31
|
|
32
|
-
def initialize(gateway, attributes)
|
32
|
+
def initialize(gateway, attributes)
|
33
33
|
@gateway = gateway
|
34
34
|
set_instance_variables_from_hash(attributes)
|
35
35
|
@billing_address = attributes[:billing_address] ? Address._new(@gateway, attributes[:billing_address]) : nil
|
@@ -49,7 +49,7 @@ module Braintree
|
|
49
49
|
@expired
|
50
50
|
end
|
51
51
|
|
52
|
-
def inspect
|
52
|
+
def inspect
|
53
53
|
first = [:token]
|
54
54
|
order = first + (self.class._attributes - first)
|
55
55
|
nice_attributes = order.map do |attr|
|
@@ -66,7 +66,7 @@ module Braintree
|
|
66
66
|
protected :new
|
67
67
|
end
|
68
68
|
|
69
|
-
def self._attributes
|
69
|
+
def self._attributes
|
70
70
|
[
|
71
71
|
:billing_address, :bin, :cardholder_name, :card_type, :created_at, :customer_id,
|
72
72
|
:customer_location, :expiration_month, :expiration_year,
|
@@ -76,7 +76,7 @@ module Braintree
|
|
76
76
|
]
|
77
77
|
end
|
78
78
|
|
79
|
-
def self._new(*args)
|
79
|
+
def self._new(*args)
|
80
80
|
self.new(*args)
|
81
81
|
end
|
82
82
|
end
|
@@ -17,7 +17,7 @@ module Braintree
|
|
17
17
|
attr_reader :updated_at
|
18
18
|
attr_reader :view_mandate_url
|
19
19
|
|
20
|
-
def initialize(gateway, attributes)
|
20
|
+
def initialize(gateway, attributes)
|
21
21
|
@gateway = gateway
|
22
22
|
@subscriptions = (@subscriptions || []).map { |subscription_hash| Subscription._new(@gateway, subscription_hash) }
|
23
23
|
set_instance_variables_from_hash(attributes)
|
@@ -31,7 +31,7 @@ module Braintree
|
|
31
31
|
protected :new
|
32
32
|
end
|
33
33
|
|
34
|
-
def self._new(*args)
|
34
|
+
def self._new(*args)
|
35
35
|
self.new(*args)
|
36
36
|
end
|
37
37
|
|
@@ -91,7 +91,7 @@ module Braintree
|
|
91
91
|
Configuration.gateway.subscription.update!(*args)
|
92
92
|
end
|
93
93
|
|
94
|
-
def initialize(gateway, attributes)
|
94
|
+
def initialize(gateway, attributes)
|
95
95
|
@gateway = gateway
|
96
96
|
set_instance_variables_from_hash(attributes)
|
97
97
|
@balance = Util.to_big_decimal(balance)
|
@@ -114,7 +114,7 @@ module Braintree
|
|
114
114
|
|
115
115
|
class << self
|
116
116
|
protected :new
|
117
|
-
def _new(*args)
|
117
|
+
def _new(*args)
|
118
118
|
self.new(*args)
|
119
119
|
end
|
120
120
|
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Braintree
|
2
|
-
class SubscriptionGateway
|
2
|
+
class SubscriptionGateway
|
3
3
|
include BaseModule
|
4
4
|
|
5
5
|
def initialize(gateway)
|
@@ -70,7 +70,7 @@ module Braintree
|
|
70
70
|
return_object_or_raise(:subscription) { update(*args) }
|
71
71
|
end
|
72
72
|
|
73
|
-
def self._create_signature
|
73
|
+
def self._create_signature
|
74
74
|
[
|
75
75
|
:billing_day_of_month,
|
76
76
|
:first_billing_date,
|
@@ -94,7 +94,7 @@ module Braintree
|
|
94
94
|
] + _add_on_discount_signature
|
95
95
|
end
|
96
96
|
|
97
|
-
def self._update_signature
|
97
|
+
def self._update_signature
|
98
98
|
[
|
99
99
|
:id,
|
100
100
|
:merchant_account_id,
|
@@ -114,7 +114,7 @@ module Braintree
|
|
114
114
|
] + _add_on_discount_signature
|
115
115
|
end
|
116
116
|
|
117
|
-
def self._add_on_discount_signature
|
117
|
+
def self._add_on_discount_signature
|
118
118
|
[
|
119
119
|
{
|
120
120
|
:add_ons => [
|
@@ -133,7 +133,7 @@ module Braintree
|
|
133
133
|
]
|
134
134
|
end
|
135
135
|
|
136
|
-
def _do_create(path, params)
|
136
|
+
def _do_create(path, params)
|
137
137
|
response = @config.http.post("#{@config.base_merchant_path}#{path}", params)
|
138
138
|
if response[:subscription]
|
139
139
|
SuccessfulResult.new(:subscription => Subscription._new(@gateway, response[:subscription]))
|
@@ -144,7 +144,7 @@ module Braintree
|
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
|
-
def _fetch_subscriptions(search, ids)
|
147
|
+
def _fetch_subscriptions(search, ids)
|
148
148
|
search.ids.in ids
|
149
149
|
response = @config.http.post("#{@config.base_merchant_path}/subscriptions/advanced_search", {:search => search.to_hash})
|
150
150
|
attributes = response[:subscriptions]
|
@@ -25,7 +25,7 @@ module Braintree
|
|
25
25
|
attr_reader :transaction
|
26
26
|
attr_reader :us_bank_account_verification
|
27
27
|
|
28
|
-
def initialize(attributes = {})
|
28
|
+
def initialize(attributes = {})
|
29
29
|
@attrs = attributes.keys
|
30
30
|
attributes.each do |key, value|
|
31
31
|
instance_variable_set("@#{key}", value)
|
@@ -33,7 +33,7 @@ module Braintree
|
|
33
33
|
@credit_card_verification = @verification
|
34
34
|
end
|
35
35
|
|
36
|
-
def inspect
|
36
|
+
def inspect
|
37
37
|
inspected_attributes = @attrs.map { |attr| "#{attr}:#{send(attr).inspect}" }
|
38
38
|
"#<#{self.class} #{inspected_attributes.join(" ")}>"
|
39
39
|
end
|
@@ -1,8 +1,5 @@
|
|
1
1
|
module Braintree
|
2
|
-
module Test
|
3
|
-
# The constants contained in the Braintree::Test::CreditCardNumbers module provide
|
4
|
-
# credit card numbers that should be used when working in the sandbox environment. The sandbox
|
5
|
-
# will not accept any credit card numbers other than the ones listed below.
|
2
|
+
module Test
|
6
3
|
module CreditCardNumbers
|
7
4
|
module CardTypeIndicators
|
8
5
|
Prepaid = "4111111111111210"
|
@@ -18,16 +15,16 @@ module Braintree
|
|
18
15
|
end
|
19
16
|
|
20
17
|
AmExes = %w[378282246310005 371449635398431 378734493671000]
|
21
|
-
CarteBlanches = %w[30569309025904]
|
22
|
-
DinersClubs = %w[38520000023237]
|
18
|
+
CarteBlanches = %w[30569309025904]
|
19
|
+
DinersClubs = %w[38520000023237]
|
23
20
|
|
24
21
|
Discover = "6011111111111117"
|
25
22
|
Discovers = %w[6011111111111117 6011000990139424]
|
26
|
-
JCBs = %w[3530111333300000 3566002020360505]
|
23
|
+
JCBs = %w[3530111333300000 3566002020360505]
|
27
24
|
|
28
|
-
Maestro = "6304000000000000"
|
25
|
+
Maestro = "6304000000000000"
|
29
26
|
MasterCard = "5555555555554444"
|
30
|
-
MasterCardInternational = "5105105105105100"
|
27
|
+
MasterCardInternational = "5105105105105100"
|
31
28
|
|
32
29
|
MasterCards = %w[5105105105105100 5555555555554444]
|
33
30
|
|
@@ -37,7 +34,7 @@ module Braintree
|
|
37
34
|
|
38
35
|
Visa = "4012888888881881"
|
39
36
|
VisaCountryOfIssuanceIE = "4023490000000008"
|
40
|
-
VisaInternational = "4009348888881881"
|
37
|
+
VisaInternational = "4009348888881881"
|
41
38
|
VisaPrepaid = "4500600000000061"
|
42
39
|
|
43
40
|
Fraud = "4000111111111511"
|
data/lib/braintree/test/nonce.rb
CHANGED
@@ -18,6 +18,8 @@ module Braintree
|
|
18
18
|
GooglePayVisa = "fake-android-pay-visa-nonce"
|
19
19
|
GooglePayMasterCard = "fake-android-pay-mastercard-nonce"
|
20
20
|
GooglePayAmEx = "fake-android-pay-amex-nonce"
|
21
|
+
MetaCheckoutCard = "fake-meta-checkout-card-nonce"
|
22
|
+
MetaCheckoutToken = "fake-meta-checkout-token-nonce"
|
21
23
|
VenmoAccount = "fake-venmo-account-nonce"
|
22
24
|
VenmoAccountTokenIssuanceError = "fake-token-issuance-error-venmo-account-nonce"
|
23
25
|
ThreeDSecureVisaFullAuthentication = "fake-three-d-secure-visa-full-authentication-nonce"
|
@@ -53,6 +55,7 @@ module Braintree
|
|
53
55
|
TransactableCountryOfIssuanceUSA = "fake-valid-country-of-issuance-usa-nonce"
|
54
56
|
TransactableCountryOfIssuanceCAD = "fake-valid-country-of-issuance-cad-nonce"
|
55
57
|
TransactableIssuingBankNetworkOnly = "fake-valid-issuing-bank-network-only-nonce"
|
58
|
+
TransactablePinlessDebitVisa = "fake-pinless-debit-visa-nonce"
|
56
59
|
ProcessorDeclinedVisa = "fake-processor-declined-visa-nonce"
|
57
60
|
ProcessorDeclinedMasterCard = "fake-processor-declined-mastercard-nonce"
|
58
61
|
ProcessorDeclinedAmEx = "fake-processor-declined-amex-nonce"
|
@@ -71,6 +74,7 @@ module Braintree
|
|
71
74
|
SamsungPayMasterCard = "tokensam_fake_mastercard"
|
72
75
|
SamsungPayVisa = "tokensam_fake_visa"
|
73
76
|
SepaDirectDebit = "fake-sepa-direct-debit-nonce"
|
77
|
+
UsBankAccount = "fake-us-bank-account-nonce"
|
74
78
|
end
|
75
79
|
end
|
76
80
|
end
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Braintree
|
2
|
-
module Test
|
3
|
-
#
|
4
|
-
# the desired status in the sandbox environment.
|
2
|
+
module Test
|
3
|
+
# NEXT_MAJOR_VERSION are these even being used anymore? Can we remove this class??
|
5
4
|
module TransactionAmounts
|
6
5
|
Authorize = "1000.00"
|
7
6
|
Decline = "2000.00"
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Braintree
|
2
2
|
class Transaction
|
3
|
-
class CreditCardDetails
|
3
|
+
class CreditCardDetails
|
4
4
|
include BaseModule
|
5
5
|
|
6
6
|
attr_reader :account_type
|
@@ -64,7 +64,10 @@ module Braintree
|
|
64
64
|
"#{bin}******#{last_4}"
|
65
65
|
end
|
66
66
|
|
67
|
+
# NEXT_MAJOR_VERSION Remove this method
|
68
|
+
# The old venmo SDK class has been deprecated
|
67
69
|
def venmo_sdk?
|
70
|
+
warn "[DEPRECATED] The Venmo SDK integration is Unsupported. Please update your integration to use Pay with Venmo instead."
|
68
71
|
@venmo_sdk
|
69
72
|
end
|
70
73
|
|
@@ -8,6 +8,8 @@ module Braintree
|
|
8
8
|
attr_reader :debug_id
|
9
9
|
attr_reader :description
|
10
10
|
attr_reader :funding_source
|
11
|
+
attr_reader :implicitly_vaulted_payment_method_global_id
|
12
|
+
attr_reader :implicitly_vaulted_payment_method_token
|
11
13
|
attr_reader :payer_id
|
12
14
|
attr_reader :payment_id
|
13
15
|
attr_reader :refund_from_transaction_fee_amount
|
@@ -0,0 +1,52 @@
|
|
1
|
+
module Braintree
|
2
|
+
class Transaction
|
3
|
+
class MetaCheckoutCardDetails # :nodoc:
|
4
|
+
include BaseModule
|
5
|
+
|
6
|
+
attr_reader :bin
|
7
|
+
attr_reader :card_type
|
8
|
+
attr_reader :cardholder_name
|
9
|
+
attr_reader :commercial
|
10
|
+
attr_reader :container_id
|
11
|
+
attr_reader :country_of_issuance
|
12
|
+
attr_reader :created_at
|
13
|
+
attr_reader :customer_location
|
14
|
+
attr_reader :debit
|
15
|
+
attr_reader :durbin_regulated
|
16
|
+
attr_reader :expiration_month
|
17
|
+
attr_reader :expiration_year
|
18
|
+
attr_reader :healthcare
|
19
|
+
attr_reader :image_url
|
20
|
+
attr_reader :is_network_tokenized
|
21
|
+
attr_reader :issuing_bank
|
22
|
+
attr_reader :last_4
|
23
|
+
attr_reader :payroll
|
24
|
+
attr_reader :prepaid
|
25
|
+
attr_reader :product_id
|
26
|
+
attr_reader :token
|
27
|
+
attr_reader :unique_number_identifier
|
28
|
+
attr_reader :updated_at
|
29
|
+
|
30
|
+
def initialize(attributes)
|
31
|
+
set_instance_variables_from_hash attributes unless attributes.nil?
|
32
|
+
end
|
33
|
+
|
34
|
+
def expiration_date
|
35
|
+
"#{expiration_month}/#{expiration_year}"
|
36
|
+
end
|
37
|
+
|
38
|
+
def inspect
|
39
|
+
attr_order = [:token, :bin, :last_4, :card_type, :expiration_date, :cardholder_name, :customer_location, :prepaid,
|
40
|
+
:healthcare, :durbin_regulated, :debit, :commercial, :payroll, :product_id, :country_of_issuance, :issuing_bank, :image_url, :container_id]
|
41
|
+
formatted_attrs = attr_order.map do |attr|
|
42
|
+
"#{attr}: #{send(attr).inspect}"
|
43
|
+
end
|
44
|
+
"#<#{formatted_attrs.join(", ")}>"
|
45
|
+
end
|
46
|
+
|
47
|
+
def masked_number
|
48
|
+
"#{bin}******#{last_4}"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
module Braintree
|
2
|
+
class Transaction
|
3
|
+
class MetaCheckoutTokenDetails # :nodoc:
|
4
|
+
include BaseModule
|
5
|
+
|
6
|
+
attr_reader :bin
|
7
|
+
attr_reader :container_id
|
8
|
+
attr_reader :card_type
|
9
|
+
attr_reader :cardholder_name
|
10
|
+
attr_reader :commercial
|
11
|
+
attr_reader :country_of_issuance
|
12
|
+
attr_reader :created_at
|
13
|
+
attr_reader :cryptogram
|
14
|
+
attr_reader :customer_location
|
15
|
+
attr_reader :debit
|
16
|
+
attr_reader :durbin_regulated
|
17
|
+
attr_reader :ecommerce_indicator
|
18
|
+
attr_reader :expiration_month
|
19
|
+
attr_reader :expiration_year
|
20
|
+
attr_reader :healthcare
|
21
|
+
attr_reader :image_url
|
22
|
+
attr_reader :issuing_bank
|
23
|
+
attr_reader :is_network_tokenized
|
24
|
+
attr_reader :last_4
|
25
|
+
attr_reader :payroll
|
26
|
+
attr_reader :prepaid
|
27
|
+
attr_reader :product_id
|
28
|
+
attr_reader :token
|
29
|
+
attr_reader :unique_number_identifier
|
30
|
+
attr_reader :updated_at
|
31
|
+
|
32
|
+
def initialize(attributes)
|
33
|
+
set_instance_variables_from_hash attributes unless attributes.nil?
|
34
|
+
end
|
35
|
+
|
36
|
+
def expiration_date
|
37
|
+
"#{expiration_month}/#{expiration_year}"
|
38
|
+
end
|
39
|
+
|
40
|
+
def inspect
|
41
|
+
attr_order = [:container_id, :cryptogram, :ecommerce_indicator, :token, :bin, :last_4, :card_type, :expiration_date, :cardholder_name, :customer_location, :prepaid,
|
42
|
+
:healthcare, :durbin_regulated, :debit, :commercial, :payroll, :product_id, :country_of_issuance, :issuing_bank, :is_network_tokenized, :image_url]
|
43
|
+
formatted_attrs = attr_order.map do |attr|
|
44
|
+
"#{attr}: #{send(attr).inspect}"
|
45
|
+
end
|
46
|
+
"#<#{formatted_attrs.join(", ")}>"
|
47
|
+
end
|
48
|
+
|
49
|
+
def masked_number
|
50
|
+
"#{bin}******#{last_4}"
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|