braintree 2.103.0 → 2.104.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/amex_express_checkout_card.rb +2 -0
- data/lib/braintree/android_pay_card.rb +1 -0
- data/lib/braintree/customer.rb +4 -2
- data/lib/braintree/dispute/transaction.rb +1 -0
- data/lib/braintree/masterpass_card.rb +2 -0
- data/lib/braintree/payment_instrument_type.rb +2 -1
- data/lib/braintree/payment_method_gateway.rb +1 -0
- data/lib/braintree/payment_method_parser.rb +1 -0
- data/lib/braintree/test/nonce.rb +3 -0
- data/lib/braintree/transaction.rb +6 -0
- data/lib/braintree/transaction/masterpass_card_details.rb +2 -0
- data/lib/braintree/transaction/paypal_details.rb +2 -0
- data/lib/braintree/transaction_gateway.rb +1 -0
- data/lib/braintree/version.rb +1 -1
- data/spec/integration/braintree/merchant_spec.rb +2 -2
- data/spec/integration/braintree/paypal_account_spec.rb +1 -1
- data/spec/unit/braintree/dispute_spec.rb +2 -0
- data/spec/unit/braintree/transaction/paypal_details_spec.rb +57 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d5e73505966566953ef5df2f2e366b104d0ba4bae9fe485759a4cd2048100d75
|
4
|
+
data.tar.gz: 5909d63f9c589f1c0ac70bd55c8b4eda61cd52fcaf53d46c1030ef7b18ffe1ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2012367a1bc709459b1a65828ea01aa851d0e491e9071dee4ce8797603b75cf3f412f6ededf628e713d55bdc095762f50fc500e77519d8ec485679aa0033a92
|
7
|
+
data.tar.gz: f7724b06f9b4447fe2051f50fa0c0f62e96d43342cf09e048fc8522ee0bb29e38d0fe35ab938fe1b16202e3a77be67d20b038d920eb4acc4e82db2416d555537
|
data/lib/braintree/customer.rb
CHANGED
@@ -4,7 +4,8 @@ module Braintree
|
|
4
4
|
include Braintree::Util::IdEquality
|
5
5
|
|
6
6
|
attr_reader :addresses
|
7
|
-
attr_reader :amex_express_checkout_cards
|
7
|
+
attr_reader :amex_express_checkout_cards # Deprecated
|
8
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
8
9
|
attr_reader :android_pay_cards
|
9
10
|
attr_reader :apple_pay_cards
|
10
11
|
attr_reader :coinbase_accounts
|
@@ -18,7 +19,7 @@ module Braintree
|
|
18
19
|
attr_reader :graphql_id
|
19
20
|
attr_reader :id
|
20
21
|
attr_reader :last_name
|
21
|
-
attr_reader :masterpass_cards
|
22
|
+
attr_reader :masterpass_cards # Deprecated
|
22
23
|
attr_reader :paypal_accounts
|
23
24
|
attr_reader :phone
|
24
25
|
attr_reader :samsung_pay_cards
|
@@ -113,6 +114,7 @@ module Braintree
|
|
113
114
|
@coinbase_accounts = (@coinbase_accounts || []).map { |pm| CoinbaseAccount._new gateway, pm }
|
114
115
|
@apple_pay_cards = (@apple_pay_cards || []).map { |pm| ApplePayCard._new gateway, pm }
|
115
116
|
@europe_bank_accounts = (@europe_bank_Accounts || []).map { |pm| EuropeBankAccount._new gateway, pm }
|
117
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
116
118
|
@android_pay_cards = (@android_pay_cards || []).map { |pm| AndroidPayCard._new gateway, pm }
|
117
119
|
@amex_express_checkout_cards = (@amex_express_checkout_cards || []).map { |pm| AmexExpressCheckoutCard._new gateway, pm }
|
118
120
|
@venmo_accounts = (@venmo_accounts || []).map { |pm| VenmoAccount._new gateway, pm }
|
@@ -5,11 +5,12 @@ module Braintree
|
|
5
5
|
CreditCard = 'credit_card'
|
6
6
|
CoinbaseAccount = 'coinbase_account'
|
7
7
|
ApplePayCard = 'apple_pay_card'
|
8
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
8
9
|
AndroidPayCard = 'android_pay_card'
|
9
10
|
VenmoAccount = 'venmo_account'
|
10
11
|
UsBankAccount = 'us_bank_account'
|
11
12
|
VisaCheckoutCard = 'visa_checkout_card'
|
12
|
-
MasterpassCard = 'masterpass_card'
|
13
|
+
MasterpassCard = 'masterpass_card' # Deprecated
|
13
14
|
SamsungPayCard = 'samsung_pay_card'
|
14
15
|
LocalPayment = 'local_payment'
|
15
16
|
PayPalHere = 'paypal_here'
|
@@ -52,6 +52,7 @@ module Braintree
|
|
52
52
|
elsif response.has_key?(:apple_pay_card)
|
53
53
|
ApplePayCard._new(@gateway, response[:apple_pay_card])
|
54
54
|
elsif response.has_key?(:android_pay_card)
|
55
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
55
56
|
AndroidPayCard._new(@gateway, response[:android_pay_card])
|
56
57
|
elsif response.has_key?(:venmo_account)
|
57
58
|
VenmoAccount._new(@gateway, response[:venmo_account])
|
@@ -13,6 +13,7 @@ module Braintree
|
|
13
13
|
elsif attributes[:apple_pay_card]
|
14
14
|
ApplePayCard._new(gateway, attributes[:apple_pay_card])
|
15
15
|
elsif attributes[:android_pay_card]
|
16
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
16
17
|
AndroidPayCard._new(gateway, attributes[:android_pay_card])
|
17
18
|
elsif attributes[:amex_express_checkout_card]
|
18
19
|
AmexExpressCheckoutCard._new(gateway, attributes[:amex_express_checkout_card])
|
data/lib/braintree/test/nonce.rb
CHANGED
@@ -13,10 +13,12 @@ module Braintree
|
|
13
13
|
AbstractTransactable = "fake-abstract-transactable-nonce"
|
14
14
|
Europe = "fake-europe-bank-account-nonce"
|
15
15
|
Coinbase = "fake-coinbase-nonce"
|
16
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
16
17
|
AndroidPayDiscover = "fake-android-pay-discover-nonce"
|
17
18
|
AndroidPayVisa = "fake-android-pay-visa-nonce"
|
18
19
|
AndroidPayMasterCard = "fake-android-pay-mastercard-nonce"
|
19
20
|
AndroidPayAmEx = "fake-android-pay-amex-nonce"
|
21
|
+
# NEXT_MAJOR_VERSION Remove AmexExpressCheckout test nonces
|
20
22
|
AmexExpressCheckout = "fake-amex-express-checkout-nonce"
|
21
23
|
VenmoAccount = "fake-venmo-account-nonce"
|
22
24
|
VenmoAccountTokenIssuanceError = "fake-token-issuance-error-venmo-account-nonce"
|
@@ -63,6 +65,7 @@ module Braintree
|
|
63
65
|
SEPA = "fake-sepa-bank-account-nonce"
|
64
66
|
GatewayRejectedFraud = "fake-gateway-rejected-fraud-nonce"
|
65
67
|
GatewayRejectedRiskThresholds = "fake-gateway-rejected-risk-thresholds-nonce"
|
68
|
+
# NEXT_MAJOR_VERSION Remove Masterpass test nonces
|
66
69
|
MasterpassAmEx = "fake-masterpass-amex-nonce"
|
67
70
|
MasterpassDiscover = "fake-masterpass-discover-nonce"
|
68
71
|
MasterpassMasterCard = "fake-masterpass-mastercard-nonce"
|
@@ -92,8 +92,11 @@ module Braintree
|
|
92
92
|
|
93
93
|
attr_reader :add_ons
|
94
94
|
attr_reader :additional_processor_response # The raw response from the processor.
|
95
|
+
# NEXT_MAJOR_VERSION Remove this class.
|
96
|
+
# DEPRECATED The American Express Checkout payment method is deprecated.
|
95
97
|
attr_reader :amex_express_checkout_details
|
96
98
|
attr_reader :amount
|
99
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
97
100
|
attr_reader :android_pay_details
|
98
101
|
attr_reader :apple_pay_details
|
99
102
|
attr_reader :authorization_adjustments
|
@@ -126,6 +129,8 @@ module Braintree
|
|
126
129
|
# DEPRECATED If you're looking to accept iDEAL as a payment method contact accounts@braintreepayments.com for a solution.
|
127
130
|
attr_reader :ideal_payment_details
|
128
131
|
attr_reader :local_payment_details
|
132
|
+
# NEXT_MAJOR_VERSION Remove this class.
|
133
|
+
# DEPRECATED The Masterpass Card payment method is deprecated.
|
129
134
|
attr_reader :masterpass_card_details
|
130
135
|
attr_reader :merchant_account_id
|
131
136
|
attr_reader :network_response_code # Response code from the card network
|
@@ -308,6 +313,7 @@ module Braintree
|
|
308
313
|
@paypal_details = PayPalDetails.new(@paypal)
|
309
314
|
@paypal_here_details = PayPalHereDetails.new(@paypal_here)
|
310
315
|
@apple_pay_details = ApplePayDetails.new(@apple_pay)
|
316
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
311
317
|
@android_pay_details = AndroidPayDetails.new(@android_pay_card)
|
312
318
|
@amex_express_checkout_details = AmexExpressCheckoutDetails.new(@amex_express_checkout_card)
|
313
319
|
@venmo_account_details = VenmoAccountDetails.new(@venmo_account)
|
@@ -9,6 +9,8 @@ module Braintree
|
|
9
9
|
attr_reader :debug_id
|
10
10
|
attr_reader :description
|
11
11
|
attr_reader :image_url
|
12
|
+
attr_reader :implicitly_vaulted_payment_method_global_id
|
13
|
+
attr_reader :implicitly_vaulted_payment_method_token
|
12
14
|
attr_reader :payee_email
|
13
15
|
attr_reader :payee_id
|
14
16
|
attr_reader :payer_email
|
@@ -256,6 +256,7 @@ module Braintree
|
|
256
256
|
]},
|
257
257
|
]},
|
258
258
|
{:apple_pay_card => [:number, :cardholder_name, :cryptogram, :expiration_month, :expiration_year, :eci_indicator]},
|
259
|
+
# NEXT_MAJOR_VERSION rename Android Pay to Google Pay
|
259
260
|
{:android_pay_card => [:number, :cryptogram, :google_transaction_id, :expiration_month, :expiration_year, :source_card_type, :source_card_last_four, :eci_indicator]}
|
260
261
|
]
|
261
262
|
end
|
data/lib/braintree/version.rb
CHANGED
@@ -305,7 +305,7 @@ describe Braintree::MerchantGateway do
|
|
305
305
|
it "succeeds" do
|
306
306
|
result = Braintree::Merchant.provision_raw_apple_pay
|
307
307
|
result.should be_success
|
308
|
-
result.supported_networks.should == ["visa", "mastercard", "amex", "discover"]
|
308
|
+
result.supported_networks.should == ["visa", "mastercard", "amex", "discover", "maestro"]
|
309
309
|
end
|
310
310
|
|
311
311
|
it "is repeatable" do
|
@@ -313,7 +313,7 @@ describe Braintree::MerchantGateway do
|
|
313
313
|
result.should be_success
|
314
314
|
result = Braintree::Merchant.provision_raw_apple_pay
|
315
315
|
result.should be_success
|
316
|
-
result.supported_networks.should == ["visa", "mastercard", "amex", "discover"]
|
316
|
+
result.supported_networks.should == ["visa", "mastercard", "amex", "discover", "maestro"]
|
317
317
|
end
|
318
318
|
end
|
319
319
|
|
@@ -42,6 +42,7 @@ describe Braintree::Dispute do
|
|
42
42
|
:amount => "31.00",
|
43
43
|
:id => "open_disputed_transaction",
|
44
44
|
:created_at => Time.utc(2009, 2, 9, 12, 59, 59),
|
45
|
+
:installment_count => nil,
|
45
46
|
:order_id => nil,
|
46
47
|
:purchase_order_number => "po",
|
47
48
|
:payment_instrument_subtype => "Visa",
|
@@ -320,6 +321,7 @@ describe Braintree::Dispute do
|
|
320
321
|
dispute.transaction.amount.should == 31.00
|
321
322
|
dispute.transaction.id.should == "open_disputed_transaction"
|
322
323
|
dispute.transaction.created_at.should == Time.utc(2009, 2, 9, 12, 59, 59)
|
324
|
+
dispute.transaction.installment_count.should == nil
|
323
325
|
dispute.transaction.order_id.should == nil
|
324
326
|
dispute.transaction.purchase_order_number.should == "po"
|
325
327
|
dispute.transaction.payment_instrument_subtype.should == "Visa"
|
@@ -0,0 +1,57 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
2
|
+
|
3
|
+
describe Braintree::Transaction::PayPalDetails do
|
4
|
+
describe "initialize" do
|
5
|
+
it "sets all fields" do
|
6
|
+
details = Braintree::Transaction::PayPalDetails.new(
|
7
|
+
:authorization_id => "id",
|
8
|
+
:capture_id => "capture-id",
|
9
|
+
:custom_field => "custom-field",
|
10
|
+
:debug_id => "debug-id",
|
11
|
+
:description => "description",
|
12
|
+
:image_url => "www.image.com",
|
13
|
+
:implicitly_vaulted_payment_method_global_id => "global-id",
|
14
|
+
:implicitly_vaulted_payment_method_token => "payment-method-token",
|
15
|
+
:payee_email => "payee@example.com",
|
16
|
+
:payee_id => "payee-id",
|
17
|
+
:payer_email => "payer@example.com",
|
18
|
+
:payer_first_name => "Grace",
|
19
|
+
:payer_id => "payer-id",
|
20
|
+
:payer_last_name => "Hopper",
|
21
|
+
:payer_status =>"status",
|
22
|
+
:payment_id => "payment-id",
|
23
|
+
:refund_from_transaction_fee_amount => "1.00",
|
24
|
+
:refund_from_transaction_fee_currency_iso_code => "123",
|
25
|
+
:refund_id => "refund-id",
|
26
|
+
:seller_protection_status => "seller-protection-status",
|
27
|
+
:token => "token",
|
28
|
+
:transaction_fee_amount => "2.00",
|
29
|
+
:transaction_fee_currency_iso_code => "123"
|
30
|
+
)
|
31
|
+
|
32
|
+
expect(details.authorization_id).to eq("id")
|
33
|
+
expect(details.capture_id).to eq("capture-id")
|
34
|
+
expect(details.custom_field).to eq("custom-field")
|
35
|
+
expect(details.debug_id).to eq("debug-id")
|
36
|
+
expect(details.description).to eq("description")
|
37
|
+
expect(details.image_url).to eq("www.image.com")
|
38
|
+
expect(details.implicitly_vaulted_payment_method_global_id).to eq("global-id")
|
39
|
+
expect(details.implicitly_vaulted_payment_method_token).to eq("payment-method-token")
|
40
|
+
expect(details.payee_email).to eq("payee@example.com")
|
41
|
+
expect(details.payee_id).to eq("payee-id")
|
42
|
+
expect(details.payer_email).to eq("payer@example.com")
|
43
|
+
expect(details.payer_first_name).to eq("Grace")
|
44
|
+
expect(details.payer_id).to eq("payer-id")
|
45
|
+
expect(details.payer_last_name).to eq("Hopper")
|
46
|
+
expect(details.payer_status).to eq("status")
|
47
|
+
expect(details.payment_id).to eq("payment-id")
|
48
|
+
expect(details.refund_from_transaction_fee_amount).to eq("1.00")
|
49
|
+
expect(details.refund_from_transaction_fee_currency_iso_code).to eq("123")
|
50
|
+
expect(details.refund_id).to eq("refund-id")
|
51
|
+
expect(details.seller_protection_status).to eq("seller-protection-status")
|
52
|
+
expect(details.token).to eq("token")
|
53
|
+
expect(details.transaction_fee_amount).to eq("2.00")
|
54
|
+
expect(details.transaction_fee_currency_iso_code).to eq("123")
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: braintree
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.104.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintree
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -282,6 +282,7 @@ files:
|
|
282
282
|
- spec/unit/braintree/transaction/credit_card_details_spec.rb
|
283
283
|
- spec/unit/braintree/transaction/customer_details_spec.rb
|
284
284
|
- spec/unit/braintree/transaction/deposit_details_spec.rb
|
285
|
+
- spec/unit/braintree/transaction/paypal_details_spec.rb
|
285
286
|
- spec/unit/braintree/transaction_search_spec.rb
|
286
287
|
- spec/unit/braintree/transaction_spec.rb
|
287
288
|
- spec/unit/braintree/transparent_redirect_spec.rb
|