Membership renewals with the Stripe Subscriptions gateway

Hi,

We're updating our subscriptions to use the Stripe Subscriptions gateway. We'll be encouraging members to renew using this payment method shortly.

New sign-ups look like they're working fine. However we will be encouraging expired users to renew using this payment method so have tested that scenario as follows:

1) Set a subscription in the admin area for a test account (davetest). We set gave them a monthly subscription and manually set it to expire in the past so it got marked as expired.
2) We tried logging in as the user and going to their account page, clicking the expired membership to renew it, and paying via Stripe Subscriptions gateway.

The result was the following error: "Sorry, your signup request has failed. Try again."

However:
- the payment was taken
- the subscription appears in stripe as a successful payment and as an active subscription
- a successful transaction appears in the transaction log in the Membership2 menu
- the invoice, however, is still marked as "billed" and not "paid" in the invoices list.

It seems from our debugging that the error appeared because of the failed $invoice->is_paid() check on line 642 of class-ms-controller-gateway.php. We can't see why the invoice didnt get marked as paid though, and why this doesn't happen on new accounts/subscriptions.

Your assistance with this would be appreciated so we can be sure everything will go smoothly when we ask our customers to renew.

We have granted support access.

Many thanks in advance.