spec/integration/braintree/credit_card_spec.rb in braintree-2.56.0 vs spec/integration/braintree/credit_card_spec.rb in braintree-2.57.0
- old
+ new
@@ -117,9 +117,27 @@
result.credit_card_verification.avs_error_response_code.should == nil
result.credit_card_verification.avs_postal_code_response_code.should == "I"
result.credit_card_verification.avs_street_address_response_code.should == "I"
end
+ it "allows passing a specific verification amount" do
+ customer = Braintree::Customer.create!
+ result = Braintree::CreditCard.create(
+ :customer_id => customer.id,
+ :number => Braintree::Test::CreditCardNumbers::FailsSandboxVerification::Visa,
+ :expiration_date => "05/2009",
+ :options => {:verify_card => true, :verification_amount => "100.00"}
+ )
+ result.success?.should == false
+ result.credit_card_verification.status.should == Braintree::Transaction::Status::ProcessorDeclined
+ result.credit_card_verification.processor_response_code.should == "2000"
+ result.credit_card_verification.processor_response_text.should == "Do Not Honor"
+ result.credit_card_verification.cvv_response_code.should == "I"
+ result.credit_card_verification.avs_error_response_code.should == nil
+ result.credit_card_verification.avs_postal_code_response_code.should == "I"
+ result.credit_card_verification.avs_street_address_response_code.should == "I"
+ end
+
it "returns risk data on verification on credit_card create" do
customer = Braintree::Customer.create!
credit_card = Braintree::CreditCard.create!(
:cardholder_name => "Original Holder",
:customer_id => customer.id,