Sha256: 7a8503793c2a35838df3ecf1044b4b6b5103281c0930db871d331655025176c2
Contents?: true
Size: 419 Bytes
Versions: 2
Compression:
Stored size: 419 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' mollie_customer = mollie_gateway.create_customer(self) update mollie_customer_id: mollie_customer.id end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
spree_mollie_gateway-1.0.5 | app/models/spree/user_decorator.rb |
spree_mollie_gateway-1.0.4 | app/models/spree/user_decorator.rb |