Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Commit

Permalink
Add v3.25.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickRe committed Jul 13, 2020
1 parent 8a8efe8 commit 2a754bf
Show file tree
Hide file tree
Showing 12 changed files with 102 additions and 43 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
const logging = require('../../../../../shared/logging');
module.exports = {
config: {
transaction: true
},

async up({transacting: knex}) {
logging.info('Updating members_stripe_webhook_id & members_stripe_webhook_secret settings to group: core, type: string, flags: null');
await knex('settings')
.update({
group: 'core',
type: 'string',
flags: null
})
.whereIn('key', [
'members_stripe_webhook_id',
'members_stripe_webhook_secret'
]);
},

async down() {}
};
8 changes: 8 additions & 0 deletions core/server/data/schema/default-settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,14 @@
"members_email_auth_secret": {
"defaultValue": null,
"type": "string"
},
"members_stripe_webhook_id": {
"defaultValue": null,
"type": "string"
},
"members_stripe_webhook_secret": {
"defaultValue": null,
"type": "string"
}
},
"site": {
Expand Down
23 changes: 20 additions & 3 deletions core/server/services/members/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,26 @@ function createApiInstance(config) {
paymentConfig: {
stripe: config.getStripePaymentConfig()
},
memberStripeCustomerModel: models.MemberStripeCustomer,
stripeCustomerSubscriptionModel: models.StripeCustomerSubscription,
memberModel: models.Member,
models: {
/**
* Settings do not have their own models, so we wrap the webhook in a "fake" model
*/
StripeWebhook: {
async upsert(data, options) {
const settings = [{
key: 'members_stripe_webhook_id',
value: data.webhook_id
}, {
key: 'members_stripe_webhook_secret',
value: data.secret
}];
await models.Settings.edit(settings, options);
}
},
StripeCustomer: models.MemberStripeCustomer,
StripeCustomerSubscription: models.StripeCustomerSubscription,
Member: models.Member
},
logger: logging
});

