pydanny/dj-stripe — pull request #98 by nigma (2014-05-28 20:40:32+00:00)
Title: CurrentSubscription state is not updated after users cancels and subscribes again

There is an issue that prevents marking a cancelled subscription as active after a customer subscribes again.

The actions are properly executed using the Stripe API, but a new subscription state is not copied into the `CurrentSubscription` object.

This influence some parts of the UI and suggests the subscription is cancelled while actually the customer will be billed at the end of the period.

This patch allows the `cancel_at_period_end` and `canceled_at` fields to be updated according to Stripe API response.
Additionally it corrects the `current_period_end` attribute assignment (subscription object does not have `period_end` field).

I gave it some initial testing and it works so far, but I may not be able to predict all possible implications of this change. The remaining question is if there are any other fields that should be synchronized with Stripe data during subscription change?