Commit Graph

425 Commits

Author SHA1 Message Date
Renovate Bot
508daa5956 Update dependency @types/jsonwebtoken to v8.5.0 2020-05-13 20:14:37 +00:00
Renovate Bot
aa44de5d91 Update dependency @types/node to v12.12.39 2020-05-13 02:16:27 +00:00
Renovate Bot
61a630e6d2 Update dependency @types/node to v12.12.38 2020-05-05 20:15:38 +00:00
Rish
ef9fa8e623 Published new versions
- @tryghost/magic-link@0.4.4
 - @tryghost/members-api@0.18.3
 - @tryghost/members-ssr@0.7.7
2020-04-30 16:08:09 +05:30
Rish
fac6c3d97e Added ability to prefill customer email for anonymous checkouts
refs https://github.com/TryGhost/members.js/issues/10

- Allows passing an additional `customerEmail` value to our checkout creation API
- This value is used to pass `customer_email` option to stripe's checkout session - https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_email.

The `customer_email` allows pre-filling the customer's email field in case of an anonymous checkout as customer doesn't exist already, and also ensures the stripe subscription is created with same email address as given by user during signup flow.
2020-04-30 16:01:22 +05:30
Renovate Bot
2c14a337ad Update dependency jsdom to v15.2.1 2020-04-27 15:15:52 +00:00
Renovate Bot
13a1ff1451 Update dependency @types/node to v12.12.37 2020-04-22 03:15:54 +00:00
Rish
66e106e3ac Published new versions
- @tryghost/magic-link@0.4.3
 - @tryghost/members-api@0.18.2
 - @tryghost/members-ssr@0.7.6
2020-04-21 15:32:00 +05:30
Rish
ab3fe634f4 🐛 Fixed incorrect logging for geolocation error
no issue

We were using incorrect method for logging in geolocation warning - `this.logging.warn(err)` - as `this.logging` doesn't exist in this file. Updated to use correct logging method.
2020-04-21 15:28:13 +05:30
Renovate Bot
dbb041e214 Update dependency @types/node to v12.12.36 2020-04-17 21:38:50 +00:00
Nazar Gargol
07cb94d57e Published new versions
- @tryghost/magic-link@0.4.2
 - @tryghost/members-api@0.18.1
 - @tryghost/members-ssr@0.7.5
2020-04-17 14:09:59 +12:00
Nazar Gargol
42b839c3b4 Removed substack-ghost-csv-converter package
- substack-ghost-csv-converter has been moved to more appropriate
repository - TryGhost/migrate
(2be64543bd)
2020-04-16 17:20:01 +12:00
Renovate Bot
5d687a3548 Update dependency @types/node to v12.12.35 2020-04-08 20:35:00 +00:00
Renovate Bot
280f4ea7cb Update dependency @types/jsonwebtoken to v8.3.9 2020-04-07 03:15:52 +00:00
Renovate Bot
09f79b10ac Update dependency @types/node to v12.12.34 2020-03-31 00:07:17 +00:00
Renovate Bot
d6897df163 Update dependency @types/node to v12.12.33 2020-03-30 23:20:06 +00:00
Renovate Bot
aa086e8728 Update dependency @types/node to v12.12.32 2020-03-27 18:15:22 +00:00
Renovate Bot
65d1040aad Update dependency @types/node to v12.12.31 2020-03-25 07:18:47 +00:00
Renovate Bot
7fe71fd23c Update dependency @tryghost/pretty-cli to v1.2.4 2020-03-20 21:17:51 +00:00
Renovate Bot
8057564a34 Update dependency mocha to v7.1.1 2020-03-18 10:16:37 +00:00
Renovate Bot
808aa8f9a3 Update dependency nock to v12.0.3 2020-03-17 12:25:52 +00:00
Renovate Bot
f628708317 Update Test & linting packages 2020-03-17 03:20:46 +00:00
Renovate Bot
f341891fd2 Pin dependency nock to 12.0.0 2020-03-17 02:15:32 +00:00
Renovate Bot
3b4317b988 Update dependency @types/nodemailer to v6.4.0 2020-03-13 05:30:18 +00:00
Renovate Bot
650d578ef8 Update dependency @types/jsonwebtoken to v8.3.8 2020-03-13 04:32:42 +00:00
Renovate Bot
a3f34c5905 Update dependency @types/node to v12.12.30 2020-03-13 02:33:25 +00:00
Nazar Gargol
95ab4e7b51 Published new versions
- @tryghost/members-api@0.18.0
2020-03-04 11:36:06 +08:00
Nazar Gargol
076e328f20 Added currency and currency_symbol properties to plans
no issue

