Hi,

One of our customer has created its multiple subscriptions. For details please find screenshot. Is this will be supported or uc_strip_customer_id get
reset if user will try to have more than one subscription.

Please suggest is this will work or create some problem. And how to handle this if this is not supported.

Thanks!

Comments

jas1988 created an issue. See original summary.

jas1988’s picture

StatusFileSize
new50.71 KB
rfay’s picture

Version: 7.x-2.0-beta3 » 7.x-2.x-dev
Category: Support request » Feature request
Issue tags: -uc_stripe

Yes, 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.

ayesh’s picture

Hi,
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.

jas1988’s picture

Thank 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!

ayesh’s picture

Canceling 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().

rfay’s picture

Title: Multiple subscriptions » Allow one user to have multiple subscriptions
jas1988’s picture

One 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!!

ayesh’s picture

The 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.

jas1988’s picture

Actually 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 !!

ayesh’s picture

The 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.

jas1988’s picture

Thanks for explaining in more details !!