* add config to remove whitespace from credit card number. probably unnecessary; just doing now before release
This commit is contained in:
parent
dfe010d0a5
commit
0ea2931837
|
|
@ -213,6 +213,7 @@ module JamRuby
|
|||
}
|
||||
|
||||
options[:billing_info] = billing_info if billing_info
|
||||
|
||||
options
|
||||
end
|
||||
end # class
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue