Skip to content

Commit

Permalink
Merge pull request #14 from mollie/check-for-gateway
Browse files Browse the repository at this point in the history
Check if Mollie gateway is present
  • Loading branch information
vernondegoede authored Jun 9, 2018
2 parents 1fb2996 + 29e8266 commit 4d2a393
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/spree/user_decorator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ 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
Expand Down

0 comments on commit 4d2a393

Please sign in to comment.