Class: ActiveMerchant::Billing::Integrations::PayflowLink::Notification
- Inherits:
-
Notification
- Object
- Notification
- ActiveMerchant::Billing::Integrations::PayflowLink::Notification
- Defined in:
- lib/active_merchant/billing/integrations/payflow_link/notification.rb
Instance Attribute Summary
Attributes inherited from Notification
Instance Method Summary collapse
- #account ⇒ Object
- #acknowledge ⇒ 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, #valid_sender?
Constructor Details
This class inherits a constructor from ActiveMerchant::Billing::Integrations::Notification
Instance Method Details
#account ⇒ Object
67 68 69 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 67 def account params["ACCT"] end |
#acknowledge ⇒ Object
71 72 73 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 71 def acknowledge true end |
#complete? ⇒ Boolean
Was the transaction complete?
10 11 12 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 10 def complete? status == "Completed" end |
#currency ⇒ Object
What currency have we been dealing with
44 45 46 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 44 def currency nil end |
#gross ⇒ Object
the money amount we received in X.2 decimal.
39 40 41 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 39 def gross params['AMT'] end |
#invoice ⇒ Object
This is the invoice which you passed to paypal
58 59 60 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 58 def invoice params['INVNUM'] end |
#item_id ⇒ Object
This is the item number which we submitted to paypal
53 54 55 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 53 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
18 19 20 21 22 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 18 def received_at DateTime.parse(params['TRANSTIME']) if params['TRANSTIME'] rescue ArgumentError nil end |
#status ⇒ Object
24 25 26 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 24 def status params['RESPMSG'] end |
#test? ⇒ Boolean
Was this a test transaction?
63 64 65 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 63 def test? params['USER2'] == 'true' end |
#transaction_id ⇒ Object
Id of this transaction (paypal number)
29 30 31 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 29 def transaction_id params['PNREF'] end |
#type ⇒ Object
What type of transaction are we dealing with?
34 35 36 |
# File 'lib/active_merchant/billing/integrations/payflow_link/notification.rb', line 34 def type params['TYPE'] end |