Skip to content

Commit

Permalink
chore: enable momo payment 1
Browse files Browse the repository at this point in the history
  • Loading branch information
MinhhTien committed Jul 6, 2024
1 parent 1554d97 commit 8a5b165
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/order/dto/order.dto.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
import { DataResponse, PaginateResponse } from '@src/common/contracts/openapi-builder'
import { ArrayMinSize, IsMongoId, IsNotEmpty, MaxLength, MinLength, ValidateNested } from 'class-validator'
import { ArrayMinSize, IsEnum, IsMongoId, IsNotEmpty, MaxLength, MinLength, ValidateNested } from 'class-validator'
import { CustomerOrderDto, OrderHistoryDto, OrderItemDto } from '@order/schemas/order.schema'
import { Prop } from '@nestjs/mongoose'
import { Types } from 'mongoose'
Expand Down Expand Up @@ -37,8 +37,8 @@ export class CreateOrderDto {
items: CreateOrderItemDto[]

@ApiProperty({ enum: PaymentMethod })
// @IsNotEmpty()
// @IsEnum(PaymentMethod)
@IsNotEmpty()
@IsEnum(PaymentMethod)
paymentMethod?: PaymentMethod

@ApiPropertyOptional()
Expand Down
3 changes: 2 additions & 1 deletion src/order/services/order.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,8 @@ export class OrderService {
orderInfo: `Furnique - Thanh toán đơn hàng #${orderCode}`,
redirectUrl: `${this.configService.get('WEB_URL')}/customer/orders`,
ipnUrl: `${this.configService.get('SERVER_URL')}/payment/webhook/momo`,
requestType: 'payWithMethod',
// requestType: 'payWithMethod',
requestType: 'captureWallet',
amount: totalAmount,
orderId: orderCode.toString(),
requestId: orderCode.toString(),
Expand Down

0 comments on commit 8a5b165

Please sign in to comment.