Class: OffsitePayments::Integrations::PayflowLink::Notification
- Inherits:
-
Notification
- Object
- Notification
- OffsitePayments::Integrations::PayflowLink::Notification
- Defined in:
- lib/offsite_payments/integrations/payflow_link.rb
Instance Attribute Summary
Attributes inherited from Notification
Instance Method Summary collapse
- #account ⇒ Object
- #acknowledge(authcode = nil) ⇒ Object
-
#complete? ⇒ Boolean
Was the transaction complete?.
-
#currency ⇒ Object
What currency have we been dealing with.
-
#gross ⇒ Object
the money amount we received in X.2 decimal.
-
#invoice ⇒ Object
This is the invoice which you passed to paypal.
-
#item_id ⇒ Object
This is the item number which we submitted to paypal.
-
#received_at ⇒ Object
When was this payment received by the client.
- #status ⇒ Object
-
#test? ⇒ Boolean
Was this a test transaction?.
-
#transaction_id ⇒ Object
Id of this transaction (paypal number).
-
#type ⇒ Object
What type of transaction are we dealing with?.
Methods inherited from Notification
#amount, #empty!, #gross_cents, #initialize, #iso_currency, #valid_sender?
Constructor Details
This class inherits a constructor from OffsitePayments::Notification
Instance Method Details
#account ⇒ Object
184 185 186 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 184 def account params["ACCT"] end |
#acknowledge(authcode = nil) ⇒ Object
188 189 190 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 188 def acknowledge(authcode = nil) true end |
#complete? ⇒ Boolean
Was the transaction complete?
127 128 129 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 127 def complete? status == "Completed" end |
#currency ⇒ Object
What currency have we been dealing with
161 162 163 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 161 def currency nil end |
#gross ⇒ Object
the money amount we received in X.2 decimal.
156 157 158 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 156 def gross params['AMT'] end |
#invoice ⇒ Object
This is the invoice which you passed to paypal
175 176 177 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 175 def invoice params['INVNUM'] end |
#item_id ⇒ Object
This is the item number which we submitted to paypal
170 171 172 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 170 def item_id params['USER1'] end |
#received_at ⇒ Object
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
135 136 137 138 139 |
# 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 ⇒ Object
141 142 143 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 141 def status params['RESPMSG'] end |
#test? ⇒ Boolean
Was this a test transaction?
180 181 182 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 180 def test? params['USER2'] == 'true' end |
#transaction_id ⇒ Object
Id of this transaction (paypal number)
146 147 148 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 146 def transaction_id params['PNREF'] end |
#type ⇒ Object
What type of transaction are we dealing with?
151 152 153 |
# File 'lib/offsite_payments/integrations/payflow_link.rb', line 151 def type params['TYPE'] end |