Sha256: 4a95ef7667b89221258a5adbf246950f9abdb2feb7f6acace19bc8dc2776be25

Contents?: true

Size: 608 Bytes

Versions: 6

Compression:

Stored size: 608 Bytes

Contents

module MercadoPago
  class HandleReceivedNotification
    def initialize(notification)
      @notification = notification
    end

    # The purpose of this method is to enable async/sync processing
    # of Mercado Pago IPNs. For simplicity processing is synchronous but
    # if you would like to enqueue the processing via Resque/Ost/etc you
    # will be able to do it.
    def process!
      # Sync
      ProcessNotification.new(@notification).process!
      # Async Will be configurable via block for example:
      # Resque.enqueue(ProcessNotificationWorker, {id: @notification.id})
    end
  end
end

Version data entries

6 entries across 6 versions & 3 rubygems

Version Path
solidus_mercado_pago-1.0.0 app/services/mercado_pago/handle_received_notification.rb
spree_mercado_pago-0.2.3 app/services/mercado_pago/handle_received_notification.rb
spree_mercado_pago-0.2.2 app/services/mercado_pago/handle_received_notification.rb
spree_mercado_pago-0.2.1 app/services/mercado_pago/handle_received_notification.rb
spree_mercado_pago-0.2.0 app/services/mercado_pago/handle_received_notification.rb
spree_mercado_pago_payment_method-0.2.0 app/services/mercado_pago/handle_received_notification.rb