import { Injectable } from '@nestjs/common' ; import { WeChatMicroPayOrderReqParam , WeChatMicroPayOrderRes , WeChatMicroPayReverseOrderReqParam , WeChatMicroPayReverseOrderRes } from '../interfaces/order.interface' ; import { WeChatPayBaseService } from './base.service' ; /**
 * 微信支付-付款码支付类
 */ @ Injectable ( ) export class WeChatMicroPayService extends WeChatPayBaseService { /**
     * 付款码支付
     */ async pay ( params ) { const url = `${ this . apiBase }/pay/micropay` ; return await this . requestUtil . post < WeChatMicroPayOrderRes > ( url , params ) ; } param params async closeOrder ( params ) { const url = `${ this . apiBase }/pay/reverse` ; return await this . requestUtil . post < WeChatMicroPayReverseOrderRes > ( url , params , { httpsAgent : this . certificateAgent } ) ; } }