braintree 4.15.0 → 4.18.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 +9 -9
- data/lib/braintree/credit_card_gateway.rb +8 -8
- data/lib/braintree/credit_card_verification.rb +3 -3
- data/lib/braintree/credit_card_verification_gateway.rb +28 -11
- 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_codes.rb +4 -0
- 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 +5 -5
- 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 +8 -7
- 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 +3 -0
- data/lib/braintree/test/transaction_amounts.rb +2 -3
- 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 +2 -1
- data/lib/braintree/transaction/credit_card_details.rb +1 -1
- data/lib/braintree/transaction/customer_details.rb +1 -1
- data/lib/braintree/transaction/disbursement_details.rb +1 -1
- 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/package_details.rb +16 -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 +32 -16
- data/lib/braintree/transaction_gateway.rb +30 -13
- data/lib/braintree/transaction_line_item.rb +13 -10
- data/lib/braintree/transaction_line_item_gateway.rb +1 -1
- data/lib/braintree/transaction_review.rb +1 -1
- data/lib/braintree/transaction_search.rb +1 -1
- 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 +2 -2
- data/lib/braintree/webhook_notification_gateway.rb +4 -4
- data/lib/braintree/webhook_testing.rb +1 -1
- data/lib/braintree/webhook_testing_gateway.rb +1 -1
- data/lib/braintree/xml/generator.rb +1 -1
- data/lib/braintree/xml/libxml.rb +1 -1
- data/lib/braintree/xml/parser.rb +3 -3
- data/lib/braintree/xml/rexml.rb +2 -2
- data/lib/braintree/xml.rb +1 -1
- data/lib/braintree.rb +5 -1
- data/spec/integration/braintree/client_api/spec_helper.rb +2 -2
- data/spec/integration/braintree/credit_card_spec.rb +4 -5
- data/spec/integration/braintree/credit_card_verification_spec.rb +46 -1
- data/spec/integration/braintree/customer_spec.rb +4 -4
- data/spec/integration/braintree/dispute_search_spec.rb +0 -1
- data/spec/integration/braintree/package_tracking_spec.rb +111 -0
- data/spec/integration/braintree/payment_method_nonce_spec.rb +20 -0
- data/spec/integration/braintree/payment_method_spec.rb +2 -2
- data/spec/integration/braintree/payment_method_us_bank_account_spec.rb +72 -0
- data/spec/integration/braintree/transaction_line_item_spec.rb +6 -0
- data/spec/integration/braintree/transaction_search_spec.rb +27 -0
- data/spec/integration/braintree/transaction_spec.rb +299 -89
- data/spec/unit/braintree/base_module_spec.rb +1 -1
- data/spec/unit/braintree/credit_card_verification_gateway_spec.rb +13 -8
- data/spec/unit/braintree/enriched_customer_data_spec.rb +9 -0
- data/spec/unit/braintree/http_spec.rb +1 -1
- 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/package_tracking_spec.rb +74 -0
- data/spec/unit/braintree/transaction_gateway_spec.rb +32 -3
- data/spec/unit/braintree/us_bank_account_verification_spec.rb +5 -0
- data/spec/unit/braintree/venmo_profile_data_spec.rb +11 -0
- metadata +13 -2
@@ -0,0 +1,60 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe Braintree::MetaCheckoutCard do
|
4
|
+
let(:attributes) do {
|
5
|
+
|
6
|
+
:bin => "abc1234",
|
7
|
+
:container_id => "a-container-id",
|
8
|
+
:card_type => "Visa",
|
9
|
+
:cardholder_name => "Meta Checkout Card CardHolder",
|
10
|
+
:commercial => "NO",
|
11
|
+
:country_of_issuance => "US",
|
12
|
+
:created_at => "2023-05-05T21:28:37Z",
|
13
|
+
:debit => "NO",
|
14
|
+
:durbin_regulated => "NO",
|
15
|
+
:expiration_month => "05",
|
16
|
+
:expiration_year => "2024",
|
17
|
+
:healthcare => "NO",
|
18
|
+
:last_4 => "1234",
|
19
|
+
:payroll => "NO",
|
20
|
+
:prepaid => "NO",
|
21
|
+
:token => "token1",
|
22
|
+
:unique_number_identifier => "abc1234",
|
23
|
+
:updated_at => "2023-05-05T21:28:37Z"
|
24
|
+
}
|
25
|
+
end
|
26
|
+
|
27
|
+
describe "unit tests" do
|
28
|
+
it "initializes with the correct attributes" do
|
29
|
+
card = Braintree::MetaCheckoutCard._new(:gateway, attributes)
|
30
|
+
|
31
|
+
card.bin.should == "abc1234"
|
32
|
+
card.container_id.should == "a-container-id"
|
33
|
+
card.card_type.should == "Visa"
|
34
|
+
card.cardholder_name.should == "Meta Checkout Card CardHolder"
|
35
|
+
card.commercial == "NO"
|
36
|
+
card.country_of_issuance == "US"
|
37
|
+
card.created_at == "2023-05-05T21:28:37Z"
|
38
|
+
card.updated_at == "2023-05-05T21:28:37Z"
|
39
|
+
card.debit == "NO"
|
40
|
+
card.payroll == "NO"
|
41
|
+
card.prepaid == "NO"
|
42
|
+
card.healthcare == "NO"
|
43
|
+
card.token == "token1"
|
44
|
+
card.unique_number_identifier == "abc1234"
|
45
|
+
card.expiration_month.should == "05"
|
46
|
+
card.expiration_year.should == "2024"
|
47
|
+
card.last_4.should == "1234"
|
48
|
+
end
|
49
|
+
|
50
|
+
it "sets expiration date correctly" do
|
51
|
+
card = Braintree::MetaCheckoutCard._new(:gateway, attributes)
|
52
|
+
card.expiration_date.should == "05/2024"
|
53
|
+
end
|
54
|
+
|
55
|
+
it "masks the card number correctly" do
|
56
|
+
card = Braintree::MetaCheckoutCard._new(:gateway, attributes)
|
57
|
+
card.masked_number.should == "abc1234******1234"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe Braintree::Transaction::MetaCheckoutTokenDetails do
|
4
|
+
let(:attributes) do {
|
5
|
+
:bin => "abc1234",
|
6
|
+
:container_id => "a-container-id",
|
7
|
+
:card_type => "Visa",
|
8
|
+
:cardholder_name => "Meta Checkout Card CardHolder",
|
9
|
+
:commercial => "NO",
|
10
|
+
:country_of_issuance => "US",
|
11
|
+
:created_at => "2023-05-05T21:28:37Z",
|
12
|
+
:debit => "NO",
|
13
|
+
:durbin_regulated => "NO",
|
14
|
+
:expiration_month => "05",
|
15
|
+
:expiration_year => "2024",
|
16
|
+
:healthcare => "NO",
|
17
|
+
:last_4 => "1234",
|
18
|
+
:payroll => "NO",
|
19
|
+
:prepaid => "NO",
|
20
|
+
:token => "token1",
|
21
|
+
:unique_number_identifier => "abc1234",
|
22
|
+
:updated_at => "2023-05-05T21:28:37Z",
|
23
|
+
:cryptogram => "AlhlvxmN2ZKuAAESNFZ4GoABFA==",
|
24
|
+
:ecommerce_indicator => "07"
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "unit tests" do
|
29
|
+
it "initializes with the correct attributes" do
|
30
|
+
card = Braintree::Transaction::MetaCheckoutTokenDetails.new(attributes)
|
31
|
+
|
32
|
+
card.bin.should == "abc1234"
|
33
|
+
card.container_id.should == "a-container-id"
|
34
|
+
card.card_type.should == "Visa"
|
35
|
+
card.cardholder_name.should == "Meta Checkout Card CardHolder"
|
36
|
+
card.commercial == "NO"
|
37
|
+
card.country_of_issuance == "US"
|
38
|
+
card.created_at == "2023-05-05T21:28:37Z"
|
39
|
+
card.updated_at == "2023-05-05T21:28:37Z"
|
40
|
+
card.debit == "NO"
|
41
|
+
card.payroll == "NO"
|
42
|
+
card.prepaid == "NO"
|
43
|
+
card.healthcare == "NO"
|
44
|
+
card.token == "token1"
|
45
|
+
card.unique_number_identifier == "abc1234"
|
46
|
+
card.expiration_month.should == "05"
|
47
|
+
card.expiration_year.should == "2024"
|
48
|
+
card.last_4.should == "1234"
|
49
|
+
card.cryptogram == "AlhlvxmN2ZKuAAESNFZ4GoABFA=="
|
50
|
+
card.ecommerce_indicator == "07"
|
51
|
+
end
|
52
|
+
|
53
|
+
it "sets expiration date correctly" do
|
54
|
+
card = Braintree::Transaction::MetaCheckoutTokenDetails.new(attributes)
|
55
|
+
card.expiration_date.should == "05/2024"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "masks the card number correctly" do
|
59
|
+
card = Braintree::Transaction::MetaCheckoutTokenDetails.new(attributes)
|
60
|
+
card.masked_number.should == "abc1234******1234"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,63 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe Braintree::MetaCheckoutToken do
|
4
|
+
let(:attributes) do {
|
5
|
+
:bin => "abc1234",
|
6
|
+
:container_id => "a-container-id",
|
7
|
+
:card_type => "Visa",
|
8
|
+
:cardholder_name => "Meta Checkout Card CardHolder",
|
9
|
+
:commercial => "NO",
|
10
|
+
:country_of_issuance => "US",
|
11
|
+
:created_at => "2023-05-05T21:28:37Z",
|
12
|
+
:debit => "NO",
|
13
|
+
:durbin_regulated => "NO",
|
14
|
+
:expiration_month => "05",
|
15
|
+
:expiration_year => "2024",
|
16
|
+
:healthcare => "NO",
|
17
|
+
:last_4 => "1234",
|
18
|
+
:payroll => "NO",
|
19
|
+
:prepaid => "NO",
|
20
|
+
:token => "token1",
|
21
|
+
:unique_number_identifier => "abc1234",
|
22
|
+
:updated_at => "2023-05-05T21:28:37Z",
|
23
|
+
:cryptogram => "AlhlvxmN2ZKuAAESNFZ4GoABFA==",
|
24
|
+
:ecommerce_indicator => "07"
|
25
|
+
}
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "unit tests" do
|
29
|
+
it "initializes with the correct attributes" do
|
30
|
+
card = Braintree::MetaCheckoutToken._new(:gateway, attributes)
|
31
|
+
|
32
|
+
card.bin.should == "abc1234"
|
33
|
+
card.container_id.should == "a-container-id"
|
34
|
+
card.card_type.should == "Visa"
|
35
|
+
card.cardholder_name.should == "Meta Checkout Card CardHolder"
|
36
|
+
card.commercial == "NO"
|
37
|
+
card.country_of_issuance == "US"
|
38
|
+
card.created_at == "2023-05-05T21:28:37Z"
|
39
|
+
card.updated_at == "2023-05-05T21:28:37Z"
|
40
|
+
card.debit == "NO"
|
41
|
+
card.payroll == "NO"
|
42
|
+
card.prepaid == "NO"
|
43
|
+
card.healthcare == "NO"
|
44
|
+
card.token == "token1"
|
45
|
+
card.unique_number_identifier == "abc1234"
|
46
|
+
card.expiration_month.should == "05"
|
47
|
+
card.expiration_year.should == "2024"
|
48
|
+
card.last_4.should == "1234"
|
49
|
+
card.cryptogram == "AlhlvxmN2ZKuAAESNFZ4GoABFA=="
|
50
|
+
card.ecommerce_indicator == "07"
|
51
|
+
end
|
52
|
+
|
53
|
+
it "sets expiration date correctly" do
|
54
|
+
card = Braintree::MetaCheckoutToken._new(:gateway, attributes)
|
55
|
+
card.expiration_date.should == "05/2024"
|
56
|
+
end
|
57
|
+
|
58
|
+
it "masks the card number correctly" do
|
59
|
+
card = Braintree::MetaCheckoutToken._new(:gateway, attributes)
|
60
|
+
card.masked_number.should == "abc1234******1234"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,74 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
2
|
+
|
3
|
+
describe "Package Tracking Unit Tests" do
|
4
|
+
describe "creates and validates requests" do
|
5
|
+
let(:gateway) do
|
6
|
+
config = Braintree::Configuration.new(
|
7
|
+
:merchant_id => "merchant_id",
|
8
|
+
:public_key => "public_key",
|
9
|
+
:private_key => "private_key",
|
10
|
+
)
|
11
|
+
Braintree::Gateway.new(config)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "creates transaction gateway package tracking request signature" do
|
15
|
+
expect(Braintree::TransactionGateway._package_tracking_request_signature).to match(
|
16
|
+
[
|
17
|
+
:carrier,
|
18
|
+
{:line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url]},
|
19
|
+
:notify_payer, :tracking_number,
|
20
|
+
],
|
21
|
+
)
|
22
|
+
end
|
23
|
+
|
24
|
+
it "raises an ArgumentError if transaction_id is an invalid format" do
|
25
|
+
expect do
|
26
|
+
Braintree::Transaction.package_tracking("invalid-transaction-id", {})
|
27
|
+
end.to raise_error(ArgumentError, "transaction_id is invalid")
|
28
|
+
end
|
29
|
+
|
30
|
+
it "raises an exception if attributes contain an invalid key" do
|
31
|
+
expect do
|
32
|
+
Braintree::Transaction.package_tracking("txn123", {:invalid_key => "random", :carrier => "UPS", :tracking_number => "123123"})
|
33
|
+
end.to raise_error(ArgumentError, "invalid keys: invalid_key")
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
describe "handles response" do
|
38
|
+
it "parses the packages response correctly" do
|
39
|
+
transaction = Braintree::Transaction._new(
|
40
|
+
:gateway,
|
41
|
+
:shipments => [
|
42
|
+
{:id => "id1", :carrier => "UPS", :tracking_number => "tracking_number_1", :paypal_tracking_id => "pp_tracking_number_1"},
|
43
|
+
{:id => "id2", :carrier => "FEDEX", :tracking_number => "tracking_number_2", :paypal_tracking_id => "pp_tracking_number_2"}
|
44
|
+
],
|
45
|
+
)
|
46
|
+
expect(transaction.packages.size).to eq(2)
|
47
|
+
expect(transaction.packages[0].id).to eq("id1")
|
48
|
+
expect(transaction.packages[0].carrier).to eq("UPS")
|
49
|
+
expect(transaction.packages[0].tracking_number).to eq("tracking_number_1")
|
50
|
+
expect(transaction.packages[0].paypal_tracking_id).to eq("pp_tracking_number_1")
|
51
|
+
|
52
|
+
expect(transaction.packages[1].id).to eq("id2")
|
53
|
+
expect(transaction.packages[1].carrier).to eq("FEDEX")
|
54
|
+
expect(transaction.packages[1].tracking_number).to eq("tracking_number_2")
|
55
|
+
expect(transaction.packages[1].paypal_tracking_id).to eq("pp_tracking_number_2")
|
56
|
+
end
|
57
|
+
|
58
|
+
it "doesn't blow up if no shipments are present in the transaction response" do
|
59
|
+
transaction = Braintree::Transaction._new(
|
60
|
+
:gateway,
|
61
|
+
:shipments => [],
|
62
|
+
)
|
63
|
+
expect(transaction.packages.size).to eq(0)
|
64
|
+
end
|
65
|
+
|
66
|
+
it "doesn't blow up if shipments tag is not present in the transaction response" do
|
67
|
+
transaction = Braintree::Transaction._new(
|
68
|
+
:gateway,
|
69
|
+
{},
|
70
|
+
)
|
71
|
+
expect(transaction.packages.size).to eq(0)
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
@@ -41,7 +41,7 @@ describe Braintree::TransactionGateway do
|
|
41
41
|
:ships_from_postal_code, :tax_amount, :tax_exempt, :three_d_secure_authentication_id,:three_d_secure_token, #Deprecated
|
42
42
|
:transaction_source, :type, :venmo_sdk_payment_method_code, #Deprecated
|
43
43
|
:sca_exemption, :currency_iso_code, :exchange_rate_quote_id,
|
44
|
-
{:line_items => [:
|
44
|
+
{:line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url]},
|
45
45
|
{:risk_data => [:customer_browser, :customer_device_id, :customer_ip, :customer_location_zip, :customer_tenure]},
|
46
46
|
{: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]}]},
|
47
47
|
{:customer => [:id, :company, :email, :fax, :first_name, :last_name, :phone, :website]},
|
@@ -81,7 +81,7 @@ describe Braintree::TransactionGateway do
|
|
81
81
|
{:three_d_secure => [:required]},
|
82
82
|
{:amex_rewards => [:request_id, :points, :currency_amount, :currency_iso_code]},
|
83
83
|
{:venmo => [:profile_id]},
|
84
|
-
{:credit_card => [:account_type]},
|
84
|
+
{:credit_card => [:account_type, :process_debit_as_credit]},
|
85
85
|
]
|
86
86
|
},
|
87
87
|
{:external_vault => [
|
@@ -94,7 +94,7 @@ describe Braintree::TransactionGateway do
|
|
94
94
|
{:industry => [
|
95
95
|
:industry_type,
|
96
96
|
{:data => [
|
97
|
-
:folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
|
97
|
+
:country_code, :date_of_birth, :folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
|
98
98
|
:passenger_first_name, :passenger_last_name, :passenger_middle_initial, :passenger_title, :issued_date, :travel_agency_name, :travel_agency_code, :ticket_number,
|
99
99
|
:issuing_carrier_code, :customer_code, :fare_amount, :fee_amount, :tax_amount, :restricted_ticket, :no_show, :advanced_deposit, :fire_safe, :property_phone, :ticket_issuer_address, :arrival_date,
|
100
100
|
{:legs => [
|
@@ -111,5 +111,34 @@ describe Braintree::TransactionGateway do
|
|
111
111
|
{:installments => [:count]},
|
112
112
|
])
|
113
113
|
end
|
114
|
+
|
115
|
+
it "creates a transaction gateway submit for settlement signature" do
|
116
|
+
expect(Braintree::TransactionGateway._submit_for_settlement_signature).to match([
|
117
|
+
:order_id,
|
118
|
+
{:descriptor => [:name, :phone, :url]},
|
119
|
+
{:industry => [
|
120
|
+
:industry_type,
|
121
|
+
{:data => [
|
122
|
+
:country_code, :date_of_birth, :folio_number, :check_in_date, :check_out_date, :travel_package, :lodging_check_in_date, :lodging_check_out_date, :departure_date, :lodging_name, :room_rate, :room_tax,
|
123
|
+
:passenger_first_name, :passenger_last_name, :passenger_middle_initial, :passenger_title, :issued_date, :travel_agency_name, :travel_agency_code, :ticket_number,
|
124
|
+
:issuing_carrier_code, :customer_code, :fare_amount, :fee_amount, :tax_amount, :restricted_ticket, :no_show, :advanced_deposit, :fire_safe, :property_phone, :ticket_issuer_address, :arrival_date,
|
125
|
+
{:legs => [
|
126
|
+
:conjunction_ticket, :exchange_ticket, :coupon_number, :service_class, :carrier_code, :fare_basis_code, :flight_number, :departure_date, :departure_airport_code, :departure_time,
|
127
|
+
:arrival_airport_code, :arrival_time, :stopover_permitted, :fare_amount, :fee_amount, :tax_amount, :endorsement_or_restrictions,
|
128
|
+
]},
|
129
|
+
{:additional_charges => [
|
130
|
+
:kind, :amount,
|
131
|
+
]},
|
132
|
+
]},
|
133
|
+
]},
|
134
|
+
:purchase_order_number,
|
135
|
+
:tax_amount,
|
136
|
+
:tax_exempt,
|
137
|
+
:discount_amount,
|
138
|
+
:shipping_amount,
|
139
|
+
:ships_from_postal_code,
|
140
|
+
:line_items => [:commodity_code, :description, :discount_amount, :image_url, :kind, :name, :product_code, :quantity, :tax_amount, :total_amount, :unit_amount, :unit_of_measure, :unit_tax_amount, :upc_code, :upc_type, :url],
|
141
|
+
])
|
142
|
+
end
|
114
143
|
end
|
115
144
|
end
|
@@ -8,12 +8,17 @@ describe Braintree::UsBankAccountVerification do
|
|
8
8
|
:status => Braintree::UsBankAccountVerification::Status::Verified,
|
9
9
|
:verification_method => Braintree::UsBankAccountVerification::VerificationMethod::IndependentCheck,
|
10
10
|
:verification_determined_at => "2018-02-28T12:01:01Z",
|
11
|
+
:additional_processor_response => "some_invalid_processor_response",
|
11
12
|
)
|
12
13
|
end
|
13
14
|
|
14
15
|
it "has a status" do
|
15
16
|
expect(verification.status).to eq(Braintree::UsBankAccountVerification::Status::Verified)
|
16
17
|
end
|
18
|
+
|
19
|
+
it "has additional processor response" do
|
20
|
+
expect(verification.additional_processor_response).to eq("some_invalid_processor_response")
|
21
|
+
end
|
17
22
|
end
|
18
23
|
|
19
24
|
describe "self.confirm_micro_transfer_amounts" do
|
@@ -12,12 +12,21 @@ describe Braintree::VenmoProfileData do
|
|
12
12
|
describe "self._new" do
|
13
13
|
it "initializes the object with the appropriate attributes set" do
|
14
14
|
|
15
|
+
address = {
|
16
|
+
street_address: "a-street-address",
|
17
|
+
extended_address: "an-extended-address",
|
18
|
+
locality: "a-locality",
|
19
|
+
region: "a-region",
|
20
|
+
postal_code: "a-postal-code"
|
21
|
+
}
|
15
22
|
params = {
|
16
23
|
username: "a-username",
|
17
24
|
first_name: "a-first-name",
|
18
25
|
last_name: "a-last-name",
|
19
26
|
phone_number: "12312312343",
|
20
27
|
email: "a-email",
|
28
|
+
billing_address: address,
|
29
|
+
shipping_address: address
|
21
30
|
}
|
22
31
|
|
23
32
|
payment_method_customer_data_updated = Braintree::VenmoProfileData._new(params)
|
@@ -27,6 +36,8 @@ describe Braintree::VenmoProfileData do
|
|
27
36
|
expect(payment_method_customer_data_updated.last_name).to eq("a-last-name")
|
28
37
|
expect(payment_method_customer_data_updated.phone_number).to eq("12312312343")
|
29
38
|
expect(payment_method_customer_data_updated.email).to eq("a-email")
|
39
|
+
expect(payment_method_customer_data_updated.billing_address).to eq(address)
|
40
|
+
expect(payment_method_customer_data_updated.shipping_address).to eq(address)
|
30
41
|
end
|
31
42
|
end
|
32
43
|
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: 4.
|
4
|
+
version: 4.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Braintree
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -122,6 +122,8 @@ files:
|
|
122
122
|
- lib/braintree/merchant_account/individual_details.rb
|
123
123
|
- lib/braintree/merchant_account_gateway.rb
|
124
124
|
- lib/braintree/merchant_gateway.rb
|
125
|
+
- lib/braintree/meta_checkout_card.rb
|
126
|
+
- lib/braintree/meta_checkout_token.rb
|
125
127
|
- lib/braintree/modification.rb
|
126
128
|
- lib/braintree/oauth_credentials.rb
|
127
129
|
- lib/braintree/oauth_gateway.rb
|
@@ -177,6 +179,9 @@ files:
|
|
177
179
|
- lib/braintree/transaction/installment.rb
|
178
180
|
- lib/braintree/transaction/installment/adjustment.rb
|
179
181
|
- lib/braintree/transaction/local_payment_details.rb
|
182
|
+
- lib/braintree/transaction/meta_checkout_card_details.rb
|
183
|
+
- lib/braintree/transaction/meta_checkout_token_details.rb
|
184
|
+
- lib/braintree/transaction/package_details.rb
|
180
185
|
- lib/braintree/transaction/payment_receipt.rb
|
181
186
|
- lib/braintree/transaction/payment_receipt/card_present_data.rb
|
182
187
|
- lib/braintree/transaction/payment_receipt/merchant_address.rb
|
@@ -246,6 +251,7 @@ files:
|
|
246
251
|
- spec/integration/braintree/merchant_account_spec.rb
|
247
252
|
- spec/integration/braintree/merchant_spec.rb
|
248
253
|
- spec/integration/braintree/oauth_spec.rb
|
254
|
+
- spec/integration/braintree/package_tracking_spec.rb
|
249
255
|
- spec/integration/braintree/payment_method_nonce_spec.rb
|
250
256
|
- spec/integration/braintree/payment_method_spec.rb
|
251
257
|
- spec/integration/braintree/payment_method_us_bank_account_spec.rb
|
@@ -302,7 +308,12 @@ files:
|
|
302
308
|
- spec/unit/braintree/local_payment_expired_spec.rb
|
303
309
|
- spec/unit/braintree/local_payment_funded_spec.rb
|
304
310
|
- spec/unit/braintree/merchant_account_spec.rb
|
311
|
+
- spec/unit/braintree/meta_checkout_card_details_spec.rb
|
312
|
+
- spec/unit/braintree/meta_checkout_card_spec.rb
|
313
|
+
- spec/unit/braintree/meta_checkout_token_details_spec.rb
|
314
|
+
- spec/unit/braintree/meta_checkout_token_spec.rb
|
305
315
|
- spec/unit/braintree/modification_spec.rb
|
316
|
+
- spec/unit/braintree/package_tracking_spec.rb
|
306
317
|
- spec/unit/braintree/payment_method_customer_data_updated_metadata_spec.rb
|
307
318
|
- spec/unit/braintree/payment_method_nonce_details_payer_info_spec.rb
|
308
319
|
- spec/unit/braintree/payment_method_nonce_details_spec.rb
|