class OffsitePayments::Integrations::PayflowLink::Notification
Public Instance Methods
account()
click to toggle source
# File lib/offsite_payments/integrations/payflow_link.rb, line 184 def account params["ACCT"] end
acknowledge(authcode = nil)
click to toggle source
# File lib/offsite_payments/integrations/payflow_link.rb, line 188 def acknowledge(authcode = nil) true end
complete?()
click to toggle source
Was the transaction complete?
# File lib/offsite_payments/integrations/payflow_link.rb, line 127 def complete? status == "Completed" end
currency()
click to toggle source
What currency have we been dealing with
# File lib/offsite_payments/integrations/payflow_link.rb, line 161 def currency nil end
gross()
click to toggle source
the money amount we received in X.2 decimal.
# File lib/offsite_payments/integrations/payflow_link.rb, line 156 def gross params['AMT'] end
invoice()
click to toggle source
This is the invoice which you passed to paypal
# File lib/offsite_payments/integrations/payflow_link.rb, line 175 def invoice params['INVNUM'] end
item_id()
click to toggle source
This is the item number which we submitted to paypal
# File lib/offsite_payments/integrations/payflow_link.rb, line 170 def item_id params['USER1'] end
received_at()
click to toggle source
When was this payment received by the client. sometimes it can happen that we get the notification much later. One possible scenario is that our web application was down. In this case paypal tries several times an hour to inform us about the notification
# File lib/offsite_payments/integrations/payflow_link.rb, line 135 def received_at DateTime.parse(params['TRANSTIME']) if params['TRANSTIME'] rescue ArgumentError nil end
status()
click to toggle source
# File lib/offsite_payments/integrations/payflow_link.rb, line 141 def status params['RESPMSG'] end
test?()
click to toggle source
Was this a test transaction?
# File lib/offsite_payments/integrations/payflow_link.rb, line 180 def test? params['USER2'] == 'true' end
transaction_id()
click to toggle source
Id of this transaction (paypal number)
# File lib/offsite_payments/integrations/payflow_link.rb, line 146 def transaction_id params['PNREF'] end
type()
click to toggle source
What type of transaction are we dealing with?
# File lib/offsite_payments/integrations/payflow_link.rb, line 151 def type params['TYPE'] end