From 5cd0c1d9945460c709df8cce49e060edad0d2284 Mon Sep 17 00:00:00 2001 From: James ZHNAG Date: Thu, 17 Oct 2024 18:18:49 +0800 Subject: [PATCH] =?UTF-8?q?`=E5=95=86=E5=AE=B6=E8=BD=AC=E8=B4=A6=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E7=A1=AE=E8=AE=A4=E6=A8=A1=E5=BC=8F`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/swagger.yaml | 19 +++- .../mch-transfer/elecsign/out-bill-no.yaml | 37 ++++++ .../elecsign/out-bill-no/{out_bill_no}.yaml | 52 +++++++++ .../elecsign/transfer-bill-no.yaml | 37 ++++++ .../transfer-bill-no/{transfer_bill_no}.yaml | 52 +++++++++ .../fund-app/mch-transfer/transfer-bills.yaml | 107 ++++++++++++++++++ .../out-bill-no/{out_bill_no}.yaml | 78 +++++++++++++ .../out-bill-no/{out_bill_no}/cancel.yaml | 41 +++++++ .../transfer-bill-no/{transfer_bill_no}.yaml | 78 +++++++++++++ src/V3.php | 1 + src/V3/FundApp.php | 10 ++ src/V3/FundApp/MchTransfer.php | 11 ++ src/V3/FundApp/MchTransfer/Elecsign.php | 11 ++ .../MchTransfer/Elecsign/OutBillNo.php | 34 ++++++ .../Elecsign/OutBillNo/_out_bill_no_.php | 29 +++++ .../MchTransfer/Elecsign/TransferBillNo.php | 34 ++++++ .../TransferBillNo/_transfer_bill_no_.php | 29 +++++ src/V3/FundApp/MchTransfer/TransferBills.php | 65 +++++++++++ .../MchTransfer/TransferBills/OutBillNo.php | 10 ++ .../TransferBills/OutBillNo/_out_bill_no_.php | 30 +++++ .../OutBillNo/_out_bill_no_/Cancel.php | 29 +++++ .../TransferBills/TransferBillNo.php | 10 ++ .../TransferBillNo/_transfer_bill_no_.php | 29 +++++ 24 files changed, 833 insertions(+), 1 deletion(-) create mode 100644 docs/v3/fund-app/mch-transfer/elecsign/out-bill-no.yaml create mode 100644 docs/v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}.yaml create mode 100644 docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no.yaml create mode 100644 docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}.yaml create mode 100644 docs/v3/fund-app/mch-transfer/transfer-bills.yaml create mode 100644 docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}.yaml create mode 100644 docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel.yaml create mode 100644 docs/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}.yaml create mode 100644 src/V3/FundApp.php create mode 100644 src/V3/FundApp/MchTransfer.php create mode 100644 src/V3/FundApp/MchTransfer/Elecsign.php create mode 100644 src/V3/FundApp/MchTransfer/Elecsign/OutBillNo.php create mode 100644 src/V3/FundApp/MchTransfer/Elecsign/OutBillNo/_out_bill_no_.php create mode 100644 src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo.php create mode 100644 src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo/_transfer_bill_no_.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills/OutBillNo.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills/OutBillNo/_out_bill_no_.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills/OutBillNo/_out_bill_no_/Cancel.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills/TransferBillNo.php create mode 100644 src/V3/FundApp/MchTransfer/TransferBills/TransferBillNo/_transfer_bill_no_.php diff --git a/README.md b/README.md index f8c7f336..7f44d894 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ | 免密支付 | ✔️ | ✔️ | | 资金应用∙分账 | | ✔️ | | 资金应用∙转账 | ✔️ | | +| 资金应用∙转账∙用户确认模式 | ✔️ | | | 资金应用∙转账∙服务商模式 | | ✔️ | | 资金应用∙转账∙银行模式 | | ✔️ | | 收付通∙进件 | | ✔️ | diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 3eae6c76..d4cbe557 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -7,7 +7,7 @@ info: 整理自[官方文档中心](https://pay.weixin.qq.com/wiki/doc/apiv3/index.shtml) 本[项目/工具地址](https://github.com/TheNorthMemory/wechatpay-openapi) **访问第一次加载比较慢,请耐心等待大约1-2分钟不等(小文件下载比较多)。** - version: 0.15.36 + version: 0.15.37 schemes: - https consumes: @@ -24,6 +24,7 @@ tags: - name: 免密支付 - name: 资金应用∙分账 - name: 资金应用∙转账 + - name: 资金应用∙转账∙用户确认模式 - name: 资金应用∙转账∙服务商模式 - name: 资金应用∙转账∙银行模式 - name: 收付通∙进件 @@ -667,6 +668,22 @@ paths: $ref: ./v3/express/users/{openid}/transform.yaml /v3/facemch/users/{face_sid}: $ref: ./v3/facemch/users/{face_sid}.yaml + /v3/fund-app/mch-transfer/elecsign/out-bill-no: + $ref: ./v3/fund-app/mch-transfer/elecsign/out-bill-no.yaml + /v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}: + $ref: ./v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}.yaml + /v3/fund-app/mch-transfer/elecsign/transfer-bill-no: + $ref: ./v3/fund-app/mch-transfer/elecsign/transfer-bill-no.yaml + /v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}: + $ref: ./v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}.yaml + /v3/fund-app/mch-transfer/transfer-bills: + $ref: ./v3/fund-app/mch-transfer/transfer-bills.yaml + /v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}: + $ref: ./v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}.yaml + /v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel: + $ref: ./v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel.yaml + /v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}: + $ref: ./v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}.yaml /v3/funds-to-oversea/bill-download-url: $ref: ./v3/funds-to-oversea/bill-download-url.yaml /v3/funds-to-oversea/orders: diff --git a/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no.yaml b/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no.yaml new file mode 100644 index 00000000..65a88d89 --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no.yaml @@ -0,0 +1,37 @@ +post: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 商户单号申请电子回单 + description: 商户可以 指定商户转账单号通过该接口申请 商家转账用户确认模式转账单据 对应的电子回单。微信支付会在校验满足回单申请条件后受理回单的申请,商户后续可以通过电子回单查询接口查询回单处理进度。[官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-out-no.html) + parameters: + - name: _ + in: body + required: true + schema: + type: object + required: + - out_bill_no + properties: + out_bill_no: + type: string + description: 商户转账单号 + example: plfk2020042013 + responses: + '200': + schema: + type: object + required: + - state + - create_time + properties: + state: + type: string + description: 申请单状态 + example: GENERATING + create_time: + type: string + description: 申请单创建时间 + example: '2015-05-20T13:29:35.120+08:00' diff --git a/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}.yaml b/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}.yaml new file mode 100644 index 00000000..9497c47f --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/elecsign/out-bill-no/{out_bill_no}.yaml @@ -0,0 +1,52 @@ +get: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 商户单号查询电子回单 + description: 商户可以通过该接口查看回单申请进度;请务必对比下载的回单文件的摘要值与查询接口返回的摘要值的一致性,确保得到的回单文件的真实性和完整性。下载地址的有效期为10分钟,超过10分钟后需要重新通过该接口获取下载地址(不需要重新申请)。[官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-out-no.html) + parameters: + - name: out_bill_no + in: path + required: true + type: string + description: 商户转账单号 + example: plfk2020042013 + responses: + '200': + schema: + type: object + required: + - state + - create_time + - update_time + properties: + state: + type: string + description: 申请单状态 + example: GENERATING + create_time: + type: string + description: 申请单创建时间 + example: '2015-05-20T13:29:35.120+08:00' + update_time: + type: string + description: 申请单更新时间 + example: '2015-05-20T13:29:35.120+08:00' + hash_type: + type: string + description: 回单文件摘要类型 + example: SHA256 + hash_value: + type: string + description: 回单文件摘要值 + example: DE731F35146A0BEFADE5DB9D1E468D96C01CA8898119C674FEE9F11F4DBE5529 + download_url: + type: string + description: 回单文件下载地址 + example: https://api.mch.weixin.qq.com/v3/transferbilldownload/file?token=xxx + fail_reason: + type: string + description: 失败原因 + example: 转账单据不存在 diff --git a/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no.yaml b/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no.yaml new file mode 100644 index 00000000..5cf2a27b --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no.yaml @@ -0,0 +1,37 @@ +post: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 微信单号申请电子回单 + description: 商户可以 指定微信转账单号通过该接口申请 **商家转账用户确认模式转账单据** 对应的电子回单。微信支付会在校验满足回单申请条件后受理回单的申请,商户后续可以通过电子回单查询接口查询回单处理进度。[官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-no.html) + parameters: + - name: _ + in: body + required: true + schema: + type: object + required: + - transfer_bill_no + properties: + transfer_bill_no: + type: string + description: 微信转账单号 + example: '1330000071100999991182020050700019480001' + responses: + '200': + schema: + type: object + required: + - state + - create_time + properties: + state: + type: string + description: 申请单状态 + example: GENERATING + create_time: + type: string + description: 申请单创建时间 + example: '2015-05-20T13:29:35.120+08:00' diff --git a/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}.yaml b/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}.yaml new file mode 100644 index 00000000..3a36e71a --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/elecsign/transfer-bill-no/{transfer_bill_no}.yaml @@ -0,0 +1,52 @@ +get: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 微信单号查询电子回单 + description: 商户可以通过该接口查看回单申请进度;请务必对比下载的回单文件的摘要值与查询接口返回的摘要值的一致性,确保得到的回单文件的真实性和完整性。下载地址的有效期为10分钟,超过10分钟后需要重新通过该接口获取下载地址(不需要重新申请)。[官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-no.html) + parameters: + - name: transfer_bill_no + in: path + required: true + type: string + description: 微信转账单号 + example: '1330000071100999991182020050700019480001' + responses: + '200': + schema: + type: object + required: + - state + - create_time + - update_time + properties: + state: + type: string + description: 申请单状态 + example: GENERATING + create_time: + type: string + description: 申请单创建时间 + example: '2015-05-20T13:29:35.120+08:00' + update_time: + type: string + description: 申请单更新时间 + example: '2015-05-20T13:29:35.120+08:00' + hash_type: + type: string + description: 回单文件摘要类型 + example: SHA256 + hash_value: + type: string + description: 回单文件摘要值 + example: DE731F35146A0BEFADE5DB9D1E468D96C01CA8898119C674FEE9F11F4DBE5529 + download_url: + type: string + description: 回单文件下载地址 + example: https://api.mch.weixin.qq.com/v3/transferbilldownload/file?token=xxx + fail_reason: + type: string + description: 失败原因 + example: 转账单据不存在 diff --git a/docs/v3/fund-app/mch-transfer/transfer-bills.yaml b/docs/v3/fund-app/mch-transfer/transfer-bills.yaml new file mode 100644 index 00000000..b5de5be7 --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/transfer-bills.yaml @@ -0,0 +1,107 @@ +post: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 发起转账 + description: 商家转账用户确认模式下,用户申请收款时,商户可通过此接口申请创建转账单 [官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/transfer-to-user.html) + parameters: + - $ref: '../../../definitions/Parameters.yaml#/WECHATPAY_CERTIFICATE_SERIAL' + - name: _ + in: body + required: true + schema: + type: object + required: + - appid + - out_bill_no + - transfer_scene_id + - openid + - transfer_amount + - transfer_remark + properties: + appid: + type: string + description: 商户AppID + example: wxf636efh567hg4356 + out_bill_no: + type: string + description: 商户单号 + example: plfk2020042013 + transfer_scene_id: + type: string + description: 转账场景ID + example: '1000' + openid: + type: string + description: 收款用户OpenID + example: o-MYE42l80oelYMDE34nYD456Xoy + user_name: + type: string + description: 收款用户姓名 + example: 757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45 + transfer_amount: + type: number + description: 转账金额 + example: 400000 + transfer_remark: + type: string + description: 转账备注 + example: 2020年4月报销 + notify_url: + type: string + description: 通知地址 + example: https://www.weixin.qq.com/wxpay/pay.php + user_recv_perception: + type: string + description: 用户收款感知 + example: 现金奖励 + transfer_scene_report_infos: + type: array + description: 转账场景报备信息 + items: + type: object + properties: + info_type: + type: string + description: 信息类型 + example: 活动名称 + info_content: + type: string + description: 信息内容 + example: 注册会员有礼 + responses: + '200': + schema: + type: object + required: + - out_bill_no + - transfer_bill_no + - create_time + - state + properties: + out_bill_no: + type: string + description: 商户单号 + example: plfk2020042013 + transfer_bill_no: + type: string + description: 微信转账单号 + example: '1330000071100999991182020050700019480001' + create_time: + type: string + description: 单据创建时间 + example: '2015-05-20T13:29:35.120+08:00' + state: + type: string + description: 单据状态 + example: ACCEPTED + fail_reason: + type: string + description: 失败原因 + example: PAYEE_ACCOUNT_ABNORMAL + package_info: + type: string + description: 跳转领取页面的package信息 + example: affffddafdfafddffda== diff --git a/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}.yaml b/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}.yaml new file mode 100644 index 00000000..1fab9214 --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}.yaml @@ -0,0 +1,78 @@ +get: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 商户单号查询转账单 + description: 商家转账用户确认模式下,根据商户单号查询转账单的详细信息 [官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-out-no.html) + parameters: + - name: out_bill_no + in: path + required: true + type: string + description: 商户单号 + example: plfk2020042013 + responses: + '200': + schema: + type: object + required: + - mch_id + - out_bill_no + - transfer_bill_no + - appid + - state + - transfer_amount + - transfer_remark + - create_time + - update_time + properties: + mch_id: + type: string + description: 商户号 + example: '1900001109' + out_bill_no: + type: string + description: 商户单号 + example: plfk2020042013 + transfer_bill_no: + type: string + description: 商家转账订单号 + example: '1330000071100999991182020050700019480001' + appid: + type: string + description: 商户AppID + example: wxf636efh567hg4356 + state: + type: string + description: 单据状态 + example: ACCEPTED + transfer_amount: + type: number + description: 转账金额 + example: 400000 + transfer_remark: + type: string + description: 转账备注 + example: 2020年4月报销 + fail_reason: + type: string + description: 失败原因 + example: PAYEE_ACCOUNT_ABNORMAL + openid: + type: string + description: 收款用户OpenID + example: o-MYE42l80oelYMDE34nYD456Xoy + user_name: + type: string + description: 收款用户姓名 + example: 757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45 + create_time: + type: string + description: 单据创建时间 + example: '2015-05-20T13:29:35.120+08:00' + update_time: + type: string + description: 最后一次状态变更时间 + example: '2015-05-20T13:29:35.120+08:00' diff --git a/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel.yaml b/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel.yaml new file mode 100644 index 00000000..3af306f6 --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/transfer-bills/out-bill-no/{out_bill_no}/cancel.yaml @@ -0,0 +1,41 @@ +post: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 撤销转账 + description: 商户通过转账接口发起付款后,在用户确认收款之前可以通过该接口撤销付款。该接口返回成功仅表示撤销请求已受理,系统会异步处理退款等操作,以最终查询单据返回状态为准。 [官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/cancel-transfer.html) + parameters: + - name: out_bill_no + in: path + required: true + type: string + description: 商户单号 + example: plfk2020042013 + responses: + '200': + schema: + type: object + required: + - out_bill_no + - transfer_bill_no + - state + - update_time + properties: + out_bill_no: + type: string + description: 商户单号 + example: plfk2020042013 + transfer_bill_no: + type: string + description: 微信转账单号 + example: '1330000071100999991182020050700019480001' + state: + type: string + description: 单据状态 + example: CANCELING + update_time: + type: string + description: 最后一次单据状态变更时间 + example: '2015-05-20T13:29:35.120+08:00' diff --git a/docs/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}.yaml b/docs/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}.yaml new file mode 100644 index 00000000..d5d4aad9 --- /dev/null +++ b/docs/v3/fund-app/mch-transfer/transfer-bills/transfer-bill-no/{transfer_bill_no}.yaml @@ -0,0 +1,78 @@ +get: + x-last-updated-at: 2024.10.14 + x-role: + - 普通商户 + tags: + - 资金应用∙转账∙用户确认模式 + summary: 微信转账单号查询转账单 + description: 商家转账用户确认模式下,根据微信转账单号查询转账单的详细信息 [官方文档](https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-no.html) + parameters: + - name: transfer_bill_no + in: path + required: true + type: string + description: 微信转账单号 + example: '1330000071100999991182020050700019480001' + responses: + '200': + schema: + type: object + required: + - mch_id + - out_bill_no + - transfer_bill_no + - appid + - state + - transfer_amount + - transfer_remark + - create_time + - update_time + properties: + mch_id: + type: string + description: 商户号 + example: '1900001109' + out_bill_no: + type: string + description: 商户单号 + example: plfk2020042013 + transfer_bill_no: + type: string + description: 商家转账订单号 + example: '1330000071100999991182020050700019480001' + appid: + type: string + description: 商户AppID + example: wxf636efh567hg4356 + state: + type: string + description: 单据状态 + example: ACCEPTED + transfer_amount: + type: number + description: 转账金额 + example: 400000 + transfer_remark: + type: string + description: 转账备注 + example: 2020年4月报销 + fail_reason: + type: string + description: 失败原因 + example: PAYEE_ACCOUNT_ABNORMAL + openid: + type: string + description: 收款用户OpenID + example: o-MYE42l80oelYMDE34nYD456Xoy + user_name: + type: string + description: 收款用户姓名 + example: 757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45 + create_time: + type: string + description: 单据创建时间 + example: '2015-05-20T13:29:35.120+08:00' + update_time: + type: string + description: 最后一次状态变更时间 + example: '2015-05-20T13:29:35.120+08:00' diff --git a/src/V3.php b/src/V3.php index 2b51344d..0e7d8a15 100644 --- a/src/V3.php +++ b/src/V3.php @@ -48,6 +48,7 @@ * @property-read V3\Goldplan $goldplan * @property-read V3\Global_ $global * @property-read V3\FundsToOversea $fundsToOversea + * @property-read V3\FundApp $fundApp * @property-read V3\Facemch $facemch * @property-read V3\Express $express * @property-read V3\Eduschoolpay $eduschoolpay diff --git a/src/V3/FundApp.php b/src/V3/FundApp.php new file mode 100644 index 00000000..0b6fa4fe --- /dev/null +++ b/src/V3/FundApp.php @@ -0,0 +1,10 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-out-no.html + */ + public function post(array $options = [ + 'json' => [ + 'out_bill_no' => 'plfk2020042013', + ], + ]): ResponseInterface; + + /** + * 商户单号申请电子回单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-out-no.html#async + */ + public function postAsync(array $options = [ + 'json' => [ + 'out_bill_no' => 'plfk2020042013', + ], + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/Elecsign/OutBillNo/_out_bill_no_.php b/src/V3/FundApp/MchTransfer/Elecsign/OutBillNo/_out_bill_no_.php new file mode 100644 index 00000000..b58e1fd8 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/Elecsign/OutBillNo/_out_bill_no_.php @@ -0,0 +1,29 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-out-no.html + */ + public function get(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): ResponseInterface; + + /** + * 商户单号查询电子回单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-out-no.html#async + */ + public function getAsync(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo.php b/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo.php new file mode 100644 index 00000000..4888af68 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo.php @@ -0,0 +1,34 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-no.html + */ + public function post(array $options = [ + 'json' => [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ], + ]): ResponseInterface; + + /** + * 微信单号申请电子回单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/accept-elecsign-by-no.html#async + */ + public function postAsync(array $options = [ + 'json' => [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ], + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo/_transfer_bill_no_.php b/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo/_transfer_bill_no_.php new file mode 100644 index 00000000..d8e75a36 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/Elecsign/TransferBillNo/_transfer_bill_no_.php @@ -0,0 +1,29 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-no.html + */ + public function get(array $options = [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ]): ResponseInterface; + + /** + * 微信单号查询电子回单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/elecsign/query-elecsign-by-no.html#async + */ + public function getAsync(array $options = [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/TransferBills.php b/src/V3/FundApp/MchTransfer/TransferBills.php new file mode 100644 index 00000000..5572e3f4 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/TransferBills.php @@ -0,0 +1,65 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/transfer-to-user.html + */ + public function post(array $options = [ + 'json' => [ + 'appid' => 'wxf636efh567hg4356', + 'out_bill_no' => 'plfk2020042013', + 'transfer_scene_id' => '1000', + 'openid' => 'o-MYE42l80oelYMDE34nYD456Xoy', + 'user_name' => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45', + 'transfer_amount' => 400000, + 'transfer_remark' => '2020年4月报销', + 'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php', + 'user_recv_perception' => '现金奖励', + 'transfer_scene_report_infos' => [[ + 'info_type' => '活动名称', + 'info_content' => '注册会员有礼', + ],], + ], + 'headers' => [ + 'Wechatpay-Serial' => '', + ], + ]): ResponseInterface; + + /** + * 发起转账(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/transfer-to-user.html#async + */ + public function postAsync(array $options = [ + 'json' => [ + 'appid' => 'wxf636efh567hg4356', + 'out_bill_no' => 'plfk2020042013', + 'transfer_scene_id' => '1000', + 'openid' => 'o-MYE42l80oelYMDE34nYD456Xoy', + 'user_name' => '757b340b45ebef5467rter35gf464344v3542sdf4t6re4tb4f54ty45t4yyry45', + 'transfer_amount' => 400000, + 'transfer_remark' => '2020年4月报销', + 'notify_url' => 'https://www.weixin.qq.com/wxpay/pay.php', + 'user_recv_perception' => '现金奖励', + 'transfer_scene_report_infos' => [[ + 'info_type' => '活动名称', + 'info_content' => '注册会员有礼', + ],], + ], + 'headers' => [ + 'Wechatpay-Serial' => '', + ], + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo.php b/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo.php new file mode 100644 index 00000000..63523726 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo.php @@ -0,0 +1,10 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-out-no.html + */ + public function get(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): ResponseInterface; + + /** + * 商户单号查询转账单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-out-no.html#async + */ + public function getAsync(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo/_out_bill_no_/Cancel.php b/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo/_out_bill_no_/Cancel.php new file mode 100644 index 00000000..96ff512e --- /dev/null +++ b/src/V3/FundApp/MchTransfer/TransferBills/OutBillNo/_out_bill_no_/Cancel.php @@ -0,0 +1,29 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/cancel-transfer.html + */ + public function post(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): ResponseInterface; + + /** + * 撤销转账(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/cancel-transfer.html#async + */ + public function postAsync(array $options = [ + 'out_bill_no' => 'plfk2020042013', + ]): PromiseInterface; +} diff --git a/src/V3/FundApp/MchTransfer/TransferBills/TransferBillNo.php b/src/V3/FundApp/MchTransfer/TransferBills/TransferBillNo.php new file mode 100644 index 00000000..59b3eb37 --- /dev/null +++ b/src/V3/FundApp/MchTransfer/TransferBills/TransferBillNo.php @@ -0,0 +1,10 @@ + $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-no.html + */ + public function get(array $options = [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ]): ResponseInterface; + + /** + * 微信转账单号查询转账单(异步模式) + * @param array $options + * @link https://pay.weixin.qq.com/docs/merchant/apis/mch-trans/transfer-bill/get-transfer-bill-by-no.html#async + */ + public function getAsync(array $options = [ + 'transfer_bill_no' => '1330000071100999991182020050700019480001', + ]): PromiseInterface; +}