Skip to content

closeOrder

关闭订单

使用示例

ts
import type { Order } from 'nest-wxpay'
import { WechatService } from 'nest-wxpay'
import { Injectable, Param, Delete } from '@nestjs/common'

@Injectable()
export class Controller {
  constructor(private readonly wechatService: WechatService) {}

  @Delete('order/:id')
  async order(@Param('id') id: string): Promise<Order> {
    return this.wechatService.closeOrder(id)
  }
}

参数解析

id

商户订单号