mirror of
https://github.com/ttttupup/wxhelper.git
synced 2024-11-05 18:09:24 +08:00
新增确认收款 close #12
This commit is contained in:
parent
ebde430aec
commit
e7a460ad25
45
README.md
45
README.md
@ -91,7 +91,10 @@ vcpkg
|
||||
|
||||
2023-02-01 : 新增拍一拍(仅支持3.8.1.26)。
|
||||
|
||||
2023-02-04 : 新增群消息置顶和取消置顶。
|
||||
2023-02-04 : 新增群消息置顶和取消置顶。
|
||||
|
||||
2023-02-04 : 新增确认收款。
|
||||
|
||||
#### 功能预览:
|
||||
0.检查是否登录
|
||||
1.获取登录微信信息
|
||||
@ -111,6 +114,7 @@ vcpkg
|
||||
34.查询数据库
|
||||
40.转发消息
|
||||
44.退出登录
|
||||
45.确认收款
|
||||
46.联系人列表
|
||||
47.获取群详情
|
||||
48.获取解密图片
|
||||
@ -822,6 +826,45 @@ vcpkg
|
||||
```
|
||||
|
||||
|
||||
#### 45.确认收款**
|
||||
###### 接口功能
|
||||
> 收到转账消息后,自动收款确认。type=49 即是转账消息。
|
||||
|
||||
###### 接口地址
|
||||
> [/api/?type=45](/api/?type=45)
|
||||
|
||||
###### HTTP请求方式
|
||||
> POST JSON
|
||||
|
||||
###### 请求参数
|
||||
|参数|必选|类型|说明|
|
||||
|---|---|---|---|
|
||||
|wxid|string|转账人微信id,从hook的消息中获取|
|
||||
|transcationId|string|从hook的消息中获取对应的字段内容。|
|
||||
|transferId|string|从hook的消息中获取对应的字段内容。|
|
||||
|
||||
###### 返回字段
|
||||
|返回字段|字段类型|说明 |
|
||||
|---|---|---|
|
||||
|code|int|返回状态,1成功|
|
||||
|result|string|成功提示|
|
||||
|
||||
|
||||
|
||||
|
||||
###### 接口示例
|
||||
入参:
|
||||
``` javascript
|
||||
{
|
||||
"wxid":"wxid_agz5q76f11112",
|
||||
"transcationId":"10000500012302060002831233124719620",
|
||||
"transferId":"10000500012023020619112332136412"
|
||||
}
|
||||
```
|
||||
响应:
|
||||
``` javascript
|
||||
{"code":1,"result":"OK"}
|
||||
```
|
||||
|
||||
#### 46.联系人列表**
|
||||
###### 接口功能
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "hook_img.h"
|
||||
#include "ocr.h"
|
||||
#include "pat.h"
|
||||
#include "confirm_receipt.h"
|
||||
|
||||
#pragma comment(lib, "ws2_32.lib")
|
||||
using namespace std;
|
||||
@ -478,6 +479,12 @@ void api_handle(mg_http_message *hm, struct mg_connection *c, string &ret) {
|
||||
break;
|
||||
}
|
||||
case WECHAT_GET_TRANSFER: {
|
||||
wstring wxid = get_http_req_param(hm, j_param, "wxid", is_post);
|
||||
wstring transcationid = get_http_req_param(hm, j_param, "transcationId", is_post);
|
||||
wstring transferid = get_http_req_param(hm, j_param, "transferId", is_post);
|
||||
BOOL response = DoConfirmReceipt(WS2LW(wxid), WS2LW(transcationid), WS2LW(transferid));
|
||||
json ret_data = {{"msg", response}, {"result", "OK"}};
|
||||
ret = ret_data.dump();
|
||||
break;
|
||||
}
|
||||
case WECHAT_GET_CONTACT_ALL: {
|
||||
|
Loading…
Reference in New Issue
Block a user