当前位置:网站首页>小程序支付管理-新版支付对接流程
小程序支付管理-新版支付对接流程
2022-07-27 06:56:00 【天马3798】
- 背景简介
- 目前是灰度测试阶段,少部分小程序需要【支付管理】方式对接;大部分不需要
- 【支付管理】方式跟视频号的【自定义支付组件】对接流程类似;使用方式类似。
官方对接说明文档:

- 对接流程
一、注册商户号

二、统一下单,客户端调起支付付款
调用wx.requestOrderPayment 前,需在小程序微信公众平台 -功能 - 支付管理入口或调用进件接口 申请商户号。
三、配置消息推送,接收支付结果通知、订单退款通知等

特别说明:
消息通知 接收消息需要解密
响应微信服务器,需要加密处理
参数验证特别说明:
请求参数:请求报文内容是空字符串
响应参数:请原样返回 echostr 参数内容,则接入生效,成为开发者成功,否则接入失败

- 消息推行对接说明
官方文档:
加密解密说明,并且有源码Demo
public IActionResult Callback()
{
try
{
using (StreamReader sr = new StreamReader(Request.Body, Encoding.UTF8))
{
//LogHelper.Info("接受事件回调处理");
string content = sr.ReadToEndAsync().Result;//验证请求发送的内容围攻
LogHelper.Info(content);
//解密处理
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("处理的单号:"+eventOrder.Order_Info.Trade_No);
//逻辑处理,修改订单状态,充值到账,发奖处理
RechargeRecordOperate _rechange = new RechargeRecordOperate();
_rechange.CallBack(eventOrder.Order_Info.Trade_No);
//发送公众号通知
return Json(_event.Success());
}
}
catch (Exception ex)
{
LogHelper.Debug("小程序消息回调,报错:", ex);
return Error(ex);
}
}
更多:
微信小程序保存视频到相册wx.saveVideoToPhotosAlbum()
wx.scanCode(Object object)使用详解
微信小程序录音接口使用整理-RecorderManager
边栏推荐
- 在kettle使用循环来处理表中的数据
- shell循环练习
- UUID and secrets module
- js中的数组方法与循环
- Excuse me, MySQL timestamp (6) using flick SQL is null. Is there a way to deal with this
- C language pthread_ cleanup_ Push() and pthread_ cleanup_ Pop() function (used for the resource cleaning task after the termination action in the critical resource program segment to avoid deadlock. T
- Li Mu hands-on learning, in-depth learning, V2 transformer and code implementation
- Grayog log server single node deployment
- Summary of several common ways to join dimension tables in Flink
- View the dmesg log before server restart
猜你喜欢

在mac中使用docker来搭建oracle数据库服务器

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

记录一个自己挖的坑~

Array method and loop in JS

用户解锁SM04 SM12

Chapter 6 Shell Logic and Arithmetic

连接MySQL时报错:Public Key Retrieval is not allowed 【解决方法】

Systematic explanation of unit testing: mockito
![Multithreading [preliminary - Part 1]](/img/e6/5808bbdb8368bc780bde4c151e7cd7.png)
Multithreading [preliminary - Part 1]

在kettle使用循环来处理表中的数据
随机推荐
User unlock sm04 sm12
漏风的小棉袄……
Simple rotation chart
用户解锁SM04 SM12
Drconv pytorch is changed to the same size of output and input
Federal Reserve SR 11-7: Guidance on model risk management - Wanzi collection
用shell来计算文本中的数字之和
记录一个自己挖的坑~
Routing between VLANs (explanation + verification)
Perl: split the external command to be executed into multiple lines
冰冰学习笔记:类与对象(中)
[wsl2] configure the USB camera connecting the USB device and using the host
shell 函数和数组练习
我是不是被代码给耽误了……不幸沦为一名程序员……
The error of QT connecting SQLite database and its modification
Understanding and learning of properties class and properties configuration file
ARP broadcasting practice cases
杂谈:最近好多朋友谈出国……
(2022 Niuke multi school III) a-ancestor (LCA)
sql语句批量更新 时间减去1天