当前位置:网站首页>小程序支付管理-新版支付对接流程
小程序支付管理-新版支付对接流程
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
边栏推荐
- Graylog 日志服务器单节点部署
- Bash: create a function that returns a Boolean value
- C common function integration-2
- The DrawImage method calls the solution of not displaying pictures for the first time
- A small cotton padded jacket with air leakage
- 利用 Amazon DynamoDB 和 Amazon S3 结合 gzip 压缩,最大化存储玩家数据
- Will Flink CDC constantly occupy Oracle's memory by extracting Oracle's data, and finally cause oracle-040
- Error when connecting to MySQL: public key retrieval is not allowed [solution]
- 杂谈:高考
- User unlock sm04 sm12
猜你喜欢

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

opengl-shader学习笔记:varying变量

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

The DrawImage method calls the solution of not displaying pictures for the first time

Using loops to process data in tables in kettle

Federal Reserve SR 11-7: Guidance on model risk management - Wanzi collection

VLAN trunk实验

Panabit SNMP configuration

单元测试系统化讲解之Mockito

记录一个自己挖的坑~
随机推荐
次轮Okaleido Tiger即将登录Binance NFT,引发社区热议
在rhel7.3中编译和使用log4cxx
Tcp/ip protocol analysis (tcp/ip three handshakes & four waves + OSI & TCP / IP model)
Flink principle (I) TTL management and fault tolerance mechanism of state
Demonstrate the use of foreign keys with Oracle
Closed hash and open hash resolve hash conflicts
sql语句批量更新 时间减去1天
js正则表达式实现每三位数字加一个逗号
闭散列和开散列解决哈希冲突
vlan间路由(讲解+验证)
User unlock sm04 sm12
Oracle composite query
Gossip: talk with your daughter about why you should learn culture lessons well
C语言 pthread_cleanup_push()和pthread_cleanup_pop()函数(用于临界资源程序段中发生终止动作后的资源清理任务,以免造成死锁,临界区资源一般上锁)
Plato farm is expected to further expand its ecosystem through elephant swap
js做一个红绿灯
Examples of Oracle triggers
yhb_ sysbench
JS regular expression implementation adds a comma to every three digits
Guava的基础功能与集合