braintree 4.34.0 → 4.36.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/lib/braintree/apple_pay_card.rb +7 -0
- data/lib/braintree/apple_pay_gateway.rb +43 -0
- data/lib/braintree/base_module.rb +9 -0
- data/lib/braintree/credit_card_verification.rb +2 -0
- data/lib/braintree/customer.rb +2 -2
- data/lib/braintree/customer_gateway.rb +2 -0
- data/lib/braintree/error_codes.rb +20 -0
- data/lib/braintree/gateway.rb +4 -0
- data/lib/braintree/graphql/inputs/billing_address_input.rb +34 -0
- data/lib/braintree/graphql/inputs/create_local_payment_context_input.rb +44 -0
- data/lib/braintree/graphql/inputs/payer_info_input.rb +38 -0
- data/lib/braintree/graphql/inputs/shipping_address_input.rb +34 -0
- data/lib/braintree/local_payment_context.rb +108 -0
- data/lib/braintree/local_payment_context_gateway.rb +132 -0
- data/lib/braintree/local_payment_type.rb +6 -0
- data/lib/braintree/merchant_gateway.rb +16 -16
- data/lib/braintree/monetary_amount.rb +24 -0
- data/lib/braintree/payment_instrument_type.rb +1 -0
- data/lib/braintree/payment_method_parser.rb +1 -0
- data/lib/braintree/successful_result.rb +1 -0
- data/lib/braintree/test/nonce.rb +1 -0
- data/lib/braintree/test/transaction_amounts.rb +1 -0
- data/lib/braintree/transaction/visa_checkout_card_details.rb +2 -0
- data/lib/braintree/transaction.rb +8 -2
- data/lib/braintree/transaction_gateway.rb +12 -5
- data/lib/braintree/transaction_search.rb +1 -0
- data/lib/braintree/validation_error_collection.rb +1 -1
- data/lib/braintree/version.rb +1 -1
- data/lib/braintree/visa_checkout_card.rb +2 -0
- data/lib/braintree.rb +20 -3
- data/spec/integration/braintree/customer_spec.rb +550 -16
- data/spec/integration/braintree/http_spec.rb +1 -1
- data/spec/integration/braintree/local_payment_context_spec.rb +168 -0
- data/spec/integration/braintree/merchant_spec.rb +5 -169
- data/spec/integration/braintree/payment_method_spec.rb +174 -1
- data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +1 -1
- data/spec/integration/braintree/test_transaction_spec.rb +6 -6
- data/spec/integration/braintree/transaction_idempotency_spec.rb +320 -0
- data/spec/integration/braintree/transaction_search_spec.rb +3 -2
- data/spec/integration/braintree/transaction_spec.rb +91 -0
- data/spec/integration/braintree/transaction_us_bank_account_spec.rb +42 -0
- data/spec/integration/braintree/visa_checkout_card_spec.rb +4 -100
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/braintree/credit_card_verification_spec.rb +1 -1
- data/spec/unit/braintree/customer_spec.rb +67 -1
- data/spec/unit/braintree/graphql/billing_address_input_spec.rb +68 -0
- data/spec/unit/braintree/graphql/create_local_payment_context_input_spec.rb +63 -0
- data/spec/unit/braintree/graphql/monetary_amount_input_spec.rb +55 -0
- data/spec/unit/braintree/graphql/payer_info_input_spec.rb +92 -0
- data/spec/unit/braintree/local_payment_context_gateway_spec.rb +149 -0
- data/spec/unit/braintree/local_payment_context_spec.rb +141 -0
- data/spec/unit/braintree/monetary_amount_spec.rb +34 -0
- data/spec/unit/braintree/three_d_secure_info_spec.rb +3 -1
- data/spec/unit/braintree/transaction/apple_pay_details_spec.rb +7 -7
- data/spec/unit/braintree/transaction/google_pay_details_spec.rb +7 -7
- data/spec/unit/braintree/transaction/meta_checkout_card_details_spec.rb +6 -6
- data/spec/unit/braintree/transaction/meta_checkout_token_details_spec.rb +6 -6
- data/spec/unit/braintree/transaction/payment_receipt_spec.rb +4 -4
- data/spec/unit/braintree/transaction/visa_checkout_card_details_spec.rb +6 -6
- data/spec/unit/braintree/transaction_gateway_spec.rb +5 -3
- data/spec/unit/braintree/transaction_spec.rb +31 -0
- data/spec/unit/braintree/visa_checkout_card_spec.rb +1 -0
- data/spec/unit/credit_card_details_spec.rb +6 -6
- data/spec/unit/spec_helper.rb +9 -0
- metadata +23 -6
|
@@ -51,7 +51,9 @@ describe Braintree::ThreeDSecureInfo do
|
|
|
51
51
|
|
|
52
52
|
describe "inspect" do
|
|
53
53
|
it "prints the attributes" do
|
|
54
|
-
|
|
54
|
+
authentication_hash = {trans_status: "authstatus", trans_status_reason: "authstatusreason"}.inspect
|
|
55
|
+
lookup_hash = {trans_status: "lookupstatus", trans_status_reason: "lookupstatusreason"}.inspect
|
|
56
|
+
expect(three_d_secure_info.inspect).to eq(%(#<ThreeDSecureInfo acs_transaction_id: "acs_id", authentication: #{authentication_hash}, cavv: "cavvvalue", ds_transaction_id: "dstrxid", eci_flag: "06", enrolled: "Y", liability_shift_possible: true, liability_shifted: true, lookup: #{lookup_hash}, pares_status: "Y", status: "authenticate_successful", three_d_secure_authentication_id: "auth_id", three_d_secure_transaction_id: "trans_id", three_d_secure_version: "1.0.2", xid: "xidvalue">))
|
|
55
57
|
end
|
|
56
58
|
end
|
|
57
59
|
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::ApplePayDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::ApplePayDetails.
|
|
5
|
+
card = Braintree::ApplePayDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::ApplePayDetails.
|
|
10
|
+
card = Braintree::ApplePayDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::ApplePayDetails.
|
|
15
|
+
card = Braintree::ApplePayDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::ApplePayDetails.
|
|
20
|
+
card = Braintree::ApplePayDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::ApplePayDetails.
|
|
25
|
+
card = Braintree::ApplePayDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
describe "payment_account_reference" do
|
|
30
30
|
it "returns the payment account reference when present" do
|
|
31
|
-
details = Braintree::
|
|
31
|
+
details = Braintree::ApplePayDetails.new(
|
|
32
32
|
:payment_account_reference => "V0010013019339005665779448477",
|
|
33
33
|
)
|
|
34
34
|
expect(details.payment_account_reference).to eq("V0010013019339005665779448477")
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::GooglePayDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::GooglePayDetails.
|
|
5
|
+
card = Braintree::GooglePayDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::GooglePayDetails.
|
|
10
|
+
card = Braintree::GooglePayDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::GooglePayDetails.
|
|
15
|
+
card = Braintree::GooglePayDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::GooglePayDetails.
|
|
20
|
+
card = Braintree::GooglePayDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::GooglePayDetails.
|
|
25
|
+
card = Braintree::GooglePayDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
|
|
29
29
|
context "payment_account_reference" do
|
|
30
30
|
it "returns the payment account reference when present" do
|
|
31
|
-
details = Braintree::
|
|
31
|
+
details = Braintree::GooglePayDetails.new(
|
|
32
32
|
:payment_account_reference => "V0010013019339005665779448477",
|
|
33
33
|
)
|
|
34
34
|
expect(details.payment_account_reference).to eq("V0010013019339005665779448477")
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::MetaCheckoutCardDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::MetaCheckoutCardDetails.
|
|
5
|
+
card = Braintree::MetaCheckoutCardDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::MetaCheckoutCardDetails.
|
|
10
|
+
card = Braintree::MetaCheckoutCardDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::MetaCheckoutCardDetails.
|
|
15
|
+
card = Braintree::MetaCheckoutCardDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::MetaCheckoutCardDetails.
|
|
20
|
+
card = Braintree::MetaCheckoutCardDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::MetaCheckoutCardDetails.
|
|
25
|
+
card = Braintree::MetaCheckoutCardDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::MetaCheckoutTokenDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::MetaCheckoutTokenDetails.
|
|
5
|
+
card = Braintree::MetaCheckoutTokenDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::MetaCheckoutTokenDetails.
|
|
10
|
+
card = Braintree::MetaCheckoutTokenDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::MetaCheckoutTokenDetails.
|
|
15
|
+
card = Braintree::MetaCheckoutTokenDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::MetaCheckoutTokenDetails.
|
|
20
|
+
card = Braintree::MetaCheckoutTokenDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::MetaCheckoutTokenDetails.
|
|
25
|
+
card = Braintree::MetaCheckoutTokenDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -64,10 +64,10 @@ describe Braintree::Transaction::PaymentReceipt do
|
|
|
64
64
|
expect(details.merchant_identification_number).to eq("merchant-id-number")
|
|
65
65
|
expect(details.merchant_name).to eq("merchant-name")
|
|
66
66
|
expect(details.pin_verified).to be_truthy
|
|
67
|
-
expect(details.processor_authorization_code).to
|
|
68
|
-
expect(details.processor_response_text).to
|
|
69
|
-
expect(details.terminal_identification_number).to
|
|
70
|
-
expect(details.type).to
|
|
67
|
+
expect(details.processor_authorization_code).to eq("processor-auth-code")
|
|
68
|
+
expect(details.processor_response_text).to eq("processor-response-text")
|
|
69
|
+
expect(details.terminal_identification_number).to eq("terminal-id")
|
|
70
|
+
expect(details.type).to eq("sale")
|
|
71
71
|
end
|
|
72
72
|
end
|
|
73
73
|
end
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../../spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::VisaCheckoutCardDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::VisaCheckoutCardDetails.
|
|
5
|
+
card = Braintree::VisaCheckoutCardDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::VisaCheckoutCardDetails.
|
|
10
|
+
card = Braintree::VisaCheckoutCardDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::VisaCheckoutCardDetails.
|
|
15
|
+
card = Braintree::VisaCheckoutCardDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::VisaCheckoutCardDetails.
|
|
20
|
+
card = Braintree::VisaCheckoutCardDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::VisaCheckoutCardDetails.
|
|
25
|
+
card = Braintree::VisaCheckoutCardDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
end
|
|
@@ -33,13 +33,13 @@ describe Braintree::TransactionGateway do
|
|
|
33
33
|
# three_d_secure_token has been deprecated in favor of three_d_secure_authentication_id
|
|
34
34
|
it "creates a transaction gateway signature" do
|
|
35
35
|
expect(Braintree::TransactionGateway._create_signature).to match([
|
|
36
|
-
:amount, :billing_address_id, :channel, :currency_iso_code, :customer_id, :device_data,
|
|
36
|
+
:accept_partial_authorization, :amount, :api_request_key, :billing_address_id, :channel, :currency_iso_code, :customer_id, :device_data,
|
|
37
37
|
:discount_amount, :exchange_rate_quote_id, :foreign_retailer,
|
|
38
38
|
:merchant_account_id, :order_id, :payment_method_nonce, :payment_method_token, :processing_merchant_category_code,
|
|
39
39
|
:product_sku, :purchase_order_number, :service_fee_amount, :shared_billing_address_id,
|
|
40
40
|
:shared_customer_id, :shared_payment_method_nonce, :shared_payment_method_token,
|
|
41
41
|
:shared_shipping_address_id, :shipping_address_id, :shipping_amount, :shipping_tax_amount,
|
|
42
|
-
:ships_from_postal_code, :tax_amount, :tax_exempt, :three_d_secure_authentication_id,:three_d_secure_token, #Deprecated
|
|
42
|
+
:ships_from_postal_code, :surcharge_amount, :tax_amount, :tax_exempt, :three_d_secure_authentication_id,:three_d_secure_token, #Deprecated
|
|
43
43
|
:transaction_source, :type, :venmo_sdk_payment_method_code, # Deprecated
|
|
44
44
|
:sca_exemption,
|
|
45
45
|
{:apple_pay_card => [:number, :cardholder_name, :cryptogram, :expiration_month, :expiration_year, :eci_indicator]},
|
|
@@ -47,7 +47,7 @@ describe Braintree::TransactionGateway do
|
|
|
47
47
|
:billing => Braintree::AddressGateway._shared_signature
|
|
48
48
|
},
|
|
49
49
|
{:credit_card => [:token, :cardholder_name, :cvv, :expiration_date, :expiration_month, :expiration_year, :number, {:payment_reader_card_details => [:encrypted_card_data, :key_serial_number]}, {:network_tokenization_attributes => [:cryptogram, :ecommerce_indicator, :token_requestor_id]}]},
|
|
50
|
-
{:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
|
|
50
|
+
{:customer => [:id, :company, :email, :fax, :first_name, {:international_phone => [:country_code, :national_number]}, :last_name, :phone, :website]},
|
|
51
51
|
{:custom_fields => :_any_key_},
|
|
52
52
|
{:descriptor => [:name, :phone, :url]},
|
|
53
53
|
{:external_vault => [
|
|
@@ -89,6 +89,7 @@ describe Braintree::TransactionGateway do
|
|
|
89
89
|
:store_shipping_address_in_vault,
|
|
90
90
|
:submit_for_settlement,
|
|
91
91
|
{:three_d_secure => [:required]},
|
|
92
|
+
{:us_bank_account => [:ach_type]},
|
|
92
93
|
{:venmo => [:profile_id]},
|
|
93
94
|
:venmo_sdk_session, # Deprecated
|
|
94
95
|
]
|
|
@@ -162,6 +163,7 @@ describe Braintree::TransactionGateway do
|
|
|
162
163
|
|
|
163
164
|
it "creates a transaction gateway submit for settlement signature" do
|
|
164
165
|
expect(Braintree::TransactionGateway._submit_for_settlement_signature).to match([
|
|
166
|
+
:api_request_key,
|
|
165
167
|
:order_id,
|
|
166
168
|
{:descriptor => [:name, :phone, :url]},
|
|
167
169
|
{:industry => [
|
|
@@ -347,6 +347,15 @@ describe Braintree::Transaction do
|
|
|
347
347
|
expect(transaction.network_transaction_id).to eq("123456789012345")
|
|
348
348
|
end
|
|
349
349
|
|
|
350
|
+
it "sets partially_authorized to true if processor_response_code is 1004" do
|
|
351
|
+
transaction = Braintree::Transaction._new(
|
|
352
|
+
:gateway,
|
|
353
|
+
:processor_response_code => "1004",
|
|
354
|
+
)
|
|
355
|
+
expect(transaction.processor_response_code).to eq("1004")
|
|
356
|
+
expect(transaction.partially_authorized).to eq(true)
|
|
357
|
+
end
|
|
358
|
+
|
|
350
359
|
it "accepts ach_return_code" do
|
|
351
360
|
transaction = Braintree::Transaction._new(
|
|
352
361
|
:gateway,
|
|
@@ -365,6 +374,16 @@ describe Braintree::Transaction do
|
|
|
365
374
|
expect(transaction.ach_reject_reason).to eq("some reject reason")
|
|
366
375
|
end
|
|
367
376
|
|
|
377
|
+
it "accepts ach_type" do
|
|
378
|
+
transaction = Braintree::Transaction._new(
|
|
379
|
+
:gateway,
|
|
380
|
+
:ach_type => "standard",
|
|
381
|
+
:requested_ach_type => "standard",
|
|
382
|
+
)
|
|
383
|
+
expect(transaction.ach_type).to eq("standard")
|
|
384
|
+
expect(transaction.requested_ach_type).to eq("standard")
|
|
385
|
+
end
|
|
386
|
+
|
|
368
387
|
it "accepts network_response code and network_response_text" do
|
|
369
388
|
transaction = Braintree::Transaction._new(
|
|
370
389
|
:gateway,
|
|
@@ -557,4 +576,16 @@ describe Braintree::Transaction do
|
|
|
557
576
|
expect(transaction.gateway_rejection_reason).to eq(Braintree::Transaction::GatewayRejectionReason::ExcessiveRetry)
|
|
558
577
|
end
|
|
559
578
|
end
|
|
579
|
+
|
|
580
|
+
describe "request includes surcharge amount" do
|
|
581
|
+
it "if the surcharge_amount is present" do
|
|
582
|
+
transaction = Braintree::Transaction._new(:gateway, :surcharge_amount => "1.00")
|
|
583
|
+
expect(transaction.surcharge_amount).to eq(BigDecimal("1.00"))
|
|
584
|
+
end
|
|
585
|
+
|
|
586
|
+
it "is set to nil if the surcharge_amount is not present" do
|
|
587
|
+
transaction = Braintree::Transaction._new(:gateway, {})
|
|
588
|
+
expect(transaction.surcharge_amount).to be_nil
|
|
589
|
+
end
|
|
590
|
+
end
|
|
560
591
|
end
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
2
2
|
|
|
3
|
+
# DEPRECATED: Visa Checkout Transactions are no longer supported
|
|
3
4
|
describe Braintree::VisaCheckoutCard do
|
|
4
5
|
it "initializes prepaid reloadable correctly" do
|
|
5
6
|
card = Braintree::VisaCheckoutCard._new(:gateway, {:prepaid_reloadable => "No"})
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
require File.expand_path(File.dirname(__FILE__) + "
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/spec_helper")
|
|
2
2
|
|
|
3
3
|
describe Braintree::CreditCardDetails do
|
|
4
4
|
it "initializes prepaid reloadable correctly" do
|
|
5
|
-
card = Braintree::CreditCardDetails.
|
|
5
|
+
card = Braintree::CreditCardDetails.new({:prepaid_reloadable => "No"})
|
|
6
6
|
expect(card.prepaid_reloadable).to eq("No")
|
|
7
7
|
end
|
|
8
8
|
|
|
9
9
|
it "initializes business correctly" do
|
|
10
|
-
card = Braintree::CreditCardDetails.
|
|
10
|
+
card = Braintree::CreditCardDetails.new({:business => "No"})
|
|
11
11
|
expect(card.business).to eq("No")
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
it "initializes consumer correctly" do
|
|
15
|
-
card = Braintree::CreditCardDetails.
|
|
15
|
+
card = Braintree::CreditCardDetails.new({:consumer => "No"})
|
|
16
16
|
expect(card.consumer).to eq("No")
|
|
17
17
|
end
|
|
18
18
|
|
|
19
19
|
it "initializes corporate correctly" do
|
|
20
|
-
card = Braintree::CreditCardDetails.
|
|
20
|
+
card = Braintree::CreditCardDetails.new({:corporate => "No"})
|
|
21
21
|
expect(card.corporate).to eq("No")
|
|
22
22
|
end
|
|
23
23
|
|
|
24
24
|
it "initializes purchase correctly" do
|
|
25
|
-
card = Braintree::CreditCardDetails.
|
|
25
|
+
card = Braintree::CreditCardDetails.new({:purchase => "No"})
|
|
26
26
|
expect(card.purchase).to eq("No")
|
|
27
27
|
end
|
|
28
28
|
end
|
data/spec/unit/spec_helper.rb
CHANGED
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: 4.
|
|
4
|
+
version: 4.36.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Braintree
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-05-05 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: builder
|
|
@@ -114,13 +114,17 @@ files:
|
|
|
114
114
|
- lib/braintree/granted_payment_instrument_update.rb
|
|
115
115
|
- lib/braintree/graphql/enums/recommendations.rb
|
|
116
116
|
- lib/braintree/graphql/enums/recommended_payment_option.rb
|
|
117
|
+
- lib/braintree/graphql/inputs/billing_address_input.rb
|
|
117
118
|
- lib/braintree/graphql/inputs/create_customer_session_input.rb
|
|
119
|
+
- lib/braintree/graphql/inputs/create_local_payment_context_input.rb
|
|
118
120
|
- lib/braintree/graphql/inputs/customer_recommendations_input.rb
|
|
119
121
|
- lib/braintree/graphql/inputs/customer_session_input.rb
|
|
120
122
|
- lib/braintree/graphql/inputs/monetary_amount_input.rb
|
|
123
|
+
- lib/braintree/graphql/inputs/payer_info_input.rb
|
|
121
124
|
- lib/braintree/graphql/inputs/paypal_payee_input.rb
|
|
122
125
|
- lib/braintree/graphql/inputs/paypal_purchase_unit_input.rb
|
|
123
126
|
- lib/braintree/graphql/inputs/phone_input.rb
|
|
127
|
+
- lib/braintree/graphql/inputs/shipping_address_input.rb
|
|
124
128
|
- lib/braintree/graphql/inputs/update_customer_session_input.rb
|
|
125
129
|
- lib/braintree/graphql/types/customer_recommendations_payload.rb
|
|
126
130
|
- lib/braintree/graphql/types/payment_options.rb
|
|
@@ -130,9 +134,12 @@ files:
|
|
|
130
134
|
- lib/braintree/http.rb
|
|
131
135
|
- lib/braintree/local_payment_completed.rb
|
|
132
136
|
- lib/braintree/local_payment_completed/blik_alias.rb
|
|
137
|
+
- lib/braintree/local_payment_context.rb
|
|
138
|
+
- lib/braintree/local_payment_context_gateway.rb
|
|
133
139
|
- lib/braintree/local_payment_expired.rb
|
|
134
140
|
- lib/braintree/local_payment_funded.rb
|
|
135
141
|
- lib/braintree/local_payment_reversed.rb
|
|
142
|
+
- lib/braintree/local_payment_type.rb
|
|
136
143
|
- lib/braintree/merchant.rb
|
|
137
144
|
- lib/braintree/merchant_account.rb
|
|
138
145
|
- lib/braintree/merchant_account/address_details.rb
|
|
@@ -141,6 +148,7 @@ files:
|
|
|
141
148
|
- lib/braintree/meta_checkout_card.rb
|
|
142
149
|
- lib/braintree/meta_checkout_token.rb
|
|
143
150
|
- lib/braintree/modification.rb
|
|
151
|
+
- lib/braintree/monetary_amount.rb
|
|
144
152
|
- lib/braintree/oauth_credentials.rb
|
|
145
153
|
- lib/braintree/oauth_gateway.rb
|
|
146
154
|
- lib/braintree/paginated_collection.rb
|
|
@@ -267,6 +275,7 @@ files:
|
|
|
267
275
|
- spec/integration/braintree/exchange_rate_quote_spec.rb
|
|
268
276
|
- spec/integration/braintree/graphql_client_spec.rb
|
|
269
277
|
- spec/integration/braintree/http_spec.rb
|
|
278
|
+
- spec/integration/braintree/local_payment_context_spec.rb
|
|
270
279
|
- spec/integration/braintree/merchant_account_spec.rb
|
|
271
280
|
- spec/integration/braintree/merchant_spec.rb
|
|
272
281
|
- spec/integration/braintree/oauth_spec.rb
|
|
@@ -283,6 +292,7 @@ files:
|
|
|
283
292
|
- spec/integration/braintree/subscription_spec.rb
|
|
284
293
|
- spec/integration/braintree/test/transaction_amounts_spec.rb
|
|
285
294
|
- spec/integration/braintree/test_transaction_spec.rb
|
|
295
|
+
- spec/integration/braintree/transaction_idempotency_spec.rb
|
|
286
296
|
- spec/integration/braintree/transaction_line_item_spec.rb
|
|
287
297
|
- spec/integration/braintree/transaction_payment_facilitator_spec.rb
|
|
288
298
|
- spec/integration/braintree/transaction_search_spec.rb
|
|
@@ -328,15 +338,21 @@ files:
|
|
|
328
338
|
- spec/unit/braintree/exchange_rate_quote_spec.rb
|
|
329
339
|
- spec/unit/braintree/exchange_rate_spec.rb
|
|
330
340
|
- spec/unit/braintree/google_pay_card_spec.rb
|
|
341
|
+
- spec/unit/braintree/graphql/billing_address_input_spec.rb
|
|
331
342
|
- spec/unit/braintree/graphql/create_customer_session_input_spec.rb
|
|
343
|
+
- spec/unit/braintree/graphql/create_local_payment_context_input_spec.rb
|
|
332
344
|
- spec/unit/braintree/graphql/customer_recommendations_input_spec.rb
|
|
333
345
|
- spec/unit/braintree/graphql/customer_recommendations_spec.rb
|
|
334
346
|
- spec/unit/braintree/graphql/customer_session_input_spec.rb
|
|
347
|
+
- spec/unit/braintree/graphql/monetary_amount_input_spec.rb
|
|
348
|
+
- spec/unit/braintree/graphql/payer_info_input_spec.rb
|
|
335
349
|
- spec/unit/braintree/graphql/phone_input_spec.rb
|
|
336
350
|
- spec/unit/braintree/graphql/update_customer_session_input_spec.rb
|
|
337
351
|
- spec/unit/braintree/graphql_client_spec.rb
|
|
338
352
|
- spec/unit/braintree/http_spec.rb
|
|
339
353
|
- spec/unit/braintree/local_payment_completed_spec.rb
|
|
354
|
+
- spec/unit/braintree/local_payment_context_gateway_spec.rb
|
|
355
|
+
- spec/unit/braintree/local_payment_context_spec.rb
|
|
340
356
|
- spec/unit/braintree/local_payment_expired_spec.rb
|
|
341
357
|
- spec/unit/braintree/local_payment_funded_spec.rb
|
|
342
358
|
- spec/unit/braintree/meta_checkout_card_details_spec.rb
|
|
@@ -344,6 +360,7 @@ files:
|
|
|
344
360
|
- spec/unit/braintree/meta_checkout_token_details_spec.rb
|
|
345
361
|
- spec/unit/braintree/meta_checkout_token_spec.rb
|
|
346
362
|
- spec/unit/braintree/modification_spec.rb
|
|
363
|
+
- spec/unit/braintree/monetary_amount_spec.rb
|
|
347
364
|
- spec/unit/braintree/package_tracking_spec.rb
|
|
348
365
|
- spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb
|
|
349
366
|
- spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb
|
|
@@ -405,7 +422,7 @@ metadata:
|
|
|
405
422
|
changelog_uri: https://github.com/braintree/braintree_ruby/blob/master/CHANGELOG.md
|
|
406
423
|
source_code_uri: https://github.com/braintree/braintree_ruby
|
|
407
424
|
documentation_uri: https://developer.paypal.com/braintree/docs
|
|
408
|
-
post_install_message:
|
|
425
|
+
post_install_message:
|
|
409
426
|
rdoc_options: []
|
|
410
427
|
require_paths:
|
|
411
428
|
- lib
|
|
@@ -420,8 +437,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
420
437
|
- !ruby/object:Gem::Version
|
|
421
438
|
version: '0'
|
|
422
439
|
requirements: []
|
|
423
|
-
rubygems_version: 3.
|
|
424
|
-
signing_key:
|
|
440
|
+
rubygems_version: 3.3.15
|
|
441
|
+
signing_key:
|
|
425
442
|
specification_version: 4
|
|
426
443
|
summary: Braintree Ruby Server SDK
|
|
427
444
|
test_files: []
|