Expand Down
6 changes: 5 additions & 1 deletion core/server/services/members/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class MembersConfigProvider {
getStripeUrlConfig() {
const siteUrl = this._urlUtils.getSiteUrl();

const webhookHandlerUrl = new URL('/members/webhooks/stripe', siteUrl);
const webhookHandlerUrl = new URL('members/webhooks/stripe/', siteUrl);

const checkoutSuccessUrl = new URL(siteUrl);
checkoutSuccessUrl.searchParams.set('stripe', 'success');
Expand Down Expand Up @@ -174,6 +174,10 @@ class MembersConfigProvider {
billingSuccessUrl: urls.billingSuccess,
billingCancelUrl: urls.billingCancel,
webhookHandlerUrl: urls.webhookHandler,
webhook: {
id: this._settingsCache.get('members_stripe_webhook_id'),
secret: this._settingsCache.get('members_stripe_webhook_secret')
},
product: {
name: this._settingsCache.get('stripe_product_name')
},
Expand Down
1 change: 1 addition & 0 deletions core/server/services/members/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ function createSettingsInstance(config) {
logging.warn(message.text);
}
let msg = Object.assign({
from: config.getEmailFromAddress(),
subject: 'Update email address',
forceTextContent: true
}, message);
Expand Down
6 changes: 3 additions & 3 deletions core/server/web/admin/views/default-prod.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<title>Ghost Admin</title>


<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%223.24%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22moment%22%3A%7B%22includeTimezone%22%3A%22all%22%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%223.25%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22moment%22%3A%7B%22includeTimezone%22%3A%22all%22%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />

<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
Expand All @@ -34,7 +34,7 @@


<link rel="stylesheet" href="assets/vendor.min-59d06862d7441e413f92fcc5c41f807e.css">
<link rel="stylesheet" href="assets/ghost.min-4053bee034b1d887e768cdc3ed2e9cbb.css" title="light">
<link rel="stylesheet" href="assets/ghost.min-cf254c8f9d650ca26556c701f3b185c4.css" title="light">



Expand All @@ -53,7 +53,7 @@


<script src="assets/vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js"></script>
<script src="assets/ghost.min-231fdf5b6b261a6bf2e1569b829a83d9.js"></script>
<script src="assets/ghost.min-f796664604606a30a2d0b85f57ca4b24.js"></script>

</body>
</html>
6 changes: 3 additions & 3 deletions core/server/web/admin/views/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<title>Ghost Admin</title>


<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%223.24%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22moment%22%3A%7B%22includeTimezone%22%3A%22all%22%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />
<meta name="ghost-admin/config/environment" content="%7B%22modulePrefix%22%3A%22ghost-admin%22%2C%22environment%22%3A%22production%22%2C%22rootURL%22%3A%22%2F%22%2C%22locationType%22%3A%22trailing-hash%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%2C%22EXTEND_PROTOTYPES%22%3A%7B%22Date%22%3Afalse%2C%22Array%22%3Atrue%2C%22String%22%3Atrue%2C%22Function%22%3Afalse%7D%2C%22_APPLICATION_TEMPLATE_WRAPPER%22%3Afalse%2C%22_JQUERY_INTEGRATION%22%3Atrue%2C%22_TEMPLATE_ONLY_GLIMMER_COMPONENTS%22%3Atrue%7D%2C%22APP%22%3A%7B%22version%22%3A%223.25%22%2C%22name%22%3A%22ghost-admin%22%7D%2C%22ember-simple-auth%22%3A%7B%7D%2C%22moment%22%3A%7B%22includeTimezone%22%3A%22all%22%7D%2C%22ember-cli-mirage%22%3A%7B%22usingProxy%22%3Afalse%2C%22useDefaultPassthroughs%22%3Atrue%7D%2C%22exportApplicationGlobal%22%3Afalse%2C%22ember-load%22%3A%7B%22loadingIndicatorClass%22%3A%22ember-load-indicator%22%7D%7D" />

<meta name="HandheldFriendly" content="True" />
<meta name="MobileOptimized" content="320" />
Expand All @@ -34,7 +34,7 @@


<link rel="stylesheet" href="assets/vendor.min-59d06862d7441e413f92fcc5c41f807e.css">
<link rel="stylesheet" href="assets/ghost.min-4053bee034b1d887e768cdc3ed2e9cbb.css" title="light">
<link rel="stylesheet" href="assets/ghost.min-cf254c8f9d650ca26556c701f3b185c4.css" title="light">



Expand All @@ -53,7 +53,7 @@


<script src="assets/vendor.min-8588d6e951f88d5f76ef7dcf04aa957a.js"></script>
<script src="assets/ghost.min-231fdf5b6b261a6bf2e1569b829a83d9.js"></script>
<script src="assets/ghost.min-f796664604606a30a2d0b85f57ca4b24.js"></script>

</body>
</html>
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ghost",
"version": "3.24.0",
"version": "3.25.0",
"description": "The professional publishing platform",
"author": "Ghost Foundation",
"homepage": "https://ghost.org",
Expand Down Expand Up @@ -52,7 +52,7 @@
"@tryghost/kg-markdown-html-renderer": "2.0.1",
"@tryghost/kg-mobiledoc-html-renderer": "3.0.1",
"@tryghost/magic-link": "0.4.10",
"@tryghost/members-api": "0.23.2",
"@tryghost/members-api": "0.24.0",
"@tryghost/members-csv": "0.2.1",
"@tryghost/members-ssr": "0.8.2",
"@tryghost/mw-session-from-token": "0.1.5",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -486,10 +486,10 @@
jsonwebtoken "^8.5.1"
lodash "^4.17.15"

"@tryghost/members-api@0.23.2":
version "0.23.2"
resolved "https://registry.npmjs.org/@tryghost/members-api/-/members-api-0.23.2.tgz#a4c644e175d4ede7cec2797c75f822b1f801f8bc"
integrity sha512-/1r7/gg7xPHeEikt5FwXx1zmwK3pdqBsCk55Nc0W+TRZznAvKSGuUMNx3mpdQpSf6ry7/0E8RyEaC5p521W6iQ==
"@tryghost/members-api@0.24.0":
version "0.24.0"
resolved "https://registry.yarnpkg.com/@tryghost/members-api/-/members-api-0.24.0.tgz#d4f07ec52e6a93f5563e26e1c2d083fb69fb2da1"
integrity sha512-2jIl02vDdT9iphsTiQB2mmLANZ7UVmZB50xPuGIL9b8YEE4vddHHR8yPoW97TdSqHOMFIQ7CZPyOJjxQ5gFqUA==
dependencies:
"@tryghost/magic-link" "^0.4.10"
bluebird "^3.5.4"
Expand Down

0 comments on commit 2a754bf

Please sign in to comment.