mollie / spree-mollie-gateway

Mollie payments for Spree Commerce.
https://www.mollie.com
16 stars 23 forks source link

NoMethodError: undefined method `create_customer' for nil:NilClass #11

Closed salman15 closed 6 years ago

salman15 commented 6 years ago

After installing the gem I get the following issue

NoMethodError: undefined method `create_customer' for nil:NilClass
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

Als when trying to create an admin account

vernondegoede commented 6 years ago

Thanks for reporting @salman15! This has been fixed in 1.0.6.

Let us know if you run into any other issues 👍