当前位置:网站首页>Applet payment
Applet payment
2022-04-23 11:11:00 【Morning blown by Maple】
payment
uni.requestPayment Is a unified client payment of various platforms API, Whether it's in a small program or App in , All clients use this API Call payment . Ben API When operating at each end , It will be automatically converted to the native payment call at each end API.
uni.requestPayment( object ) Parameter description
provider Required , by String, Service provider , adopt uni.getProvider obtain
orderInfo Required , by String or Object, Order data
timeStamp Wechat applet is required , by String, The current timestamp
nonceStr Wechat applet is required , by String, Random string , The length is 32 Less than characters
package Wechat applet is required , by String, Unified order interface returns prepay_id Parameter values
signType Wechat applet is required , by String, Signature algorithm , It should be consistent with the value when placing an order in the background
paySign Wechat applet is required , by String, Signature
bannedChannels Not required , by Array<String>, Need hidden payment methods
success Not required , by Function, Interface call successful callback
fail Not required , by Function, Callback for interface call failure
complete Not required , by Function, The callback function at the end of the interface call ( Successful call 、 Failure will be carried out )
App Platform payment process
Payment platform function application =》 manifest.json Configure payment parameters in =》 uni-app Call inside API Make payment
App payment
uni.requestPayment({
provider: 'alipay',
orderInfo: 'orderInfo', // WeChat 、 Alipay order data 【 Pay attention to the order information of wechat , Key values should be all lowercase , Hump naming is not allowed 】
success: function (res) {
console.log('success:' + JSON.stringify(res));
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
})
Wechat app payment
uni.requestPayment({
provider: 'wxpay',
timeStamp: String(Date.now()),
nonceStr: 'A1B2C3D4E5',
package: 'prepay_id=wx20180101abcdefg',
signType: 'MD5',
paySign: '',
success: function (res) {
console.log('success:' + JSON.stringify(res));
},
fail: function (err) {
console.log('fail:' + JSON.stringify(err));
}
})
版权声明
本文为[Morning blown by Maple]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231107040376.html
边栏推荐
- 妊娠箱和分娩箱的区别
- ConstraintLayout布局
- MBA-day5数学-应用题-工程问题
- GO接口使用
- STM32接电机驱动,杜邦线供电,然后反烧问题
- 《Neo4j权威指南》简介,求伯君、周鸿袆、胡晓峰、周涛等大咖隆重推荐
- Learn go language 0x07: stringer exercise code in go language journey
- MySQL interview questions explain how to set hash index
- Mysql中有关Datetime和Timestamp的使用总结
- Microsoft Access database using PHP PDO ODBC sample
猜你喜欢

C语言之结构体(进阶篇)

Visual common drawing (III) area map

Database management software sqlpro for SQLite for Mac 2022.30

Intuitive understanding entropy

Source insight 4.0 FAQs

Mysql8.0安装指南

Introduction to neo4j authoritative guide, recommended by Qiu Bojun, Zhou Hongxiang, Hu Xiaofeng, Zhou Tao and other celebrities

MIT:用无监督为世界上每个像素都打上标签!人类:再也不用为1小时视频花800个小时了

比深度学习更值得信赖的模型ART

采用百度飞桨EasyDL完成指定目标识别
随机推荐
Understanding of fileprovider path configuration strategy
mysql中整数数据类型tinyint详解
Detailed explanation of MySQL creation stored procedure and function
MySQL面试题讲解之如何设置Hash索引
Difference between pregnancy box and delivery box
详解MySQL中timestamp和datetime时区问题导致做DTS遇到的坑
R-Drop:更强大的Dropout正则方法
Special members and magic methods
Learn go language 0x03: understand the dependency between variables and initialization order
Code implementation of general bubbling, selection, insertion, hill and quick sorting
学习 Go 语言 0x03:理解变量之间的依赖以及初始化顺序
Detailed explanation of integer data type tinyint in MySQL
学习 Go 语言 0x05:《Go 语言之旅》中映射(map)的练习题代码
Visual solutions to common problems (VIII) mathematical formulas
MySQL interview questions explain how to set hash index
Learn go language 0x05: the exercise code of map in go language journey
Mysql中有关Datetime和Timestamp的使用总结
About the three commonly used auxiliary classes of JUC
MySQL分区表实现按月份归类
Using El popconfirm and El backtop does not take effect