Active
Project:
Ubercart Stripe
Version:
7.x-2.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
6 May 2016 at 11:05 UTC
Updated:
19 May 2016 at 12:54 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jas1988 commentedComment #3
rfayYes, you're correct, it's not possible for a single user to have more than one subscription, because the Stripe Customer ID is stored with no differentiation on the user account. I'd say this is a flaw, and would be a good future feature.
The sometimes-workaround for very generous customers would be to have more than one user account.
Comment #4
ayesh commentedHi,
I actually came across this as well.
The default credit card module stores that (encrypted) card details in the order. Recurring fee records also store the order ID, so I imagine it would be possible for us to store the Stripe credit card token in the order itself. That seems to be the way other modules store them when they don't have a separate table for that.
I have not actually tested this yet, but I can give it a try if you'd like.
Comment #5
jas1988 commentedThank you for your comment!
In this case what would we can do like I assume now users previous subscription is not going to work ie: recurring payment will not happen as uc_strip_customer_id got reset. So in this is that the latest subscription is only going to work ? or should we cancel previous subscription, I mean it will not effect the new subscription.
please suggest!
Comment #6
ayesh commentedCanceling the subscription should still work, because that is uc_recurring modules work, and it does not need to check the stripe customer ID.
When you add a new subscription, existing customer ID gets overwritten, and all subscriptions will start to charge the new customer ID. See _uc_stripe_get_customer_id() and uc_stripe_uc_checkout_complete().
Comment #7
rfayComment #8
jas1988 commentedOne of our customer have 2 subscriptions monthly and yearly. And customer ordered on same day
First : 01/31/2016 - 16:08 (Monthly)
Second: 01/31/2016 - 16:25 (Yearly)
But next recurring charges happened for First one ie monthly. Is this is supposed to work in this way, it seems above discussions suggests overriding of Customer ID and making news subscription as active one and no more charges will happen to previous subscription. Please suggest how this can happen ? or this is kind of bug state when we have multiple subscriptions which are not supported.
Please find screenshots for details!
Thanks!!
Comment #9
ayesh commentedThe UC Recurring module is completely responsible for the renewals. It simply calls the uc_stripe's charge method, and acts on its return value (whether the payment was successful or not). See uc_stripe_charge().
I use the recurring module as well, and as far as I can tell, both subscriptions are now active. You can check the currently active subscriptions list from uc_recurring_users table.
For a single-subscription-only workflow, I think you will need a custom module implemnting
hook_uc_order()to cancel other recurring subscriptions after creating a new one.recurring_fee_user_saved()looks like a good candidate too.Comment #10
jas1988 commentedActually we do not have any problem if both subscriptions will work. But as rfay suggested its not possible to carry out both subscription for same user, so this was confusion. otherwise customer will get same thing on monthly basis or yearly . In this case our customer just want to pay for both to support our site.
I think if it works this way then there is no problem to carry both subscriptions for user. Is this will be fine to carry out both at same time !!
Comment #11
ayesh commentedThe problem we have is that uc_stripe module updates the customer ID everytime the customer (with same uer ID) completes chekout. In your case, both subscriptions should now being paid with the same card, even if the older subscription was paid with a different card.
Comment #12
jas1988 commentedThanks for explaining in more details !!