finish payment strategies

This commit is contained in:
2024-11-03 22:09:59 +07:00
parent 6b7430c5cf
commit 0f68b51d75
3 changed files with 157 additions and 58 deletions

View File

@@ -10,6 +10,7 @@ import {
} from '@nestjs/common'
import { PayosService } from './payos.service'
import { ApiTags, ApiOperation } from '@nestjs/swagger'
import { WebhookType } from '@payos/node/lib/type'
@ApiTags('Payos')
@Controller('payos')
@@ -19,11 +20,8 @@ export class PayosController {
// webhook
@Post('webhook')
@ApiOperation({ summary: 'Webhook for Payos' })
async webhook(
@Body() body: any,
@Headers('x-payos-signature') signature: string,
) {
return this.payosService.webhook(body, signature)
async webhook(@Body() body: WebhookType) {
return this.payosService.webhook(body)
}
// ping webhook