Class: Kassa24::Payment::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/kassa24/payment/callback.rb

Constant Summary collapse

IP_WHITELIST =
%w[
  35.157.105.64
].freeze

Instance Method Summary collapse

Instance Method Details

#call(ip:, **params) ⇒ Object

Raises:



8
9
10
11
12
# File 'lib/kassa24/payment/callback.rb', line 8

def call(ip:, **params)
  raise Error, "Bad IP address #{ip}" unless IP_WHITELIST.include?(ip)

  symbolize_names(snakeize_keys(params))
end