Sha256: 43f7aecf21ee32fb89482f95b36d73adaa767d417c47f87026611b3b834676f9
Contents?: true
Size: 464 Bytes
Versions: 9
Compression:
Stored size: 464 Bytes
Contents
Spree.user_class.class_eval do after_create :create_mollie_customer def create_mollie_customer # Don't create Mollie customers if spree_auth_devise is not installed. return unless defined? Spree::User mollie_gateway = Spree::PaymentMethod.find_by_type 'Spree::Gateway::MollieGateway' return unless mollie_gateway.present? mollie_customer = mollie_gateway.create_customer(self) update mollie_customer_id: mollie_customer.id end end
Version data entries
9 entries across 9 versions & 1 rubygems