当前位置:网站首页>小程序支付管理-新版支付对接流程
小程序支付管理-新版支付对接流程
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
边栏推荐
- 在rhel7.3中编译和使用log4cxx
- 临界区(critical section 每个线程中访问 临界资源 的那段代码)和互斥锁(mutex)的区别(进程间互斥量、共享内存、虚拟地址)
- flink1.14 sql基础语法(一) flink sql表查询详解
- IO中节点流和处理流的理解学习
- Use Popen to execute a command and get the return result
- Perl: split the external command to be executed into multiple lines
- Mysql: increase the maximum number of connections
- Clickhouse notes 1 | introduction, features | installation and use based on centos7 system | common data types | mergetree table engine | SQL operation
- js做一个红绿灯
- 次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
猜你喜欢

Chapter 6 Shell Logic and Arithmetic

用户解锁SM04 SM12

(2022 Niuke multi school III) j-journey (Dijkstra)

在kettle中快速更新一个字段中的信息
![Error when connecting to MySQL: public key retrieval is not allowed [solution]](/img/b3/41523d44924ec203e40453bace6627.png)
Error when connecting to MySQL: public key retrieval is not allowed [solution]

(2022 Niuke multi school III) a-ancestor (LCA)

Using loops to process data in tables in kettle

海康h9摄像头用xshell无法连接(没有启用ssh)

Codeforces Round #810 (Div.2) A-C

我是不是被代码给耽误了……不幸沦为一名程序员……
随机推荐
Port forwarding summary
SQL statement batch update time minus 1 day
Turn off the auto start function of Oracle service in centos7
Use of tigervnc
Demonstrate the use of foreign keys with Oracle
Am I delayed by the code... Unfortunately, I became a programmer
flink原理(一) 状态的TTL管理、容错机制
glGetUniformLocation,glUniform4f
drawImage方法第一次调用不显示图片的解决方式
在mysql中同时使用left join on 和where 的查询结果分析
Flynk de duplication (2) solve the hot issues in the process of flynk and flynk SQL de duplication
js正则表达式实现每三位数字加一个逗号
The DrawImage method calls the solution of not displaying pictures for the first time
Essay: college entrance examination
C语言 pthread_cleanup_push()和pthread_cleanup_pop()函数(用于临界资源程序段中发生终止动作后的资源清理任务,以免造成死锁,临界区资源一般上锁)
(2022牛客多校三)J-Journey(dijkstra)
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
(2022杭电多校三)1009.Package Delivery(贪心)
记录一个自己挖的坑~
The error of QT connecting SQLite database and its modification