Class: Spree::PaymentSource

Inherits:
Object
  • Object
show all
Includes:
Metadata, Metafields, PaymentSourceConcern
Defined in:
app/models/spree/payment_source.rb

Instance Method Summary collapse

Methods included from PaymentSourceConcern

#actions, #can_capture?, #can_credit?, #can_void?, #has_payment_profile?

Instance Method Details

#gateway_customerSpree::GatewayCustomer

Returns the gateway customer for the user.



26
27
28
29
30
# File 'app/models/spree/payment_source.rb', line 26

def gateway_customer
  return if user.blank?

  payment_method.gateway_customers.find_by(user: user)
end