mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
feat(nestjs): migrate to NestJS
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
|
||||
@Injectable()
|
||||
export class GetStripeAuthorizationLinkService {
|
||||
constructor(private readonly config: ConfigService) {}
|
||||
|
||||
public getStripeAuthLink() {
|
||||
const clientId = this.config.get('stripePayment.clientId');
|
||||
const redirectUrl = this.config.get('stripePayment.redirectTo');
|
||||
|
||||
const authorizationUri = `https://connect.stripe.com/oauth/v2/authorize?response_type=code&client_id=${clientId}&scope=read_write&redirect_uri=${redirectUrl}`;
|
||||
|
||||
return authorizationUri;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user