* add config to remove whitespace from credit card number. probably unnecessary; just doing now before release

This commit is contained in:
Seth Call 2015-05-07 09:02:58 -05:00
parent dfe010d0a5
commit 0ea2931837
3 changed files with 9 additions and 0 deletions

View File

@ -213,6 +213,7 @@ module JamRuby
}
options[:billing_info] = billing_info if billing_info
options
end
end # class

View File

@ -16,6 +16,13 @@ class ApiRecurlyController < ApiController
# terms of service accepted?
terms_of_service = params[:terms_of_service] == "true"
if billing_info && Rails.application.config.remove_whitespace_credit_card
number = billing_info[:number]
puts "NUMBER #{number}"
puts "-------------------------------->>>>>>>>>>>>>>>>>>>>>"
billing_info[:number] = number.gsub(/\s+/, "") if number
puts "-------------------------------->>>>>>>>>>>>>>>>>>>>> #{billing_info[:number]}"
end
if current_user
# keep reuse card up-to-date

View File

@ -333,5 +333,6 @@ if defined?(Bundler)
config.alerts_api_enabled = true
config.gear_check_ignore_high_latency = false
config.remove_whitespace_credit_card = true
end
end