Fabien O'Carroll
6fe46a79f3
Added cancelAllSubscriptions method
...
no-issue
This gets all subscriptions, filters out ones which have already been
cancelled and cancels the rest
2019-10-02 15:05:12 +07:00
Fabien O'Carroll
18aeed905a
Refactored getActiveSubscriptions to getSubscriptions
...
no-issue
2019-10-02 15:05:12 +07:00
Fabien O'Carroll
ea5503f58d
Published new versions
...
- @tryghost/members-api@0.7.2
2019-10-02 13:52:10 +07:00
Fabien O'Carroll
561493bfb2
Added debugs and improved getCustomer handling
...
no-issue
This adds more debugs so we can follow what's happening and also adds
better handing for failures when getting a customer from stripe
2019-10-02 13:47:37 +07:00
Fabien O'Carroll
1c3e563ad7
Improved logging for members-api
...
no-issue
This allows the logger to be passed in, and configures stripe to have access to it
2019-10-02 13:47:37 +07:00
Fabien O'Carroll
80f1155590
Ensured we do not create multiple webhooks on boot
...
no-issue
This updates the initialisation logic to fetch all webhooks (we use
limit: 100, and there are currently a max of 16 webhooks in stripe) and
find one with the corrct url. Once found, delete that webhook. We then
attempt to create a new one, and log out any errors (this is to allow
for local development, creating a webhook with a local url is expected
to fail)
2019-10-02 13:47:37 +07:00
Fabien O'Carroll
48cb8d14da
Wrapped getCustomer in try catch
...
no-issue
This protects against live/test mode poisoned databases
2019-10-02 13:47:37 +07:00
Fabien O'Carroll
d1b29fd0b7
Added list and update stripe requests
...
no-issue
These will be used for listing and updating webhooks on configuration
2019-10-02 13:47:37 +07:00
Fabien O'Carroll
11a5a9ac69
Published new versions
...
- @tryghost/members-api@0.7.1
2019-10-01 17:48:31 +07:00
Fabien O'Carroll
0b5a70dcf4
Added default options param for users#create
...
no-issue
This allows create to have an optional second parameter, so that it
doesn't error when called with just data.
2019-10-01 17:42:22 +07:00
Fabien O'Carroll
d85ea20ad2
Published new versions
...
- @tryghost/magic-link@0.2.0
- @tryghost/members-api@0.7.0
2019-10-01 14:47:27 +07:00
Fabien O'Carroll
ece58fe9fd
Pass through getText and getHTML function from mail
...
no-issue
This will allow consumers of this module to customise the content of emails
2019-10-01 14:46:17 +07:00
Fabien O'Carroll
b852de95c8
Updated members-api to pass the emailType to magic-link
...
no-issue
This will allow requests to send the correct email
2019-10-01 14:46:17 +07:00
Fabien O'Carroll
d2634c7c7b
Added type param to content generation functions
...
no-issue
This will allow conditional logic based on the type passed to sending the magic-link
2019-10-01 14:46:17 +07:00
Fabien O'Carroll
5170c7c1d4
Published new versions
...
- @tryghost/magic-link@0.1.4
- @tryghost/members-api@0.6.2
- @tryghost/members-ssr@0.5.2
2019-10-01 11:21:07 +07:00
Fabien O'Carroll
8422a2f28d
Fixed signature for listMembers call
...
no-issue
2019-10-01 11:02:54 +07:00
Fabien O'Carroll
957a0df658
Ensured falsy values not returned from cache cookie
...
no-issue
2019-09-30 12:10:29 +07:00
Fabien O'Carroll
ab4493db5f
Ensured falsy values are not set as cookies
...
no-issue
2019-09-30 12:10:29 +07:00
Renovate Bot
0a0caca573
Update dependency @types/node to v12.7.8
2019-09-30 11:20:50 +07:00
Renovate Bot
f404e2bd1a
Update dependency @types/cookies to v0.7.3
2019-09-30 02:32:14 +00:00
Renovate Bot
ab023e1df9
Update Test & linting packages
2019-09-30 01:35:30 +00:00
Fabien O'Carroll
f966907c78
Published new versions
...
- @tryghost/members-api@0.6.1
2019-09-26 17:14:08 +07:00
Fabien O'Carroll
530390124b
Added flag to create member for sending email
...
no-issue
This allows us to give more functionality to consumers, with a smaller
API (rather than exposing the methods for sending a magic-link email)
2019-09-26 17:11:17 +07:00
Fabien O'Carroll
ff0dc6a168
Published new versions
...
- @tryghost/magic-link@0.1.3
- @tryghost/members-api@0.6.0
- @tryghost/members-ssr@0.5.1
2019-09-25 17:13:00 +07:00
Fabien O'Carroll
acf01e9065
Updated members-api to export POJO
...
no-issue
Previously members-api exported a pre configured express router with the
paths and handlers defined. This did not allow for much control from the
parent application. This replaces this pattern by exposing middlewares,
which the parent application can mount where it sees fit.
2019-09-25 16:53:08 +07:00
Fabien O'Carroll
d67ad13057
Updated handler for checkout to not require member
...
no-issue
This will allow the flow to start from the frontend.
2019-09-25 16:53:08 +07:00
Fabien O'Carroll
f7630ec05b
Updated createCheckoutSession to work w/o member
...
no-issue
This will allow us to do a payment first flow, in which a payment is
taken, before creating a member
2019-09-25 16:53:08 +07:00
Fabien O'Carroll
0527304376
Updated stripe to setAppInfo and apiVersion
...
no-issue
2019-09-25 11:35:58 +07:00
Fabien O'Carroll
6722d3bc8a
Ensured member is not linked to customer twice
...
no-issue
Edge case but easy to solve - so we dun it
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
db42b35e9f
Added handler for checkout.session.completed
...
no-issue
This will link the customer from the checkout session to the member with
the same email
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
ed4dfd8d54
Updated users module to use getActiveSubscriptions
...
no-issue
This offloads some stripe specific logic into the stripe module
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
314fd6a540
Added method for getting active subscriptions
...
no-issue
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
a92d5f064b
Added method for getting stripe customer for member
...
no-issue
This finds the first active customer that is linked to the member, and
created and links a new customer if a viable one does not exist.
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
69abbc6fa2
Added method for linking customer to member
...
no-issue
Uses the metadata storage passed into stripe
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
9beb496bd1
Passed in metadata getter/setter to stripe
...
no-issue
This will be used to store information such as customer id
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
644fd71d4f
Removed unused getPublicConfig method from stripe
...
no-issue
Don't use it you lose it!
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
373f67a117
Added getCustomer method to stripe
...
no-issue
This uses the stripeRequests module directly since the customers api was
removed.
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
2849c647d6
Added parseWebhook method to stripe
...
no-issue
This uses the webhook secret and stripe module to validate the signature
and parse the body into an object
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
343fcecfff
Updated stripe to create webhook on boot configure
...
no-issue
This will allow us to a) have an endpoint to receive webhooks and b) get
hold of the webhook secret to validate the signature.
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
4dc42709c3
Removed superfluous stripe api modules
...
no-issue
This removes the subscription api as we are using stripe checkout to
generate those
This removes the customers api as we no longer need the deterministic
api for it
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
216ab072b4
Refactored users module to wrap all methods
...
no-issue
This also adds initial support for `update` user - which is not used
2019-09-25 11:20:02 +07:00
Fabien O'Carroll
f7b61e901d
Removed body-parser from router middleware
...
no-issue
Validating stripe webhooks requires the body as a buffer, so we can no
longer parse json body by default
2019-09-25 11:20:02 +07:00
Renovate Bot
82346ef67b
Pin dependencies
2019-09-24 12:18:18 +07:00
Renovate Bot
2c79eec311
Update dependency @types/jsonwebtoken to v8.3.4
2019-09-23 01:26:26 +00:00
Fabien O'Carroll
c4b2852572
Removed unecessary .gitkeep
2019-09-18 14:46:13 +08:00
Fabien O'Carroll
55d9bb670d
Removed unused packages
...
no-issue
These are not currently used, we can bring them back if we need them
again
2019-09-16 14:07:36 +08:00
Fabien O'Carroll
cb9f10e28d
Set unused modules to private
...
no-issue
This can be just temporary so that we are not generating a lot of noise
with constantly publishing these modules
2019-09-16 14:05:51 +08:00
Fabien O'Carroll
58cb25fe86
Published new versions
...
- @tryghost/magic-link@0.1.2
- @tryghost/members-api@0.5.3
- @tryghost/members-browser-auth@0.2.3
- @tryghost/members-gateway-api@0.1.7
- @tryghost/members-ssr@0.5.0
- @tryghost/members-theme-bindings@0.2.6
2019-09-16 14:01:13 +08:00
Fabien O'Carroll
49380c3dc4
Updated README for new members-ssr API
...
no-issue
2019-09-16 14:00:00 +08:00
Fabien O'Carroll
667061676b
Updated example.js to reflect new API
...
no-issue
2019-09-16 13:58:05 +08:00