Class: Pippin::IPN

Inherits:
Object
  • Object
show all
Defined in:
lib/pippin/ipn.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(params = {}, body = '') ⇒ IPN

Returns a new instance of IPN.



6
7
8
9
# File 'lib/pippin/ipn.rb', line 6

def initialize(params = {}, body = '')
  @params = parse_dates(params)
  @body   = body
end

Instance Attribute Details

#bodyObject

Returns the value of attribute body.



4
5
6
# File 'lib/pippin/ipn.rb', line 4

def body
  @body
end

#paramsObject

Returns the value of attribute params.



4
5
6
# File 'lib/pippin/ipn.rb', line 4

def params
  @params
end

Instance Method Details

#valid?Boolean

Returns:

  • (Boolean)


11
12
13
# File 'lib/pippin/ipn.rb', line 11

def valid?
  open(paypal_uri).read == 'VERIFIED'
end