-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse Stripe profiles when customer adds a new credit card #26
Comments
We are looking at building out a subscription implementation on top of |
It seems to me that in an ideal world, this extension would include a migration to add a But, maybe there's another way to do it. When creating a new gateway_customer_profile_id = source.user&.
payment_sources&.where&.not(gateway_customer_profile_id: nil)&.order(:updated_at)&.last&.
gateway_customer_profile_id @spaghetticode What do you think about trying something like that? |
Updating with two pieces of information. First is that I've created a (failing) spec at #77 to demonstrate this issue. Second is that I have begun tracking down the cause. I believe the key lines are here: solidus_stripe/app/models/spree/payment_method/stripe_credit_card.rb Lines 122 to 139 in eca6dc2
Here you can see how we're setting the It seems that we need to link this to the customer either before or during the call to |
Update: the specs are now green in #77, which should solve this issue. |
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
Solves solidusio#26. Begins to solve solidusio#74.
Solves solidusio#26. Begins to solve solidusio#74.
Solves solidusio#26. Begins to solve solidusio#74.
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
Solves solidusio#26. Begins to solve solidusio#74.
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
These specs address the need in solidusio#26 for maintaining a stable Stripe customer object across multiple credit cards. Currently V2 and V3 Elements are supported, with V3 Intents functionality remaining as a TODO for a later PR.
This issue has been automatically marked as stale because it has not had recent activity. It might be closed if no further activity occurs. Thank you for your contributions. |
When a
Spree::User
adds a new credit card and that user already has a saved credit card stored we should reuse their existing Stripe customer profile instead of creating a new one.This is a screenshot from a Stripe test account that shows a single email address with 3 different customer accounts, each with one single credit card:
This can be surely done when using the Stripe official gem, but we need to investigate if ActiveMerchant allows this.
The text was updated successfully, but these errors were encountered: