mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-03 23:00:14 -05:00
Removed unused getPaymentConfig method
refs: https://github.com/TryGhost/Team/issues/1625 - this references unused stripe_product_name setting and defunct stripe_plans setting, but is not used anywhere
This commit is contained in:
parent
403b311f54
commit
dec6a4d72a
3 changed files with 0 additions and 28 deletions
|
@ -170,9 +170,6 @@ function createApiInstance(config) {
|
|||
}
|
||||
}
|
||||
},
|
||||
paymentConfig: {
|
||||
stripe: config.getStripePaymentConfig()
|
||||
},
|
||||
models: {
|
||||
EmailRecipient: models.EmailRecipient,
|
||||
StripeCustomer: models.MemberStripeCustomer,
|
||||
|
|
|
@ -98,25 +98,6 @@ class MembersConfigProvider {
|
|||
return this.getActiveStripeKeys() !== null;
|
||||
}
|
||||
|
||||
getStripePaymentConfig() {
|
||||
if (!this.isStripeConnected()) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const stripeApiKeys = this.getActiveStripeKeys();
|
||||
|
||||
if (!stripeApiKeys) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
product: {
|
||||
name: this._settingsCache.get('stripe_product_name')
|
||||
},
|
||||
plans: this._settingsCache.get('stripe_plans') || []
|
||||
};
|
||||
}
|
||||
|
||||
getAuthSecret() {
|
||||
const hexSecret = this._settingsCache.get('members_email_auth_secret');
|
||||
if (!hexSecret) {
|
||||
|
|
|
@ -67,12 +67,6 @@ describe('Members - config', function () {
|
|||
sinon.restore();
|
||||
});
|
||||
|
||||
it('Does not export webhookHandlerUrl', function () {
|
||||
const paymentConfig = membersConfig.getStripePaymentConfig();
|
||||
|
||||
assert.equal(paymentConfig.webhookHandlerUrl, undefined, 'webhookHandlerUrl should not exist');
|
||||
});
|
||||
|
||||
it('can get correct tokenConfig', function () {
|
||||
const {issuer, publicKey, privateKey} = membersConfig.getTokenConfig();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue