lib/hamburglar/gateways/max_mind.rb in hamburglar-0.1.0 vs lib/hamburglar/gateways/max_mind.rb in hamburglar-0.1.1
- old
+ new
@@ -42,10 +42,15 @@
:sessionID,
:user_agent,
:accept_language
].freeze
end
+
+ def initialize(params = {})
+ params[:i] = params.delete(:ip) if params[:ip]
+ super params
+ end
end
# The TelephoneVerification class handles fraud verification
# through MaxMind's Telephone Verification API
#
@@ -58,9 +63,14 @@
set_required_params :l, :phone
# Optional parameters
def optional_params
[:l, :phone, :verify_code].freeze
+ end
+
+ def initialize(params = {})
+ params[:l] = params.delete(:license_key) if params[:license_key]
+ super params
end
end
end
end