I am building an ecommerce solution using spree to handle products/orders etc. I am having a little trouble figuring how to create spree entries through my signup controller. The user fills a form out and then it is supposed to:
1) create a new user object with addresses
2) create a new order for that user + add a subscription product to that order
3) Create a stripe customer and add a stripe plan
4) Redirect to a confirmation page.
I can't seem to find much in the way of documentation for integrating with spree from a custom rails setup (only overriding their templates).
The issue I am having is that I am not seeing the new user object being created. I pulled this code from the backend and modified it to create a new user when the signup form is submitted:
user_params = {"email" => emailAddress,"password"=> password}
spreeUser = Spree.user_class.new(user_params)
spreeUser.save
This isn't adding any new user to the DB. I have also tried through the api endpoint POST api/users but still no luck.
Is it possible to use spree in this way and if so what am I doing wrong!