braintree 2.93.0 → 2.94.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.rb +2 -0
- data/lib/braintree/error_codes.rb +1 -0
- data/lib/braintree/payment_method_gateway.rb +32 -43
- data/lib/braintree/payment_method_parser.rb +32 -0
- data/lib/braintree/revoked_payment_method_metadata.rb +22 -0
- data/lib/braintree/util.rb +1 -1
- data/lib/braintree/version.rb +1 -1
- data/lib/braintree/webhook_notification.rb +3 -0
- data/spec/fixtures/files/too_long.pdf +0 -0
- data/spec/integration/braintree/add_on_spec.rb +1 -1
- data/spec/integration/braintree/credit_card_spec.rb +10 -10
- data/spec/integration/braintree/customer_spec.rb +9 -9
- data/spec/integration/braintree/discount_spec.rb +1 -1
- data/spec/integration/braintree/document_upload_spec.rb +7 -0
- data/spec/integration/braintree/ideal_payment_spec.rb +2 -2
- data/spec/integration/braintree/payment_method_nonce_spec.rb +19 -0
- data/spec/integration/braintree/payment_method_spec.rb +2 -2
- data/spec/integration/braintree/paypal_account_spec.rb +2 -2
- data/spec/integration/braintree/subscription_spec.rb +39 -39
- data/spec/integration/braintree/transaction_line_item_spec.rb +3 -3
- data/spec/integration/braintree/transaction_search_spec.rb +2 -2
- data/spec/integration/braintree/transaction_spec.rb +60 -60
- data/spec/integration/braintree/transaction_us_bank_account_spec.rb +7 -7
- data/spec/integration/braintree/transparent_redirect_spec.rb +2 -2
- data/spec/integration/braintree/us_bank_account_spec.rb +2 -2
- data/spec/spec_helper.rb +4 -4
- data/spec/unit/braintree/credit_card_verification_spec.rb +2 -2
- data/spec/unit/braintree/modification_spec.rb +1 -1
- data/spec/unit/braintree/subscription_spec.rb +2 -2
- data/spec/unit/braintree/transaction_spec.rb +2 -2
- data/spec/unit/braintree/util_spec.rb +2 -2
- data/spec/unit/braintree/webhook_notification_spec.rb +133 -0
- data/spec/unit/braintree/xml_spec.rb +3 -3
- metadata +5 -2
@@ -28,7 +28,7 @@ describe Braintree::Transaction do
|
|
28
28
|
result.transaction.id.should =~ /^\w{6,}$/
|
29
29
|
result.transaction.type.should == "sale"
|
30
30
|
result.transaction.payment_instrument_type.should == Braintree::PaymentInstrumentType::UsBankAccount
|
31
|
-
result.transaction.amount.should == BigDecimal
|
31
|
+
result.transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
32
32
|
result.transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
33
33
|
result.transaction.us_bank_account_details.routing_number.should == "011000015"
|
34
34
|
result.transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -73,7 +73,7 @@ describe Braintree::Transaction do
|
|
73
73
|
|
74
74
|
transaction.id.should =~ /^\w{6,}$/
|
75
75
|
transaction.type.should == "sale"
|
76
|
-
transaction.amount.should == BigDecimal
|
76
|
+
transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
77
77
|
transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
78
78
|
transaction.us_bank_account_details.routing_number.should == "011000015"
|
79
79
|
transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -114,7 +114,7 @@ describe Braintree::Transaction do
|
|
114
114
|
|
115
115
|
transaction.id.should =~ /^\w{6,}$/
|
116
116
|
transaction.type.should == "sale"
|
117
|
-
transaction.amount.should == BigDecimal
|
117
|
+
transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
118
118
|
transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
119
119
|
transaction.us_bank_account_details.routing_number.should == "011000015"
|
120
120
|
transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -247,7 +247,7 @@ describe Braintree::Transaction do
|
|
247
247
|
result.transaction.id.should =~ /^\w{6,}$/
|
248
248
|
result.transaction.type.should == "sale"
|
249
249
|
result.transaction.payment_instrument_type.should == Braintree::PaymentInstrumentType::UsBankAccount
|
250
|
-
result.transaction.amount.should == BigDecimal
|
250
|
+
result.transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
251
251
|
result.transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
252
252
|
result.transaction.us_bank_account_details.routing_number.should == "011000015"
|
253
253
|
result.transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -294,7 +294,7 @@ describe Braintree::Transaction do
|
|
294
294
|
|
295
295
|
transaction.id.should =~ /^\w{6,}$/
|
296
296
|
transaction.type.should == "sale"
|
297
|
-
transaction.amount.should == BigDecimal
|
297
|
+
transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
298
298
|
transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
299
299
|
transaction.us_bank_account_details.routing_number.should == "011000015"
|
300
300
|
transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -335,7 +335,7 @@ describe Braintree::Transaction do
|
|
335
335
|
|
336
336
|
transaction.id.should =~ /^\w{6,}$/
|
337
337
|
transaction.type.should == "sale"
|
338
|
-
transaction.amount.should == BigDecimal
|
338
|
+
transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
339
339
|
transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
340
340
|
transaction.us_bank_account_details.routing_number.should == "011000015"
|
341
341
|
transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -369,7 +369,7 @@ describe Braintree::Transaction do
|
|
369
369
|
|
370
370
|
transaction.id.should =~ /^\w{6,}$/
|
371
371
|
transaction.type.should == "sale"
|
372
|
-
transaction.amount.should == BigDecimal
|
372
|
+
transaction.amount.should == BigDecimal(Braintree::Test::TransactionAmounts::Authorize)
|
373
373
|
transaction.status.should == Braintree::Transaction::Status::SettlementPending
|
374
374
|
transaction.us_bank_account_details.routing_number.should == "021000021"
|
375
375
|
transaction.us_bank_account_details.last_4.should == "0000"
|
@@ -51,7 +51,7 @@ describe Braintree::TransparentRedirect do
|
|
51
51
|
result.success?.should == true
|
52
52
|
transaction = result.transaction
|
53
53
|
transaction.type.should == "sale"
|
54
|
-
transaction.amount.should == BigDecimal
|
54
|
+
transaction.amount.should == BigDecimal("1000.00")
|
55
55
|
transaction.credit_card_details.bin.should == Braintree::Test::CreditCardNumbers::Visa[0, 6]
|
56
56
|
transaction.credit_card_details.last_4.should == Braintree::Test::CreditCardNumbers::Visa[-4..-1]
|
57
57
|
transaction.credit_card_details.expiration_date.should == "05/2009"
|
@@ -78,7 +78,7 @@ describe Braintree::TransparentRedirect do
|
|
78
78
|
query_string_response = SpecHelper.simulate_form_post_for_tr(tr_data, params)
|
79
79
|
result = Braintree::TransparentRedirect.confirm(query_string_response)
|
80
80
|
result.success?.should == true
|
81
|
-
result.transaction.service_fee_amount.should == BigDecimal
|
81
|
+
result.transaction.service_fee_amount.should == BigDecimal("1.00")
|
82
82
|
end
|
83
83
|
|
84
84
|
it "returns an error when there's an error" do
|
@@ -55,7 +55,7 @@ describe Braintree::UsBankAccount do
|
|
55
55
|
)
|
56
56
|
|
57
57
|
result.success?.should == true
|
58
|
-
result.transaction.amount.should == BigDecimal
|
58
|
+
result.transaction.amount.should == BigDecimal("100.00")
|
59
59
|
result.transaction.type.should == "sale"
|
60
60
|
us_bank_account = result.transaction.us_bank_account_details
|
61
61
|
us_bank_account.routing_number.should == "021000021"
|
@@ -88,7 +88,7 @@ describe Braintree::UsBankAccount do
|
|
88
88
|
:amount => "100.00"
|
89
89
|
)
|
90
90
|
|
91
|
-
transaction.amount.should == BigDecimal
|
91
|
+
transaction.amount.should == BigDecimal("100.00")
|
92
92
|
transaction.type.should == "sale"
|
93
93
|
us_bank_account = transaction.us_bank_account_details
|
94
94
|
us_bank_account.routing_number.should == "021000021"
|
data/spec/spec_helper.rb
CHANGED
@@ -47,7 +47,7 @@ unless defined?(SPEC_HELPER_LOADED)
|
|
47
47
|
TrialPlan = {
|
48
48
|
:description => "Plan for integration tests -- with trial",
|
49
49
|
:id => "integration_trial_plan",
|
50
|
-
:price => BigDecimal
|
50
|
+
:price => BigDecimal("43.21"),
|
51
51
|
:trial_period => true,
|
52
52
|
:trial_duration => 2,
|
53
53
|
:trial_duration_unit => Braintree::Subscription::TrialDurationUnit::Day
|
@@ -56,14 +56,14 @@ unless defined?(SPEC_HELPER_LOADED)
|
|
56
56
|
TriallessPlan = {
|
57
57
|
:description => "Plan for integration tests -- without a trial",
|
58
58
|
:id => "integration_trialless_plan",
|
59
|
-
:price => BigDecimal
|
59
|
+
:price => BigDecimal("12.34"),
|
60
60
|
:trial_period => false
|
61
61
|
}
|
62
62
|
|
63
63
|
AddOnDiscountPlan = {
|
64
64
|
:description => "Plan for integration tests -- with add-ons and discounts",
|
65
65
|
:id => "integration_plan_with_add_ons_and_discounts",
|
66
|
-
:price => BigDecimal
|
66
|
+
:price => BigDecimal("9.99"),
|
67
67
|
:trial_period => true,
|
68
68
|
:trial_duration => 2,
|
69
69
|
:trial_duration_unit => Braintree::Subscription::TrialDurationUnit::Day
|
@@ -72,7 +72,7 @@ unless defined?(SPEC_HELPER_LOADED)
|
|
72
72
|
BillingDayOfMonthPlan = {
|
73
73
|
:description => "Plan for integration tests -- with billing day of month",
|
74
74
|
:id => "integration_plan_with_billing_day_of_month",
|
75
|
-
:price => BigDecimal
|
75
|
+
:price => BigDecimal("8.88"),
|
76
76
|
:billing_day_of_month => 5
|
77
77
|
}
|
78
78
|
|
@@ -36,8 +36,8 @@ describe Braintree::CreditCardVerification do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "accepts amount as either a String or BigDecimal" do
|
39
|
-
Braintree::CreditCardVerification._new(:amount => "12.34").amount.should == BigDecimal
|
40
|
-
Braintree::CreditCardVerification._new(:amount => BigDecimal
|
39
|
+
Braintree::CreditCardVerification._new(:amount => "12.34").amount.should == BigDecimal("12.34")
|
40
|
+
Braintree::CreditCardVerification._new(:amount => BigDecimal("12.34")).amount.should == BigDecimal("12.34")
|
41
41
|
end
|
42
42
|
|
43
43
|
describe "self.create" do
|
@@ -2,6 +2,6 @@ require File.expand_path(File.dirname(__FILE__) + "/../spec_helper")
|
|
2
2
|
|
3
3
|
describe Braintree::Modification do
|
4
4
|
it "converts string amount" do
|
5
|
-
Braintree::Modification._new(:amount => "100.00").amount.should == BigDecimal
|
5
|
+
Braintree::Modification._new(:amount => "100.00").amount.should == BigDecimal("100.00")
|
6
6
|
end
|
7
7
|
end
|
@@ -11,8 +11,8 @@ describe Braintree::Subscription do
|
|
11
11
|
|
12
12
|
context "price" do
|
13
13
|
it "accepts price as either a String or a BigDecimal" do
|
14
|
-
Braintree::Subscription._new(:gateway, default_params.merge(:price => "12.34")).price.should == BigDecimal
|
15
|
-
Braintree::Subscription._new(:gateway, default_params.merge(:price => BigDecimal
|
14
|
+
Braintree::Subscription._new(:gateway, default_params.merge(:price => "12.34")).price.should == BigDecimal("12.34")
|
15
|
+
Braintree::Subscription._new(:gateway, default_params.merge(:price => BigDecimal("12.34"))).price.should == BigDecimal("12.34")
|
16
16
|
end
|
17
17
|
|
18
18
|
it "blows up if price is not a string or BigDecimal" do
|
@@ -238,8 +238,8 @@ describe Braintree::Transaction do
|
|
238
238
|
end
|
239
239
|
|
240
240
|
it "accepts amount as either a String or a BigDecimal" do
|
241
|
-
Braintree::Transaction._new(:gateway, :amount => "12.34").amount.should == BigDecimal
|
242
|
-
Braintree::Transaction._new(:gateway, :amount => BigDecimal
|
241
|
+
Braintree::Transaction._new(:gateway, :amount => "12.34").amount.should == BigDecimal("12.34")
|
242
|
+
Braintree::Transaction._new(:gateway, :amount => BigDecimal("12.34")).amount.should == BigDecimal("12.34")
|
243
243
|
end
|
244
244
|
|
245
245
|
it "blows up if amount is not a string or BigDecimal" do
|
@@ -354,11 +354,11 @@ describe Braintree::Util do
|
|
354
354
|
|
355
355
|
describe "self.to_big_decimal" do
|
356
356
|
it "returns the BigDecimal when given a BigDecimal" do
|
357
|
-
Braintree::Util.to_big_decimal(BigDecimal
|
357
|
+
Braintree::Util.to_big_decimal(BigDecimal("12.34")).should == BigDecimal("12.34")
|
358
358
|
end
|
359
359
|
|
360
360
|
it "returns a BigDecimal when given a string" do
|
361
|
-
Braintree::Util.to_big_decimal("12.34").should == BigDecimal
|
361
|
+
Braintree::Util.to_big_decimal("12.34").should == BigDecimal("12.34")
|
362
362
|
end
|
363
363
|
|
364
364
|
it "returns nil when given nil" do
|
@@ -454,6 +454,139 @@ describe Braintree::WebhookNotification do
|
|
454
454
|
end
|
455
455
|
end
|
456
456
|
|
457
|
+
context "granted_payment_instrument_revoked" do
|
458
|
+
let(:gateway) do
|
459
|
+
config = Braintree::Configuration.new(
|
460
|
+
:merchant_id => 'merchant_id',
|
461
|
+
:public_key => 'wrong_public_key',
|
462
|
+
:private_key => 'wrong_private_key'
|
463
|
+
)
|
464
|
+
Braintree::Gateway.new(config)
|
465
|
+
end
|
466
|
+
|
467
|
+
describe "credit cards" do
|
468
|
+
it "builds a webhook notification for a granted_payment_instrument_revoked webhook" do
|
469
|
+
webhook_xml_response = <<-XML
|
470
|
+
<notification>
|
471
|
+
<source-merchant-id>12345</source-merchant-id>
|
472
|
+
<timestamp type="datetime">2018-10-10T22:46:41Z</timestamp>
|
473
|
+
<kind>granted_payment_instrument_revoked</kind>
|
474
|
+
<subject>
|
475
|
+
<credit-card>
|
476
|
+
<bin>555555</bin>
|
477
|
+
<card-type>MasterCard</card-type>
|
478
|
+
<cardholder-name>Amber Ankunding</cardholder-name>
|
479
|
+
<commercial>Unknown</commercial>
|
480
|
+
<country-of-issuance>Unknown</country-of-issuance>
|
481
|
+
<created-at type="datetime">2018-10-10T22:46:41Z</created-at>
|
482
|
+
<customer-id>credit_card_customer_id</customer-id>
|
483
|
+
<customer-location>US</customer-location>
|
484
|
+
<debit>Unknown</debit>
|
485
|
+
<default type="boolean">true</default>
|
486
|
+
<durbin-regulated>Unknown</durbin-regulated>
|
487
|
+
<expiration-month>06</expiration-month>
|
488
|
+
<expiration-year>2020</expiration-year>
|
489
|
+
<expired type="boolean">false</expired>
|
490
|
+
<global-id>cGF5bWVudG1ldGhvZF8zcHQ2d2hz</global-id>
|
491
|
+
<healthcare>Unknown</healthcare>
|
492
|
+
<image-url>https://assets.braintreegateway.com/payment_method_logo/mastercard.png?environment=test</image-url>
|
493
|
+
<issuing-bank>Unknown</issuing-bank>
|
494
|
+
<last-4>4444</last-4>
|
495
|
+
<payroll>Unknown</payroll>
|
496
|
+
<prepaid>Unknown</prepaid>
|
497
|
+
<product-id>Unknown</product-id>
|
498
|
+
<subscriptions type="array"/>
|
499
|
+
<token>credit_card_token</token>
|
500
|
+
<unique-number-identifier>08199d188e37460163207f714faf074a</unique-number-identifier>
|
501
|
+
<updated-at type="datetime">2018-10-10T22:46:41Z</updated-at>
|
502
|
+
<venmo-sdk type="boolean">false</venmo-sdk>
|
503
|
+
<verifications type="array"/>
|
504
|
+
</credit-card>
|
505
|
+
</subject>
|
506
|
+
</notification>
|
507
|
+
XML
|
508
|
+
attributes = Braintree::Xml.hash_from_xml(webhook_xml_response)
|
509
|
+
notification = Braintree::WebhookNotification._new(gateway, attributes[:notification])
|
510
|
+
metadata = notification.revoked_payment_method_metadata
|
511
|
+
|
512
|
+
notification.kind.should == Braintree::WebhookNotification::Kind::GrantedPaymentInstrumentRevoked
|
513
|
+
metadata.customer_id.should == "credit_card_customer_id"
|
514
|
+
metadata.token.should == "credit_card_token"
|
515
|
+
metadata.revoked_payment_method.class.should == Braintree::CreditCard
|
516
|
+
end
|
517
|
+
end
|
518
|
+
|
519
|
+
describe "paypal accounts" do
|
520
|
+
it "builds a webhook notification for a granted_payment_instrument_revoked webhook" do
|
521
|
+
webhook_xml_response = <<-XML
|
522
|
+
<notification>
|
523
|
+
<source-merchant-id>12345</source-merchant-id>
|
524
|
+
<timestamp type="datetime">2018-10-10T22:46:41Z</timestamp>
|
525
|
+
<kind>granted_payment_instrument_revoked</kind>
|
526
|
+
<subject>
|
527
|
+
<paypal-account>
|
528
|
+
<billing-agreement-id>billing_agreement_id</billing-agreement-id>
|
529
|
+
<created-at type="dateTime">2018-10-11T21:10:33Z</created-at>
|
530
|
+
<customer-id>paypal_customer_id</customer-id>
|
531
|
+
<default type="boolean">true</default>
|
532
|
+
<email>johndoe@example.com</email>
|
533
|
+
<global-id>cGF5bWVudG1ldGhvZF9wYXlwYWxfdG9rZW4</global-id>
|
534
|
+
<image-url>https://jsdk.bt.local:9000/payment_method_logo/paypal.png?environment=test://assets.braintreegateway.com/payment_method_logo/paypal.png?environment=test</image-url>
|
535
|
+
<subscriptions type="array"></subscriptions>
|
536
|
+
<token>paypal_token</token>
|
537
|
+
<updated-at type="dateTime">2018-10-11T21:10:33Z</updated-at>
|
538
|
+
<payer-id>a6a8e1a4</payer-id>
|
539
|
+
</paypal-account>
|
540
|
+
</subject>
|
541
|
+
</notification>
|
542
|
+
XML
|
543
|
+
attributes = Braintree::Xml.hash_from_xml(webhook_xml_response)
|
544
|
+
notification = Braintree::WebhookNotification._new(gateway, attributes[:notification])
|
545
|
+
metadata = notification.revoked_payment_method_metadata
|
546
|
+
|
547
|
+
notification.kind.should == Braintree::WebhookNotification::Kind::GrantedPaymentInstrumentRevoked
|
548
|
+
metadata.customer_id.should == "paypal_customer_id"
|
549
|
+
metadata.token.should == "paypal_token"
|
550
|
+
metadata.revoked_payment_method.class.should == Braintree::PayPalAccount
|
551
|
+
end
|
552
|
+
end
|
553
|
+
|
554
|
+
describe "venmo accounts" do
|
555
|
+
it "builds a webhook notification for a granted_payment_instrument_revoked webhook" do
|
556
|
+
webhook_xml_response = <<-XML
|
557
|
+
<notification>
|
558
|
+
<source-merchant-id>12345</source-merchant-id>
|
559
|
+
<timestamp type="datetime">2018-10-10T22:46:41Z</timestamp>
|
560
|
+
<kind>granted_payment_instrument_revoked</kind>
|
561
|
+
<subject>
|
562
|
+
<venmo-account>
|
563
|
+
<created-at type="dateTime">2018-10-11T21:28:37Z</created-at>
|
564
|
+
<updated-at type="dateTime">2018-10-11T21:28:37Z</updated-at>
|
565
|
+
<default type="boolean">true</default>
|
566
|
+
<image-url>https://assets.braintreegateway.com/payment_method_logo/venmo.png?environment=test</image-url>
|
567
|
+
<token>venmo_token</token>
|
568
|
+
<source-description>Venmo Account: venmojoe</source-description>
|
569
|
+
<username>venmojoe</username>
|
570
|
+
<venmo-user-id>456</venmo-user-id>
|
571
|
+
<subscriptions type="array"/>
|
572
|
+
<customer-id>venmo_customer_id</customer-id>
|
573
|
+
<global-id>cGF5bWVudG1ldGhvZF92ZW5tb2FjY291bnQ</global-id>
|
574
|
+
</venmo-account>
|
575
|
+
</subject>
|
576
|
+
</notification>
|
577
|
+
XML
|
578
|
+
attributes = Braintree::Xml.hash_from_xml(webhook_xml_response)
|
579
|
+
notification = Braintree::WebhookNotification._new(gateway, attributes[:notification])
|
580
|
+
metadata = notification.revoked_payment_method_metadata
|
581
|
+
|
582
|
+
notification.kind.should == Braintree::WebhookNotification::Kind::GrantedPaymentInstrumentRevoked
|
583
|
+
metadata.customer_id.should == "venmo_customer_id"
|
584
|
+
metadata.token.should == "venmo_token"
|
585
|
+
metadata.revoked_payment_method.class.should == Braintree::VenmoAccount
|
586
|
+
end
|
587
|
+
end
|
588
|
+
end
|
589
|
+
|
457
590
|
context "local_payment_completed" do
|
458
591
|
it "builds a sample notification for a local_payment webhook" do
|
459
592
|
sample_notification = Braintree::WebhookTesting.sample_notification(
|
@@ -108,17 +108,17 @@ describe Braintree::Xml do
|
|
108
108
|
|
109
109
|
context "BigDecimal" do
|
110
110
|
it "works for BigDecimals" do
|
111
|
-
hash = {:root => {:foo => BigDecimal
|
111
|
+
hash = {:root => {:foo => BigDecimal("123.45")}}
|
112
112
|
Braintree::Xml.hash_to_xml(hash).should include("<foo>123.45</foo>")
|
113
113
|
end
|
114
114
|
|
115
115
|
it "works for BigDecimals with fewer than 2 digits" do
|
116
|
-
hash = {:root => {:foo => BigDecimal
|
116
|
+
hash = {:root => {:foo => BigDecimal("1000.0")}}
|
117
117
|
Braintree::Xml.hash_to_xml(hash).should include("<foo>1000.00</foo>")
|
118
118
|
end
|
119
119
|
|
120
120
|
it "works for BigDecimals with more than 2 digits" do
|
121
|
-
hash = {:root => {:foo => BigDecimal
|
121
|
+
hash = {:root => {:foo => BigDecimal("12.345")}}
|
122
122
|
Braintree::Xml.hash_to_xml(hash).should include("<foo>12.345</foo>")
|
123
123
|
end
|
124
124
|
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.94.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: 2019-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -113,12 +113,14 @@ files:
|
|
113
113
|
- lib/braintree/payment_method_gateway.rb
|
114
114
|
- lib/braintree/payment_method_nonce.rb
|
115
115
|
- lib/braintree/payment_method_nonce_gateway.rb
|
116
|
+
- lib/braintree/payment_method_parser.rb
|
116
117
|
- lib/braintree/paypal_account.rb
|
117
118
|
- lib/braintree/paypal_account_gateway.rb
|
118
119
|
- lib/braintree/plan.rb
|
119
120
|
- lib/braintree/plan_gateway.rb
|
120
121
|
- lib/braintree/processor_response_types.rb
|
121
122
|
- lib/braintree/resource_collection.rb
|
123
|
+
- lib/braintree/revoked_payment_method_metadata.rb
|
122
124
|
- lib/braintree/risk_data.rb
|
123
125
|
- lib/braintree/samsung_pay_card.rb
|
124
126
|
- lib/braintree/settlement_batch.rb
|
@@ -189,6 +191,7 @@ files:
|
|
189
191
|
- spec/fixtures/files/bt_logo.png
|
190
192
|
- spec/fixtures/files/gif_extension_bt_logo.gif
|
191
193
|
- spec/fixtures/files/malformed_pdf.pdf
|
194
|
+
- spec/fixtures/files/too_long.pdf
|
192
195
|
- spec/hacks/tcp_socket.rb
|
193
196
|
- spec/integration/braintree/add_on_spec.rb
|
194
197
|
- spec/integration/braintree/address_spec.rb
|