Skip to content
This repository has been archived by the owner on Oct 5, 2022. It is now read-only.

Used mode to determine flow for checkout session #184

Merged

Conversation

allouis
Copy link
Collaborator

@allouis allouis commented Jul 21, 2020

no-issue

This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.

Subscriptions that are started with a trial have a setup_intent
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a "setup" flow and attempt to update a
customers card details.

We now use the mode property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a "setup"
flow and should update the Customer's card details.

no-issue

This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.

Subscriptions that are started with a trial have a `setup_intent`
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a "setup" flow and attempt to update a
customers card details.

We now use the `mode` property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a "setup"
flow and should update the Customer's card details.
@allouis allouis merged commit 0b737e7 into TryGhost:master Jul 21, 2020
@allouis allouis deleted the fix-checkout-session-webhook-handling branch July 21, 2020 09:50
allouis added a commit that referenced this pull request Jul 21, 2020
no-issue

Reverting so that changesets can be released independently

This reverts commit 0b737e7.
allouis added a commit that referenced this pull request Jul 21, 2020
no-issue

This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.

Subscriptions that are started with a trial have a `setup_intent`
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a "setup" flow and attempt to update a
customers card details.

We now use the `mode` property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a "setup"
flow and should update the Customer's card details.
allouis added a commit to allouis/Ghost that referenced this pull request Jul 21, 2020
no-issue

This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.

Subscriptions that are started with a trial have a
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a setup flow and attempt to update a
customers card details.

We now use the  property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a setup
flow and should update the Customer's card details.

Includes the code from TryGhost/Members#184
allouis added a commit to TryGhost/Ghost that referenced this pull request Jul 21, 2020
no-issue

This fixes a problem when subscribing to a Plan (Price) with a default
trial period. We also add logging to add a little more information about
which flow we're entering.

Subscriptions that are started with a trial have a
present on the Checkout Session object, which was incorrectly causing us
to determine that we are in a setup flow and attempt to update a
customers card details.

We now use the  property of the Checkout Session to determine
whether we are handling a new Subscription, or if we are in a setup
flow and should update the Customer's card details.

Includes the code from TryGhost/Members#184
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant