2020-06-11 12:05:40 +03:00
|
|
|
import Service from '@ember/service';
|
|
|
|
import {inject as service} from '@ember/service';
|
|
|
|
|
|
|
|
export default class MembersUtilsService extends Service {
|
|
|
|
@service settings;
|
|
|
|
|
2020-06-11 15:46:04 +03:00
|
|
|
get isStripeEnabled() {
|
|
|
|
let membersSubscriptionSettings = this.settings.parseSubscriptionSettings(this.settings.get('membersSubscriptionSettings'));
|
2020-06-11 12:05:40 +03:00
|
|
|
let stripeEnabled = membersSubscriptionSettings && !!(membersSubscriptionSettings.paymentProcessors[0].config.secret_token) && !!(membersSubscriptionSettings.paymentProcessors[0].config.public_token);
|
|
|
|
return stripeEnabled;
|
|
|
|
}
|
|
|
|
}
|