Class: Braintree::ErrorResult


An ErrorResult will be returned from non-bang methods when validations fail. It will provide access to the params passed to the server. The params are primarily useful for re-populaing web forms when using transparent redirect. ErrorResult also provides access to the validation errors.

  result = Braintree::Customer.create(:email => "invalid.email.address")
  if result.success?
    # have a SuccessfulResult
  else
    # have an ErrorResult
    puts "Validations failed when attempting to create customer."
    result.errors.for(:customer).each do |error|
      puts error.message
    end
  end

Attributes
[R] credit_card_verification
[R] errors
[R] message
[R] params
[R] transaction

Public Instance Methods
success?()

Always returns false.


© Copyright 2009 Braintree Payment Solutions. All Rights Reserved.