Class: SpreeStripe::OrderCompletedSubscriber

Inherits:
Spree::Subscriber
  • Object
show all
Defined in:
app/subscribers/spree_stripe/order_completed_subscriber.rb

Instance Method Summary collapse

Instance Method Details

#attach_customer_to_credit_card(event) ⇒ Object



7
8
9
10
11
12
# File 'app/subscribers/spree_stripe/order_completed_subscriber.rb', line 7

def attach_customer_to_credit_card(event)
  order_id = event.payload['id']
  return if order_id.blank?

  SpreeStripe::AttachCustomerToCreditCardJob.perform_later(order_id)
end