wechat-yanhua
v2.0.7
Published
微信小程序支付组件
Downloads
41
Readme
安装:npm i wechat-yanhua --save (安装完成后需要先构建npm再使用)
自费收银台2.0
json引入:需要从根文件夹中找到miniprogram_npm文件夹(完成构建npm自动生成的文件夹),使用相对路径或者绝对路径引入到需要使用的组件当中
{
"usingComponents": {
"wechat-yanhua": "../../miniprogram_npm/wechat-yanhua/index"
}
}
wxml使用
<wechat-yanhua
wechatAppId="{{ wechatAppId }}"
cashierAddress="{{ cashierAddress }}"
apiProxy="{{ apiProxy }}"
userId="{{ userId }}"
callbackUrl="{{ callbackUrl }}"
terminalType="normal"
terminalVersion="2.0"
/>
Js需要的参数:
data: {
wechatAppId: '',
cashierAddress: '',
apiProxy: '',
userId: '',
callbackUrl: '',
},
参数说明:
wechatAppId: 微信appid
cashierAddress:支付平台创建订单返回的收银台地址
apiProxy: 网关后端转发关键字,不传默认 /api,传值示例:/api
userId: 用户唯一标识(普通微信小程序openId)
callbackUrl:支付完成回调小程序页面(示例:/pages/index/index)
terminalType:收银台类型(mi 医保微信小程序收银台,normal 普通微信小程序收银台)
terminalVersion:收银台版本(1.0 老版本,2.0 新版本)
医保收银台2.0
json引入:需要从根文件夹中找到miniprogram_npm文件夹(完成构建npm自动生成的文件夹),使用相对路径或者绝对路径引入到需要使用的组件当中
{
"usingComponents": {
"wechat-yanhua": "../../miniprogram_npm/wechat-yanhua/index"
}
}
wxml使用
<wechat-yanhua
cashierAddress="{{ cashierAddress }}"
apiProxy="{{ apiProxy }}"
callbackUrl="{{ callbackUrl }}"
terminalType="mi"
terminalVersion="2.0"
/>
Js需要的参数:
data: {
cashierAddress: '',
apiProxy: '',
callbackUrl: '',
},
参数说明:
cashierAddress:支付平台创建订单返回的收银台地址
apiProxy: 网关后端转发关键字,不传默认 /api,传值示例:/api
callbackUrl:支付完成回调小程序页面(示例:/pages/index/index)
terminalType:收银台类型(mi 医保微信小程序收银台,normal 普通微信小程序收银台)
terminalVersion:收银台版本(1.0 老版本,2.0 新版本)
V1.0版本
自费收银台1.0
json引入:需要从根文件夹中找到miniprogram_npm文件夹(完成构建npm自动生成的文件夹),使用相对路径或者绝对路径引入到需要使用的组件当中
{
"usingComponents": {
"wechat-yanhua": "../../miniprogram_npm/wechat-yanhua/index"
}
}
wxml使用
<wechat-yanhua
wechatAppId="{{ wechatAppId }}"
orgId="{{ orgId }}"
appId="{{ appId }}"
innerOrderNo="{{ innerOrderNo }}"
tradeDate="{{ tradeDate }}"
baseUrl="{{ baseUrl }}"
userId="{{ userId }}"
callbackUrl="{{ callbackUrl }}"
terminalType="normal"
/>
Js需要的参数:
data: {
wechatAppId: '123123123123',
orgId: 'YHYJY',
appId: '1230405101712670722',
innerOrderNo: '20211129143202741047',
tradeDate: '20211129',
baseUrl: 'https://dev-ihosp.yanhuamedical.com/api',
userId: 'xxx',
callbackUrl: '',
terminalType: '',
},
参数说明:
wechatAppId: 微信appid
orgId:支付平台机构id
appId:支付平台机构下应用id
innerOrderNo:支付平台订单号
tradeDate:交易日期
baseUrl:接口请求网关
userId: 用户唯一标识(普通微信小程序openId)
callbackUrl:支付完成回调小程序页面(示例:/pages/index/index)
terminalType:收银台类型(mi 医保微信小程序收银台,normal 普通微信小程序收银台)
医保收银台1.0
json引入:需要从根文件夹中找到miniprogram_npm文件夹(完成构建npm自动生成的文件夹),使用相对路径或者绝对路径引入到需要使用的组件当中
{
"usingComponents": {
"wechat-yanhua": "../../miniprogram_npm/wechat-yanhua/index"
}
}
wxml使用
<wechat-yanhua
orgId="{{ orgId }}"
appId="{{ appId }}"
innerOrderNo="{{ innerOrderNo }}"
baseUrl="{{ baseUrl }}"
callbackUrl="{{ callbackUrl }}"
accessToken="{{ accessToken }}"
payAuthNo="{{ payAuthNo }}"
certNo="{{ certNo }}"
patientName="{{ patientName }}"
psnCertType="{{ psnCertType }}"
uldLatlnt="{{ uldLatlnt }}"
terminalType="mi"
/>
Js需要的参数:
data: {
orgId: 'YHxxx',
appId: '12304051017126xxxxx',
innerOrderNo: '202111291432027xxxxx',
baseUrl: 'https://xxx.xxx.xxx',
callbackUrl: '',
accessToken: '',
payAuthNo: '',
certNo: '',
patientName: '',
psnCertType: '',
uldLatlnt: '',
terminalType: '',
},
参数说明:
orgId:支付平台机构id
appId:支付平台机构下应用id
innerOrderNo:支付平台订单号
baseUrl:接口请求网关
callbackUrl:支付完成回调小程序页面(示例:/pages/index/index)
accessToken: 凭证
payAuthNo: 线上支付授权编码
certNo: 证件号码
patientName: 患者姓名
psnCertType: 证件类型
uldLatlnt: 经纬度
terminalType:收银台类型(mi 医保微信小程序收银台,normal 普通微信小程序收银台)