spec/spec_helper.rb in braintree-2.31.0 vs spec/spec_helper.rb in braintree-2.32.1
- old
+ new
@@ -31,10 +31,11 @@
module SpecHelper
DefaultMerchantAccountId = "sandbox_credit_card"
NonDefaultMerchantAccountId = "sandbox_credit_card_non_default"
NonDefaultSubMerchantAccountId = "sandbox_sub_merchant_account"
+ ThreeDSecureMerchantAccountId = "three_d_secure_merchant_account"
TrialPlan = {
:description => "Plan for integration tests -- with trial",
:id => "integration_trial_plan",
:price => BigDecimal.new("43.21"),
@@ -82,15 +83,20 @@
:private_key => "test_private_key"
)
def self.make_past_due(subscription, number_of_days_past_due = 1)
Braintree::Configuration.instantiate.http.put(
- "/subscriptions/#{subscription.id}/make_past_due?days_past_due=#{number_of_days_past_due}"
- )
+ "/subscriptions/#{subscription.id}/make_past_due?days_past_due=#{number_of_days_past_due}"
+ )
end
def self.settle_transaction(transaction_id)
Braintree::Configuration.instantiate.http.put("/transactions/#{transaction_id}/settle")
+ end
+
+ def self.create_3ds_verification(merchant_account_id, params)
+ response = Braintree::Configuration.instantiate.http.post("/three_d_secure/create_verification/#{merchant_account_id}", :three_d_secure_verification => params)
+ response[:three_d_secure_verification][:three_d_secure_token]
end
def self.stub_time_dot_now(desired_time)
Time.class_eval do
class << self