notif cursor
This commit is contained in:
@@ -24,7 +24,7 @@ export class PaymentsController {
|
||||
constructor(
|
||||
private readonly paymentsService: PaymentsService,
|
||||
private readonly paymentMethodService: PaymentMethodService,
|
||||
) {}
|
||||
) { }
|
||||
|
||||
@UseGuards(AuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@@ -63,40 +63,8 @@ export class PaymentsController {
|
||||
verifyPayment(@Body() verifyPaymentDto: VerifyPaymentDto) {
|
||||
return this.paymentsService.verifyPayment(verifyPaymentDto.authority, verifyPaymentDto.orderId);
|
||||
}
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Get('admin/payments/:id')
|
||||
// @ApiOperation({ summary: 'Get a payment by ID' })
|
||||
// @ApiParam({ name: 'id', type: 'number', description: 'Payment ID' })
|
||||
// @ApiOkResponse({ description: 'Payment found' })
|
||||
// @ApiNotFoundResponse({ description: 'Payment not found' })
|
||||
// findOnePayment(@Param('id') id: string) {
|
||||
// return this.paymentsService.findById(+id);
|
||||
// }
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Patch('admin/payments/:id')
|
||||
// @ApiOperation({ summary: 'Update a payment' })
|
||||
// @ApiParam({ name: 'id', type: 'number', description: 'Payment ID' })
|
||||
// @ApiBody({ type: UpdatePaymentDto })
|
||||
// @ApiOkResponse({ description: 'Payment updated successfully' })
|
||||
// @ApiNotFoundResponse({ description: 'Payment not found' })
|
||||
// updatePayment(@Param('id') id: string, @Body() updatePaymentDto: UpdatePaymentDto) {
|
||||
// return this.paymentsService.update(+id, updatePaymentDto);
|
||||
// }
|
||||
|
||||
// @UseGuards(AdminAuthGuard)
|
||||
// @ApiBearerAuth()
|
||||
// @Delete('admin/payments/:id')
|
||||
// @ApiOperation({ summary: 'Delete a payment' })
|
||||
// @ApiParam({ name: 'id', type: 'number', description: 'Payment ID' })
|
||||
// @ApiOkResponse({ description: 'Payment deleted successfully' })
|
||||
// @ApiNotFoundResponse({ description: 'Payment not found' })
|
||||
// removePayment(@Param('id') id: string) {
|
||||
// return this.paymentsService.remove(+id);
|
||||
// }
|
||||
|
||||
/** payment methods */
|
||||
/** admin routes */
|
||||
@UseGuards(AdminAuthGuard)
|
||||
@ApiBearerAuth()
|
||||
@Get('admin/payments/methods')
|
||||
|
||||
@@ -7,9 +7,7 @@ import { Logger } from '@nestjs/common';
|
||||
import { GatewayManager } from '../gateways/gateway.manager';
|
||||
import { UserWallet } from 'src/modules/users/entities/user-wallet.entity';
|
||||
import { OrderPaymentContext } from '../interface/payment';
|
||||
import { InventoryService } from 'src/modules/inventory/inventory.service';
|
||||
import { OrderStatus } from 'src/modules/orders/interface/order.interface';
|
||||
import { PaymentMethod } from '../entities/payment-method.entity';
|
||||
|
||||
@Injectable()
|
||||
export class PaymentsService {
|
||||
@@ -18,7 +16,6 @@ export class PaymentsService {
|
||||
constructor(
|
||||
private readonly em: EntityManager,
|
||||
private readonly gatewayManager: GatewayManager,
|
||||
private readonly inventoryService: InventoryService,
|
||||
) {}
|
||||
|
||||
async payOrder(orderId: string): Promise<{ paymentUrl: string | null }> {
|
||||
|
||||
Reference in New Issue
Block a user