当前位置:网站首页>Applet payment management - new payment docking process
Applet payment management - new payment docking process
2022-07-27 07:39:00 【Tianma 3798】
- Background
- At present, it is the grayscale test stage , A few small programs need 【 Payment management 】 Mode docking ; Most don't need
- 【 Payment management 】 The way is the same as the video number 【 Custom payment components 】 The docking process is similar ; Use in a similar way .
Official docking instructions :
Introduction to applet payment management service | Wechat open documents

- Docking process
One 、 Registered merchant number

Two 、 Unified order , The client calls up the payment
call wx.requestOrderPayment front , It needs to be on the wechat public platform - function - Payment management entry or call Incoming interface Apply for the merchant number .
3、 ... and 、 Configure message push , Receive payment result notification 、 Order refund notice, etc

In particular :
Notice of news Receiving messages requires decryption
Respond to wechat server , It needs to be encrypted
Special instructions for parameter verification :
Request parameters : The content of the request message is an empty string
Response parameter : Please return as is echostr Parameter contents , Then access becomes effective , Success as a developer , Otherwise, access fails

- Message implementation docking instructions
Official documents :
Message push | Wechat open documents
Encryption and decryption instructions , And there is source code Demo
summary | Wechat open documents
public IActionResult Callback()
{
try
{
using (StreamReader sr = new StreamReader(Request.Body, Encoding.UTF8))
{
//LogHelper.Info(" Accept event callback processing ");
string content = sr.ReadToEndAsync().Result;// Verify the content siege sent by the request
LogHelper.Info(content);
// Decryption processing
EventManage.ReqData reqData = new EventManage.ReqData();
reqData.signature = Request.Query["signature"];
reqData.timestamp = Request.Query["timestamp"];
reqData.nonce = Request.Query["nonce"];
reqData.echostr = Request.Query["echostr"];
EventManage _event = new EventManage();
_event.reqData = reqData;
var eventOrder = _event.LoadData(content);
if (string.IsNullOrEmpty(reqData.postdata))
return Content(reqData.echostr);
LogHelper.Info(" Processed order number :"+eventOrder.Order_Info.Trade_No);
// Logical processing , Modify order status , Recharge to the account , Award processing
RechargeRecordOperate _rechange = new RechargeRecordOperate();
_rechange.CallBack(eventOrder.Order_Info.Trade_No);
// Send official account notice
return Json(_event.Success());
}
}
catch (Exception ex)
{
LogHelper.Debug(" Applet message callback , Report errors :", ex);
return Error(ex);
}
}
more :
Wechat applet saves video to photo album wx.saveVideoToPhotosAlbum()
wx.scanCode(Object object) The use of,
The use of wechat applet recording interface -RecorderManager
边栏推荐
- 帮忙发一份招聘,base全国,有兴趣的可以过来看看
- Flink1.14 SQL basic syntax (I) detailed explanation of Flink SQL table query
- RestTemplate 连接池配置
- yhb_ sysbench
- glGetUniformLocation,glUniform4f
- STM32_ Find the cause of entering hardfault_ Handler's function
- 次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
- Solidity智能合约开发 — 3.3-solidity语法控制结构
- 用户解锁SM04 SM12
- What are the main threads of Youxuan database?
猜你喜欢

Mysql: increase the maximum number of connections

Top ten interview questions for software testing (with answers and analysis)

Zabbix: map collected values to readable statements

JS regular expression implementation adds a comma to every three digits

Tcp/ip protocol analysis (tcp/ip three handshakes & four waves + OSI & TCP / IP model)

(2022杭电多校三)1011.Taxi(曼哈顿最值+二分)

Clickhouse notes 1 | introduction, features | installation and use based on centos7 system | common data types | mergetree table engine | SQL operation

Temperature and humidity measurement and display device based on Arduino

Okaleido生态核心权益OKA,尽在聚变Mining模式

ClickHouse 笔记1 | 简介、特点 | 基于CentOS7系统的安装与使用 | 常用数据类型 | MergeTree 表引擎 | SQL操作
随机推荐
IO中节点流和处理流的理解学习
UUID and secrets module
sql语句批量更新 时间减去1天
单元测试系统化讲解之Mockito
C language programming | program compilation and preprocessing
Array method and loop in JS
RPC 远程过程调用
Cadence (XI) silk screen printing adjustment and subsequent matters
Oracle composite query
帮忙发一份招聘,base全国,有兴趣的可以过来看看
一体化实时HTAP数据库StoneDB,如何替换MySQL并实现近百倍分析性能的提升
Record a pit dug by yourself~
The error of QT connecting SQLite database and its modification
(2022杭电多校三)1011.Taxi(曼哈顿最值+二分)
UUID与secrets模块
Actual combat of flutter - Request encapsulation (I)
Use Popen to execute a command and get the return result
flink1.14 sql基础语法(一) flink sql表查询详解
flink去重(一)flink、flink-sql中常见的去重方案总结
(2022杭电多校三)1009.Package Delivery(贪心)