Files
soul-yongping/开发文档/8、部署/订阅消息.md
2026-03-07 22:58:43 +08:00

44 lines
1.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 提现订阅消息PowerWeChat
> 来源soul-api/订阅消息.md。提现成功后向用户发送订阅消息。已整理至开发文档。
---
## 数据结构示例
```go
data := &power.HashMap{
"phrase4": power.StringMap{
"value": "提现成功", // 提现结果:提现成功、提现失败
},
"amount5": power.StringMap{
"value": "¥8.6", // 提现金额
},
"thing8": power.StringMap{
"value": "微信打款成功,请点击查收", // 备注,打款失败则提示请联系官方客服
},
}
MiniProgramApp.SubscribeMessage.Send(ctx, &request.RequestSubscribeMessageSend{
ToUser: "OPENID", // 根据订单号联表查询,提现表 user_id 即 openid
TemplateID: "u3MbZGPRkrZIk-I7QdpwzFxnO_CeQPaCWF2FkiIablE",
Page: "/pages/my/my",
// developer=开发版trial=体验版formal=正式版
// 开发环境 souldev.quwanzhi.com正式环境 soulapi.quwanzhi.com
MiniProgramState: "formal",
Lang: "zh_CN",
Data: data,
})
```
## 回调示例(转账结果)
```json
{
"create_time": "2026-02-10T18:02:54+08:00",
"out_bill_no": "WD1770691555206100",
"package_info": "ABBQO+oYAAABAAAAAAAk+...",
"state": "WAIT_USER_CONFIRM",
"transfer_bill_no": "1330000114850082602100071440076263"
}
```