Sha256: 08164cbd85e6b55721b2c5f3d611bc5fcfd8a67004386b8c14f65e66c8b6144a
Contents?: true
Size: 461 Bytes
Versions: 11
Compression:
Stored size: 461 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
11 entries across 11 versions & 1 rubygems