Whenever the user enters a empty string during checkout, the following error message is flashed:
Credit card number is required. (81714)
Instead of showing that to the user, I would like to show:
Credit card number is needed to process your order.
I believe the code is here: https://github.com/braintree/braintree_ruby/blob/master/lib/braintree/error_codes.rb
Simplified code:
module Braintree
module ErrorCodes
module CreditCard
NumberIsRequired = "81714"
end
end
end
Tried with the following decorator without success
Braintree::ErrorCodes::CreditCard.class_eval do
NumberIsRequired = "We need a credit card to process your order"
end
is this the right approach to accomplish this? is braintree storing the error somewhere else?
I'm on rails 3 and Spree 1.3
Thank you in advance for your help!