npm package: @iot9x.com/nestjs-pay
Description: NestJS 支付插件
Author: Iric
Latest version: 0.0.14

# NestJS 支付插件

注意：<font color="#dd0000">仍在开发中，目前仅在内部使用</font><br />

[文档地址](https://docs.iot9x.com/docs/nestjs/%E6%94%AF%E4%BB%98/)

## 使用说明

1. 外部人员仅供参考，请不要用于生产环境，因此导致的事故后果请自行承担。
2. 支持 **普通微信支付**、**微信服务商支付**、**支付宝支付** 

### 支持环境

| 环境   | v0.x     | 
| ------ | -------- | 
| **NodeJS** | >= `20.x` | 
| **NestJS** | >= `10.x` | 

### 安装

```shell
$ npm i @iot9x.com/nestjs-pay

or
$ yarn add @iot9x.com/nestjs-pay

or
$ pnpm add @iot9x.com/nestjs-pay  # 推荐使用pnpm
```

### 使用

详见文档：[NestJS 系列——支付](https://docs.iot9x.com/docs/nestjs/%E6%94%AF%E4%BB%98/)

## RoadMap

* **微信服务商支付** 
  + JSAPI 支付
    - [x] [JSAPI 下单](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter4_1_1.shtml)
    - [ ] [查询订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_2.shtml)
    - [ ] [关闭订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_3.shtml)
    - [ ] [支付通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_5.shtml)
    - [ ] [申请退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_9.shtml)
    - [ ] [查询单笔退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_10.shtml)
    - [ ] [退款结果通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_11.shtml)
    - [ ] [申请交易账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_6.shtml)
    - [ ] [申请资金账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_7.shtml)
    - [ ] [下载账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_8.shtml)
  + 小程序支付
    - [x] [小程序下单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/partner-mini-prepay.html)
    - [x] [支付通知](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/payment-notice.html)
    - [x] [关闭订单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/close-order.html)
    - [x] [微信支付订单号查询订单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/query-by-wx-trade-no.html)
    - [x] [商户订单号查询订单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/query-by-out-trade-no.html)
    - [ ] [退款申请](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/create.html)
    - [ ] [查询单笔退款（通过商户退款单号）](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/query-by-out-refund-no.html)
    - [ ] [退款结果通知](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/refund-result-notice.html)
    - [ ] [申请交易账单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/get-trade-bill.html)
    - [ ] [申请资金账单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/get-fund-bill.html)
    - [ ] [申请单个子商户资金账单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/get-sub-mch-fund-flow-bill.html)
    - [ ] [下载账单](https://pay.weixin.qq.com/docs/partner/apis/partner-mini-program-payment/download-bill.html)
  + APP 支付
    - [ ] [APP 下单](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_1.shtml)
    - [ ] [查询订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_2.shtml)
    - [ ] [关闭订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_3.shtml)
    - [ ] [支付通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_5.shtml)
    - [ ] [申请退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_9.shtml)
    - [ ] [查询单笔退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_10.shtml)
    - [ ] [退款结果通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_11.shtml)
    - [ ] [申请交易账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_6.shtml)
    - [ ] [申请资金账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_7.shtml)
    - [ ] [下载账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_8.shtml)
  + H5 支付
    - [ ] [H5 下单](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_1.shtml)
    - [ ] [查询订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_2.shtml)
    - [ ] [关闭订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_3.shtml)
    - [ ] [支付通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_5.shtml)
    - [ ] [申请退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_9.shtml)
    - [ ] [查询单笔退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_10.shtml)
    - [ ] [退款结果通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_11.shtml)
    - [ ] [申请交易账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_6.shtml)
    - [ ] [申请资金账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_7.shtml)
    - [ ] [下载账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_8.shtml)
  + Native 支付
    - [ ] [Native 下单](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_1.shtml)
    - [ ] [查询订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_2.shtml)
    - [ ] [关闭订单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_3.shtml)
    - [ ] [支付通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_5.shtml)
    - [ ] [申请退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_9.shtml)
    - [ ] [查询单笔退款 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_10.shtml)
    - [ ] [退款结果通知 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_11.shtml)
    - [ ] [申请交易账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_6.shtml)
    - [ ] [申请资金账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_7.shtml)
    - [ ] [下载账单 API](https://pay.weixin.qq.com/wiki/doc/apiv3_partner/apis/chapter3_5_8.shtml)
* 普通微信支付
* 支付宝支付