Hello I have a question about solidus_stripe about...
# support
l
Hello I have a question about solidus_stripe about the customers. In our case, because we migrate from another payment provider, ou customers from the previous payment provider (and their saved payment cards) will be imported in Stripe before launch. So we would be in a case not cover by the current code where the SolidusStripe::Customer instance does not exist but it’s couterpart in Stripe does. With the current code, we always create the Stripe customer (L.18). Should we not try to search in Stripe for a customer with the given email before creating the Stripe customer ? That would be a question for @elia I guess 😄
👀 1
e
That’s an option we considered, but ultimately thought that the stripe-customer should share its life-span with the spree-user. The typical edge case in which to don’t want to “cross the streams” is having a guest checkout and then an account created with the same email. Even worse would be using someone else’s email to create an account and connect with another customer on stripe’s side. In your case it would make sense of course, for example you could backfill the values in some way.
l
ok thanks. backfilling was the other option, I’ll do that, I just wanted to check here first
k
Thanks for asking @loic. If you see any opportunity to contribute to the extension (rake task?) feel free 🙏
l
thanks yes, Maybe a rake task would be better than to listen for the webhooks (customer created and payment method created) that are supposed to happen during the data import. At least the rake task could be run multiple times