- Adding these properties allows specifying which currency is currently used on member's plan.
- Supported currencies list: USD, AUD, CAD, GBP, EUR
- They were chosen based on the most used/requested currencies within Ghost
- With adding multiple available currencies that can be setup also had to add handling of Stripes limitation of having single currency per paying customer
2020-03-04 11:33:19 +08:00
Kevin Ansfield
7fb1c2e07e Published new versions
- @tryghost/members-api@0.17.0
2020-02-27 10:35:43 +00:00
Kevin Ansfield
615a482c48 Store geolocation data during member signup/signin (#128)
requires f38d490886

- adds `lib/geolocation.js` with `getGeolocationFromIP()` function which uses https://geojs.io to lookup geolocation data from an IPv4 or IPv6 address
- updates `create/updateMember()` functions to work with a `geolocation` property in the passed in object
  - if `geolocation` is `undefined` when updating a member do not reset any existing property
- updates `sendMagicLink` middleware to extract the IP address from the request and stores it as part of the token payload
- updates `getMemberDataFromMagicLinkToken()` method to extract the IP address from the token payload and perform a geolocation lookup if we have an IP address and a matching member does not already have geolocation data
2020-02-27 10:29:36 +00:00
Nazar Gargol
fb7fa87c3b Published new versions
- @tryghost/members-api@0.16.2
2020-02-27 17:09:59 +08:00
Nazar Gargol
9a783f9f0c Revert "Added precaution to avoid creating multiple Complimentary plans"
This reverts commit 5f0d2168f3.

After discussing the best approach to multipe currency problem would be
to allow creating multiple "Complimentary" plans. All security related
checks should stay strictly based on name and would not cause issues.
2020-02-27 16:55:03 +08:00
Nazar Gargol
fbe153cc97 Published new versions
- @tryghost/members-api@0.16.1
2020-02-27 13:53:46 +08:00
Nazar Gargol
5f0d2168f3 Added precaution to avoid creating multiple Complimentary plans
refs https://github.com/TryGhost/Ghost-Admin/pull/1430

- When the client creates a complimentary plan with other currency than USD we should not allow for it to avoid creating a mess in the Stripe plans
2020-02-27 13:53:05 +08:00
Nazar Gargol
71395fcfcb Published new versions
- @tryghost/members-api@0.16.0
2020-02-26 12:11:21 +08:00
Naz
b34b7bfa9c Added middleware to handle billing updates (#122)
refs https://github.com/TryGhost/Ghost/pull/11571 

- Allows updating members billing information through Stripe's setup intent (stripe.com/docs/payments/checkout/subscriptions/updating#set)
- Accepts 2 new parameter to handle redirects specific to billing update.
2020-02-26 12:09:09 +08:00
Nazar Gargol
56c4c664c2 Published new versions
- @tryghost/members-api@0.15.1
2020-02-17 16:26:50 +08:00
Nazar Gargol
13773cbeb4 Removed "Complimentary" subscription edit limitation
no issue

- There is no need to treat complimentary subscriptions in different way to regular subscription on the client.
2020-02-17 16:25:41 +08:00
Rish
cf6b9501ca Published new versions
- @tryghost/magic-link@0.4.1
 - @tryghost/members-api@0.15.0
2020-02-12 16:44:08 +05:30
Rishabh Garg
789462aa5f Added labels to member signup flow (#124)
no issue

refs https://github.com/TryGhost/Ghost/pull/11538
2020-02-12 16:42:49 +05:30
Nazar Gargol
5e2256833c Published new versions
- @tryghost/members-api@0.14.2
2020-02-11 14:04:12 +08:00
Nazar Gargol
a669cda605 Added fallback plan nickname to inteval instead of empty string
no issue

- On model layer in Ghost empty string is always converted to `null` for not nullable fields, which wasn't letting the value through to the database
- Current solution is a stopgap to fix imports of cyclic plans without nicknames. Ideally nickname field should become nullable in the future so this logic can be simplified
2020-02-11 14:02:40 +08:00
Nazar Gargol
38bfef2b83 Published new versions
- @tryghost/members-api@0.14.1
2020-02-10 19:01:34 +08:00
Naz
f2a7790cc9 Added plan nickname fallback to empty string (#126)
no issue

- This solves a problem when connected Stripe plan doesn't have plan `nickname` filled out (possible with older versions of Stripe API)
- Defaulting to empty string instead of creating a migration because SQLite doesn't support `ALTER ... MODIFY` syntax and thus knex can't altter the table that easy
- "Marks the column as an alter / modify, instead of the default add. Note: This only works in .alterTable() and is not supported by SQlite or Amazon Redshift. Alter is not done incrementally over older column type so if you like to add notNull and keep the old default value, the alter statement must contain both .notNull().defaultTo(1).alter(). If one just tries to add .notNull().alter() the old default value will be dropped." (ref. https://knexjs.org/#Chainable)
2020-02-10 18:59:52 +08:00
Nazar Gargol
6de6a15376 Published new versions
- @tryghost/magic-link@0.4.0
 - @tryghost/members-api@0.14.0
2020-02-06 18:04:18 +08:00
Naz
2a51a478fc Exposed getMagicLink method (#123)
refs https://github.com/TryGhost/Ghost/pull/11573

- Adds `getMagicLink` method to members-api which can be used to generate a signin link for the member
2020-02-06 17:08:39 +08:00
Nazar Gargol
133d1ece06 Published new versions
- @tryghost/substack-ghost-csv-converter@0.1.0
2020-02-04 14:08:39 +08:00
Naz Gargol
d0f8cd9e78 Added Substack to Ghost CSV converter package (#121)
refs https://github.com/TryGhost/Ghost/pull/11539

- The script helps to migrate CSV exports from Substack to Ghost-compatible ones
2020-02-04 14:03:29 +08:00
Nazar Gargol
e4637ac56f Published new versions
- @tryghost/members-api@0.13.0
2020-01-28 19:01:14 +07:00
Naz Gargol
96aea55270 Added ability to link member to existing stripe customer (#120)
refs https://github.com/TryGhost/Ghost/pull/11539

- Method needed to allow linking existing Stripe customers and subscriptions with members
2020-01-28 19:00:28 +07:00