mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-21 15:20:34 +00:00
refactor: payment services to nestjs
This commit is contained in:
@@ -20,14 +20,15 @@
|
|||||||
"test:e2e": "jest --config ./test/jest-e2e.json --watchAll"
|
"test:e2e": "jest --config ./test/jest-e2e.json --watchAll"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"@aws-sdk/client-s3": "^3.576.0",
|
||||||
|
"@aws-sdk/s3-request-presigner": "^3.583.0",
|
||||||
"@bigcapital/email-components": "*",
|
"@bigcapital/email-components": "*",
|
||||||
"@bigcapital/pdf-templates": "*",
|
"@bigcapital/pdf-templates": "*",
|
||||||
"@bigcapital/server": "*",
|
"@bigcapital/server": "*",
|
||||||
"@bigcapital/utils": "*",
|
"@bigcapital/utils": "*",
|
||||||
"@liaoliaots/nestjs-redis": "^10.0.0",
|
|
||||||
"@aws-sdk/client-s3": "^3.576.0",
|
|
||||||
"@aws-sdk/s3-request-presigner": "^3.583.0",
|
|
||||||
"@casl/ability": "^5.4.3",
|
"@casl/ability": "^5.4.3",
|
||||||
|
"@lemonsqueezy/lemonsqueezy.js": "^2.2.0",
|
||||||
|
"@liaoliaots/nestjs-redis": "^10.0.0",
|
||||||
"@nestjs/bull": "^10.2.1",
|
"@nestjs/bull": "^10.2.1",
|
||||||
"@nestjs/bullmq": "^10.2.2",
|
"@nestjs/bullmq": "^10.2.2",
|
||||||
"@nestjs/cache-manager": "^2.2.2",
|
"@nestjs/cache-manager": "^2.2.2",
|
||||||
@@ -36,7 +37,7 @@
|
|||||||
"@nestjs/core": "^10.0.0",
|
"@nestjs/core": "^10.0.0",
|
||||||
"@nestjs/event-emitter": "^2.0.4",
|
"@nestjs/event-emitter": "^2.0.4",
|
||||||
"@nestjs/jwt": "^10.2.0",
|
"@nestjs/jwt": "^10.2.0",
|
||||||
"@nestjs/passport": "^10.0.3",
|
"@nestjs/passport": "^11.0.5",
|
||||||
"@nestjs/platform-express": "^10.0.0",
|
"@nestjs/platform-express": "^10.0.0",
|
||||||
"@nestjs/swagger": "^7.4.2",
|
"@nestjs/swagger": "^7.4.2",
|
||||||
"@nestjs/throttler": "^6.2.1",
|
"@nestjs/throttler": "^6.2.1",
|
||||||
@@ -44,7 +45,6 @@
|
|||||||
"@types/nodemailer": "^6.4.17",
|
"@types/nodemailer": "^6.4.17",
|
||||||
"@types/passport-local": "^1.0.38",
|
"@types/passport-local": "^1.0.38",
|
||||||
"@types/ramda": "^0.30.2",
|
"@types/ramda": "^0.30.2",
|
||||||
"@lemonsqueezy/lemonsqueezy.js": "^2.2.0",
|
|
||||||
"accounting": "^0.4.1",
|
"accounting": "^0.4.1",
|
||||||
"async": "^3.2.0",
|
"async": "^3.2.0",
|
||||||
"async-mutex": "^0.5.0",
|
"async-mutex": "^0.5.0",
|
||||||
|
|||||||
@@ -15,9 +15,12 @@ import {
|
|||||||
import { Request, Response, NextFunction } from 'express';
|
import { Request, Response, NextFunction } from 'express';
|
||||||
import { ApiTags } from '@nestjs/swagger';
|
import { ApiTags } from '@nestjs/swagger';
|
||||||
import { PaymentServicesApplication } from './PaymentServicesApplication';
|
import { PaymentServicesApplication } from './PaymentServicesApplication';
|
||||||
|
import { PublicRoute } from '../Auth/Jwt.guard';
|
||||||
|
import { EditPaymentMethodDTO } from './types';
|
||||||
|
|
||||||
@ApiTags('PaymentServices')
|
@ApiTags('PaymentServices')
|
||||||
@Controller('payment-services')
|
@Controller('payment-services')
|
||||||
|
@PublicRoute()
|
||||||
export class PaymentServicesController {
|
export class PaymentServicesController {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly paymentServicesApp: PaymentServicesApplication,
|
private readonly paymentServicesApp: PaymentServicesApplication,
|
||||||
@@ -53,13 +56,10 @@ export class PaymentServicesController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Post('/:paymentMethodId')
|
@Post('/:paymentMethodId')
|
||||||
@UsePipes(new ValidationPipe({ whitelist: true }))
|
|
||||||
async updatePaymentMethod(
|
async updatePaymentMethod(
|
||||||
@Param('paymentMethodId') paymentMethodId: number,
|
@Param('paymentMethodId') paymentMethodId: number,
|
||||||
@Body() updatePaymentMethodDTO: any,
|
@Body() updatePaymentMethodDTO: EditPaymentMethodDTO,
|
||||||
@Req() req: Request,
|
|
||||||
@Res() res: Response,
|
@Res() res: Response,
|
||||||
@Next() next: NextFunction,
|
|
||||||
) {
|
) {
|
||||||
await this.paymentServicesApp.editPaymentMethod(
|
await this.paymentServicesApp.editPaymentMethod(
|
||||||
paymentMethodId,
|
paymentMethodId,
|
||||||
|
|||||||
@@ -6,8 +6,19 @@ import { GetPaymentServicesSpecificInvoice } from './queries/GetPaymentServicesS
|
|||||||
import { GetPaymentMethodsStateService } from './queries/GetPaymentMethodsState';
|
import { GetPaymentMethodsStateService } from './queries/GetPaymentMethodsState';
|
||||||
import { PaymentServicesApplication } from './PaymentServicesApplication';
|
import { PaymentServicesApplication } from './PaymentServicesApplication';
|
||||||
import { PaymentServicesController } from './PaymentServices.controller';
|
import { PaymentServicesController } from './PaymentServices.controller';
|
||||||
|
import { RegisterTenancyModel } from '../Tenancy/TenancyModels/Tenancy.module';
|
||||||
|
import { PaymentIntegration } from './models/PaymentIntegration.model';
|
||||||
|
import { TransactionPaymentServiceEntry } from './models/TransactionPaymentServiceEntry.model';
|
||||||
|
import { StripePaymentModule } from '../StripePayment/StripePayment.module';
|
||||||
|
|
||||||
|
const models = [
|
||||||
|
RegisterTenancyModel(PaymentIntegration),
|
||||||
|
RegisterTenancyModel(TransactionPaymentServiceEntry),
|
||||||
|
];
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
|
imports: [...models, StripePaymentModule],
|
||||||
|
exports: [...models],
|
||||||
providers: [
|
providers: [
|
||||||
DeletePaymentMethodService,
|
DeletePaymentMethodService,
|
||||||
EditPaymentMethodService,
|
EditPaymentMethodService,
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
import { Service, Inject } from 'typedi';
|
|
||||||
import { GetPaymentServicesSpecificInvoice } from './queries/GetPaymentServicesSpecificInvoice';
|
import { GetPaymentServicesSpecificInvoice } from './queries/GetPaymentServicesSpecificInvoice';
|
||||||
import { DeletePaymentMethodService } from './commands/DeletePaymentMethodService';
|
import { DeletePaymentMethodService } from './commands/DeletePaymentMethodService';
|
||||||
import { EditPaymentMethodService } from './commands/EditPaymentMethodService';
|
import { EditPaymentMethodService } from './commands/EditPaymentMethodService';
|
||||||
import { EditPaymentMethodDTO, GetPaymentMethodsPOJO } from './types';
|
import { EditPaymentMethodDTO, GetPaymentMethodsPOJO } from './types';
|
||||||
import { GetPaymentMethodsStateService } from './queries/GetPaymentMethodsState';
|
import { GetPaymentMethodsStateService } from './queries/GetPaymentMethodsState';
|
||||||
import { GetPaymentMethodService } from './queries/GetPaymentService';
|
import { GetPaymentMethodService } from './queries/GetPaymentService';
|
||||||
|
import { Injectable } from '@nestjs/common';
|
||||||
|
|
||||||
@Service()
|
@Injectable()
|
||||||
export class PaymentServicesApplication {
|
export class PaymentServicesApplication {
|
||||||
constructor(
|
constructor(
|
||||||
private readonly getPaymentServicesSpecificInvoice: GetPaymentServicesSpecificInvoice,
|
private readonly getPaymentServicesSpecificInvoice: GetPaymentServicesSpecificInvoice,
|
||||||
@@ -22,9 +22,7 @@ export class PaymentServicesApplication {
|
|||||||
* @returns {Promise<any>} The payment services for the specified invoice.
|
* @returns {Promise<any>} The payment services for the specified invoice.
|
||||||
*/
|
*/
|
||||||
public async getPaymentServicesForInvoice(): Promise<any> {
|
public async getPaymentServicesForInvoice(): Promise<any> {
|
||||||
return this.getPaymentServicesSpecificInvoice.getPaymentServicesInvoice(
|
return this.getPaymentServicesSpecificInvoice.getPaymentServicesInvoice();
|
||||||
tenantId,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -37,7 +35,7 @@ export class PaymentServicesApplication {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes the given payment method.
|
* Deletes the given payment method.
|
||||||
* @param {number} paymentIntegrationId
|
* @param {number} paymentIntegrationId - Payment integration id.
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public async deletePaymentMethod(
|
public async deletePaymentMethod(
|
||||||
@@ -50,8 +48,8 @@ export class PaymentServicesApplication {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Edits the given payment method.
|
* Edits the given payment method.
|
||||||
* @param {number} paymentIntegrationId
|
* @param {number} paymentIntegrationId - Payment integration id.
|
||||||
* @param {EditPaymentMethodDTO} editPaymentMethodDTO
|
* @param {EditPaymentMethodDTO} editPaymentMethodDTO - Edit payment method DTO.
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
public async editPaymentMethod(
|
public async editPaymentMethod(
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import { Knex } from 'knex';
|
import { Knex } from 'knex';
|
||||||
import { EditPaymentMethodDTO } from '../types';
|
import { EditPaymentMethodDTO } from '../types';
|
||||||
import { TransactionPaymentServiceEntry } from '../models/TransactionPaymentServiceEntry.model';
|
|
||||||
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
||||||
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
||||||
import { EventEmitter2 } from '@nestjs/event-emitter';
|
import { EventEmitter2 } from '@nestjs/event-emitter';
|
||||||
@@ -18,11 +17,6 @@ export class EditPaymentMethodService {
|
|||||||
private readonly paymentIntegrationModel: TenantModelProxy<
|
private readonly paymentIntegrationModel: TenantModelProxy<
|
||||||
typeof PaymentIntegration
|
typeof PaymentIntegration
|
||||||
>,
|
>,
|
||||||
|
|
||||||
@Inject(TransactionPaymentServiceEntry.name)
|
|
||||||
private readonly transactionPaymentServiceEntryModel: TenantModelProxy<
|
|
||||||
typeof TransactionPaymentServiceEntry
|
|
||||||
>,
|
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
import { BaseModel } from "@/models/Model";
|
import { BaseModel } from '@/models/Model';
|
||||||
|
|
||||||
export class PaymentIntegration extends BaseModel {
|
export class PaymentIntegration extends BaseModel {
|
||||||
|
readonly name!: string;
|
||||||
readonly service!: string;
|
readonly service!: string;
|
||||||
readonly paymentEnabled!: boolean;
|
readonly paymentEnabled!: boolean;
|
||||||
readonly payoutEnabled!: boolean;
|
readonly payoutEnabled!: boolean;
|
||||||
readonly accountId!: string;
|
readonly accountId!: string;
|
||||||
|
readonly options!: Record<string, any>;
|
||||||
|
|
||||||
static get tableName() {
|
static get tableName() {
|
||||||
return 'payment_integrations';
|
return 'payment_integrations';
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import { ConfigService } from '@nestjs/config';
|
import { ConfigService } from '@nestjs/config';
|
||||||
import { GetPaymentMethodsPOJO } from '../types';
|
import { GetPaymentMethodsPOJO } from '../types';
|
||||||
import { isStripePaymentConfigured } from '../utils';
|
|
||||||
import { GetStripeAuthorizationLinkService } from '../../StripePayment/GetStripeAuthorizationLink';
|
import { GetStripeAuthorizationLinkService } from '../../StripePayment/GetStripeAuthorizationLink';
|
||||||
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
||||||
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
||||||
@@ -23,8 +22,7 @@ export class GetPaymentMethodsStateService {
|
|||||||
* @param {number} tenantId
|
* @param {number} tenantId
|
||||||
* @returns {Promise<GetPaymentMethodsPOJO>}
|
* @returns {Promise<GetPaymentMethodsPOJO>}
|
||||||
*/
|
*/
|
||||||
public async getPaymentMethodsState(
|
public async getPaymentMethodsState(): Promise<GetPaymentMethodsPOJO> {
|
||||||
): Promise<GetPaymentMethodsPOJO> {
|
|
||||||
const stripePayment = await this.paymentIntegrationModel()
|
const stripePayment = await this.paymentIntegrationModel()
|
||||||
.query()
|
.query()
|
||||||
.orderBy('createdAt', 'ASC')
|
.orderBy('createdAt', 'ASC')
|
||||||
@@ -43,7 +41,7 @@ export class GetPaymentMethodsStateService {
|
|||||||
);
|
);
|
||||||
const stripeCurrencies = ['USD', 'EUR'];
|
const stripeCurrencies = ['USD', 'EUR'];
|
||||||
const stripeRedirectUrl = 'https://your-stripe-redirect-url.com';
|
const stripeRedirectUrl = 'https://your-stripe-redirect-url.com';
|
||||||
const isStripeServerConfigured = isStripePaymentConfigured();
|
const isStripeServerConfigured = this.isStripePaymentConfigured();
|
||||||
const stripeAuthLink =
|
const stripeAuthLink =
|
||||||
this.getStripeAuthorizationLinkService.getStripeAuthLink();
|
this.getStripeAuthorizationLinkService.getStripeAuthLink();
|
||||||
|
|
||||||
@@ -64,4 +62,16 @@ export class GetPaymentMethodsStateService {
|
|||||||
};
|
};
|
||||||
return paymentMethodPOJO;
|
return paymentMethodPOJO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determines if Stripe payment is configured.
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
private isStripePaymentConfigured() {
|
||||||
|
return (
|
||||||
|
this.configService.get('stripePayment.secretKey') &&
|
||||||
|
this.configService.get('stripePayment.publishableKey') &&
|
||||||
|
this.configService.get('stripePayment.webhooksSecret')
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import { Inject, Injectable } from '@nestjs/common';
|
|||||||
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
||||||
import { GetPaymentMethodsPOJO } from '../types';
|
import { GetPaymentMethodsPOJO } from '../types';
|
||||||
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
||||||
|
import { ModelObject } from 'objection';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class GetPaymentMethodService {
|
export class GetPaymentMethodService {
|
||||||
@@ -18,7 +19,7 @@ export class GetPaymentMethodService {
|
|||||||
*/
|
*/
|
||||||
public async getPaymentMethod(
|
public async getPaymentMethod(
|
||||||
paymentServiceId: number,
|
paymentServiceId: number,
|
||||||
): Promise<GetPaymentMethodsPOJO> {
|
): Promise<ModelObject<PaymentIntegration>> {
|
||||||
const stripePayment = await this.paymentIntegrationModel()
|
const stripePayment = await this.paymentIntegrationModel()
|
||||||
.query()
|
.query()
|
||||||
.findById(paymentServiceId)
|
.findById(paymentServiceId)
|
||||||
|
|||||||
@@ -1,33 +1,34 @@
|
|||||||
import { Inject, Service } from 'typedi';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import HasTenancyService from '../Tenancy/TenancyService';
|
import { TransformerInjectable } from '@/modules/Transformer/TransformerInjectable.service';
|
||||||
import { TransformerInjectable } from '@/lib/Transformer/TransformerInjectable';
|
|
||||||
import { GetPaymentServicesSpecificInvoiceTransformer } from './GetPaymentServicesSpecificInvoiceTransformer';
|
import { GetPaymentServicesSpecificInvoiceTransformer } from './GetPaymentServicesSpecificInvoiceTransformer';
|
||||||
|
import { PaymentIntegration } from '../models/PaymentIntegration.model';
|
||||||
|
import { TenantModelProxy } from '@/modules/System/models/TenantBaseModel';
|
||||||
|
|
||||||
@Service()
|
@Injectable()
|
||||||
export class GetPaymentServicesSpecificInvoice {
|
export class GetPaymentServicesSpecificInvoice {
|
||||||
@Inject()
|
constructor(
|
||||||
private tenancy: HasTenancyService;
|
private readonly transform: TransformerInjectable,
|
||||||
|
|
||||||
@Inject()
|
@Inject(PaymentIntegration.name)
|
||||||
private transform: TransformerInjectable;
|
private readonly paymentIntegrationModel: TenantModelProxy<
|
||||||
|
typeof PaymentIntegration
|
||||||
|
>,
|
||||||
|
) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves the payment services of the given invoice.
|
* Retrieves the payment services of the given invoice.
|
||||||
* @param {number} tenantId
|
|
||||||
* @param {number} invoiceId
|
* @param {number} invoiceId
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async getPaymentServicesInvoice(tenantId: number) {
|
async getPaymentServicesInvoice() {
|
||||||
const { PaymentIntegration } = this.tenancy.models(tenantId);
|
const paymentGateways = await this.paymentIntegrationModel()
|
||||||
|
.query()
|
||||||
const paymentGateways = await PaymentIntegration.query()
|
|
||||||
.modify('fullEnabled')
|
.modify('fullEnabled')
|
||||||
.orderBy('name', 'ASC');
|
.orderBy('name', 'ASC');
|
||||||
|
|
||||||
return this.transform.transform(
|
return this.transform.transform(
|
||||||
tenantId,
|
|
||||||
paymentGateways,
|
paymentGateways,
|
||||||
new GetPaymentServicesSpecificInvoiceTransformer()
|
new GetPaymentServicesSpecificInvoiceTransformer(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,64 @@
|
|||||||
export interface EditPaymentMethodDTO {
|
import { ApiPropertyOptional } from '@nestjs/swagger';
|
||||||
name?: string;
|
import { Type } from 'class-transformer';
|
||||||
options?: {
|
import {
|
||||||
bankAccountId?: number; // bank account.
|
IsBoolean,
|
||||||
clearningAccountId?: number; // current liability.
|
IsNumber,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
ValidateNested,
|
||||||
|
} from 'class-validator';
|
||||||
|
|
||||||
showVisa?: boolean;
|
class EditPaymentMethodOptionsDto {
|
||||||
showMasterCard?: boolean;
|
@IsOptional()
|
||||||
showDiscover?: boolean;
|
@IsNumber()
|
||||||
showAmer?: boolean;
|
bankAccountId?: number;
|
||||||
showJcb?: boolean;
|
|
||||||
showDiners?: boolean;
|
@IsOptional()
|
||||||
};
|
@IsNumber()
|
||||||
|
clearningAccountId?: number;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showVisa?: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showMasterCard?: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showDiscover?: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showAmer?: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showJcb?: boolean;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsBoolean()
|
||||||
|
showDiners?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class EditPaymentMethodDTO {
|
||||||
|
@IsOptional()
|
||||||
|
@ValidateNested()
|
||||||
|
@Type(() => EditPaymentMethodOptionsDto)
|
||||||
|
@ApiPropertyOptional({
|
||||||
|
type: () => EditPaymentMethodOptionsDto,
|
||||||
|
description: 'Edit payment method options',
|
||||||
|
})
|
||||||
|
options?: EditPaymentMethodOptionsDto;
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
@ApiPropertyOptional({
|
||||||
|
type: String,
|
||||||
|
description: 'Payment method name',
|
||||||
|
})
|
||||||
|
name?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetPaymentMethodsPOJO {
|
export interface GetPaymentMethodsPOJO {
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
import config from '@/config';
|
|
||||||
|
|
||||||
export const isStripePaymentConfigured = () => {
|
|
||||||
return (
|
|
||||||
config.stripePayment.secretKey &&
|
|
||||||
config.stripePayment.publishableKey &&
|
|
||||||
config.stripePayment.webhooksSecret
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ const models = [InjectSystemModel(PaymentIntegration)];
|
|||||||
StripeWebhooksSubscriber,
|
StripeWebhooksSubscriber,
|
||||||
TenancyContext,
|
TenancyContext,
|
||||||
],
|
],
|
||||||
exports: [StripePaymentService],
|
exports: [StripePaymentService, GetStripeAuthorizationLinkService],
|
||||||
controllers: [StripeIntegrationController],
|
controllers: [StripeIntegrationController],
|
||||||
})
|
})
|
||||||
export class StripePaymentModule {}
|
export class StripePaymentModule {}
|
||||||
|
|||||||
27
pnpm-lock.yaml
generated
27
pnpm-lock.yaml
generated
@@ -536,8 +536,8 @@ importers:
|
|||||||
specifier: ^10.2.0
|
specifier: ^10.2.0
|
||||||
version: 10.2.0(@nestjs/common@10.4.7)
|
version: 10.2.0(@nestjs/common@10.4.7)
|
||||||
'@nestjs/passport':
|
'@nestjs/passport':
|
||||||
specifier: ^10.0.3
|
specifier: ^11.0.5
|
||||||
version: 10.0.3(@nestjs/common@10.4.7)(passport@0.7.0)
|
version: 11.0.5(@nestjs/common@10.4.7)(passport@0.7.0)
|
||||||
'@nestjs/platform-express':
|
'@nestjs/platform-express':
|
||||||
specifier: ^10.0.0
|
specifier: ^10.0.0
|
||||||
version: 10.4.7(@nestjs/common@10.4.7)(@nestjs/core@10.4.7)
|
version: 10.4.7(@nestjs/common@10.4.7)(@nestjs/core@10.4.7)
|
||||||
@@ -1534,7 +1534,7 @@ packages:
|
|||||||
'@aws-crypto/sha256-browser': 3.0.0
|
'@aws-crypto/sha256-browser': 3.0.0
|
||||||
'@aws-crypto/sha256-js': 3.0.0
|
'@aws-crypto/sha256-js': 3.0.0
|
||||||
'@aws-sdk/client-sso-oidc': 3.583.0(@aws-sdk/client-sts@3.583.0)
|
'@aws-sdk/client-sso-oidc': 3.583.0(@aws-sdk/client-sts@3.583.0)
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/core': 3.582.0
|
'@aws-sdk/core': 3.582.0
|
||||||
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
||||||
'@aws-sdk/middleware-host-header': 3.577.0
|
'@aws-sdk/middleware-host-header': 3.577.0
|
||||||
@@ -1585,7 +1585,7 @@ packages:
|
|||||||
'@aws-crypto/sha256-browser': 3.0.0
|
'@aws-crypto/sha256-browser': 3.0.0
|
||||||
'@aws-crypto/sha256-js': 3.0.0
|
'@aws-crypto/sha256-js': 3.0.0
|
||||||
'@aws-sdk/client-sso-oidc': 3.583.0(@aws-sdk/client-sts@3.583.0)
|
'@aws-sdk/client-sso-oidc': 3.583.0(@aws-sdk/client-sts@3.583.0)
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/core': 3.582.0
|
'@aws-sdk/core': 3.582.0
|
||||||
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
||||||
'@aws-sdk/middleware-bucket-endpoint': 3.577.0
|
'@aws-sdk/middleware-bucket-endpoint': 3.577.0
|
||||||
@@ -1649,7 +1649,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@aws-crypto/sha256-browser': 3.0.0
|
'@aws-crypto/sha256-browser': 3.0.0
|
||||||
'@aws-crypto/sha256-js': 3.0.0
|
'@aws-crypto/sha256-js': 3.0.0
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/core': 3.582.0
|
'@aws-sdk/core': 3.582.0
|
||||||
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
'@aws-sdk/credential-provider-node': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)(@aws-sdk/client-sts@3.583.0)
|
||||||
'@aws-sdk/middleware-host-header': 3.577.0
|
'@aws-sdk/middleware-host-header': 3.577.0
|
||||||
@@ -1738,7 +1738,7 @@ packages:
|
|||||||
- aws-crt
|
- aws-crt
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@aws-sdk/client-sts@3.583.0(@aws-sdk/client-sso-oidc@3.583.0):
|
/@aws-sdk/client-sts@3.583.0:
|
||||||
resolution: {integrity: sha512-xDMxiemPDWr9dY2Q4AyixkRnk/hvS6fs6OWxuVCz1WO47YhaAfOsEGAgQMgDLLaOfj/oLU5D14uTNBEPGh4rBA==}
|
resolution: {integrity: sha512-xDMxiemPDWr9dY2Q4AyixkRnk/hvS6fs6OWxuVCz1WO47YhaAfOsEGAgQMgDLLaOfj/oLU5D14uTNBEPGh4rBA==}
|
||||||
engines: {node: '>=16.0.0'}
|
engines: {node: '>=16.0.0'}
|
||||||
dependencies:
|
dependencies:
|
||||||
@@ -1783,7 +1783,6 @@ packages:
|
|||||||
'@smithy/util-utf8': 3.0.0
|
'@smithy/util-utf8': 3.0.0
|
||||||
tslib: 2.8.0
|
tslib: 2.8.0
|
||||||
transitivePeerDependencies:
|
transitivePeerDependencies:
|
||||||
- '@aws-sdk/client-sso-oidc'
|
|
||||||
- aws-crt
|
- aws-crt
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
@@ -1846,7 +1845,7 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@aws-sdk/client-sts': ^3.583.0
|
'@aws-sdk/client-sts': ^3.583.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/credential-provider-env': 3.577.0
|
'@aws-sdk/credential-provider-env': 3.577.0
|
||||||
'@aws-sdk/credential-provider-process': 3.577.0
|
'@aws-sdk/credential-provider-process': 3.577.0
|
||||||
'@aws-sdk/credential-provider-sso': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/credential-provider-sso': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
||||||
@@ -1917,7 +1916,7 @@ packages:
|
|||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@aws-sdk/client-sts': ^3.577.0
|
'@aws-sdk/client-sts': ^3.577.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/types': 3.577.0
|
'@aws-sdk/types': 3.577.0
|
||||||
'@smithy/property-provider': 3.0.0
|
'@smithy/property-provider': 3.0.0
|
||||||
'@smithy/types': 3.0.0
|
'@smithy/types': 3.0.0
|
||||||
@@ -1931,7 +1930,7 @@ packages:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@aws-sdk/client-cognito-identity': 3.583.0
|
'@aws-sdk/client-cognito-identity': 3.583.0
|
||||||
'@aws-sdk/client-sso': 3.583.0
|
'@aws-sdk/client-sso': 3.583.0
|
||||||
'@aws-sdk/client-sts': 3.583.0(@aws-sdk/client-sso-oidc@3.583.0)
|
'@aws-sdk/client-sts': 3.583.0
|
||||||
'@aws-sdk/credential-provider-cognito-identity': 3.583.0
|
'@aws-sdk/credential-provider-cognito-identity': 3.583.0
|
||||||
'@aws-sdk/credential-provider-env': 3.577.0
|
'@aws-sdk/credential-provider-env': 3.577.0
|
||||||
'@aws-sdk/credential-provider-http': 3.582.0
|
'@aws-sdk/credential-provider-http': 3.582.0
|
||||||
@@ -7638,11 +7637,11 @@ packages:
|
|||||||
reflect-metadata: 0.2.2
|
reflect-metadata: 0.2.2
|
||||||
dev: false
|
dev: false
|
||||||
|
|
||||||
/@nestjs/passport@10.0.3(@nestjs/common@10.4.7)(passport@0.7.0):
|
/@nestjs/passport@11.0.5(@nestjs/common@10.4.7)(passport@0.7.0):
|
||||||
resolution: {integrity: sha512-znJ9Y4S8ZDVY+j4doWAJ8EuuVO7SkQN3yOBmzxbGaXbvcSwFDAdGJ+OMCg52NdzIO4tQoN4pYKx8W6M0ArfFRQ==}
|
resolution: {integrity: sha512-ulQX6mbjlws92PIM15Naes4F4p2JoxGnIJuUsdXQPT+Oo2sqQmENEZXM7eYuimocfHnKlcfZOuyzbA33LwUlOQ==}
|
||||||
peerDependencies:
|
peerDependencies:
|
||||||
'@nestjs/common': ^8.0.0 || ^9.0.0 || ^10.0.0
|
'@nestjs/common': ^10.0.0 || ^11.0.0
|
||||||
passport: ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0
|
passport: ^0.5.0 || ^0.6.0 || ^0.7.0
|
||||||
dependencies:
|
dependencies:
|
||||||
'@nestjs/common': 10.4.7(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1)
|
'@nestjs/common': 10.4.7(class-transformer@0.5.1)(class-validator@0.14.1)(reflect-metadata@0.2.2)(rxjs@7.8.1)
|
||||||
passport: 0.7.0
|
passport: 0.7.0
|
||||||
|
|||||||
Reference in New Issue
Block a user