--- !ruby/object:RI::ClassDescription 
attributes: []

class_methods: []

comment: 
- !ruby/struct:SM::Flow::P 
  body: Parser and handler for incoming Instant payment notifications from paypal. The Example shows a typical handler in a rails application. Note that this is an example, please read the Paypal API documentation for all the details on creating a safe payment controller.
- !ruby/struct:SM::Flow::P 
  body: Example
- !ruby/struct:SM::Flow::VERB 
  body: "  class BackendController &lt; ApplicationController\n    include ActiveMerchant::Billing::Integrations\n\n    def paypal_ipn\n      notify = Paypal::Notification.new(request.raw_post)\n\n      order = Order.find(notify.item_id)\n\n      if notify.acknowledge\n        begin\n\n          if notify.complete? and order.total == notify.amount\n            order.status = 'success'\n\n            shop.ship(order)\n          else\n            logger.error(&quot;Failed to verify Paypal's notification, please investigate&quot;)\n          end\n\n        rescue =&gt; e\n          order.status        = 'failed'\n          raise\n        ensure\n          order.save\n        end\n      end\n\n      render :nothing\n    end\n  end\n"
constants: []

full_name: ActiveMerchant::Billing::Integrations::Paypal::Notification
includes: 
- !ruby/object:RI::IncludedModule 
  name: PostsData
instance_methods: 
- !ruby/object:RI::MethodSummary 
  name: account
- !ruby/object:RI::MethodSummary 
  name: acknowledge
- !ruby/object:RI::MethodSummary 
  name: complete?
- !ruby/object:RI::MethodSummary 
  name: currency
- !ruby/object:RI::MethodSummary 
  name: fee
- !ruby/object:RI::MethodSummary 
  name: gross
- !ruby/object:RI::MethodSummary 
  name: invoice
- !ruby/object:RI::MethodSummary 
  name: item_id
- !ruby/object:RI::MethodSummary 
  name: received_at
- !ruby/object:RI::MethodSummary 
  name: status
- !ruby/object:RI::MethodSummary 
  name: test?
- !ruby/object:RI::MethodSummary 
  name: transaction_id
- !ruby/object:RI::MethodSummary 
  name: type
name: Notification
superclass: ActiveMerchant::Billing::Integrations::Notification
