mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-29 13:52:10 +03:00
Fixed Members Stripe config for Stripe Connect
no-issue This was initially missed as local settings always had the original stripeDirect keys, this ensures that regardless of Connect vs Direct vs Both vs Neither that the config is correct. Also ensures that the Members API instance is reloaded when the Stripe Connect settings are changed.
This commit is contained in:
parent
008f86fc29
commit
63f1e57036
@ -131,10 +131,6 @@ class MembersConfigProvider {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!stripePaymentProcessor.config.public_token || !stripePaymentProcessor.config.secret_token) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
// NOTE: "Complimentary" plan has to be first in the queue so it is created even if regular plans are not configured
|
// NOTE: "Complimentary" plan has to be first in the queue so it is created even if regular plans are not configured
|
||||||
stripePaymentProcessor.config.plans.unshift(COMPLIMENTARY_PLAN);
|
stripePaymentProcessor.config.plans.unshift(COMPLIMENTARY_PLAN);
|
||||||
|
|
||||||
@ -157,6 +153,10 @@ class MembersConfigProvider {
|
|||||||
stripePaymentProcessor.config.secret_token
|
stripePaymentProcessor.config.secret_token
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if (!stripeApiKeys.publicKey || !stripeApiKeys.secretKey) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
publicKey: stripeApiKeys.publicKey,
|
publicKey: stripeApiKeys.publicKey,
|
||||||
secretKey: stripeApiKeys.secretKey,
|
secretKey: stripeApiKeys.secretKey,
|
||||||
|
@ -23,7 +23,7 @@ let membersSettings;
|
|||||||
|
|
||||||
// Bind to events to automatically keep subscription info up-to-date from settings
|
// Bind to events to automatically keep subscription info up-to-date from settings
|
||||||
events.on('settings.edited', function updateSettingFromModel(settingModel) {
|
events.on('settings.edited', function updateSettingFromModel(settingModel) {
|
||||||
if (!['members_subscription_settings'].includes(settingModel.get('key'))) {
|
if (!['members_subscription_settings', 'stripe_connect_integration'].includes(settingModel.get('key'))) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user