银联支付插件
This commit is contained in:
@@ -0,0 +1,53 @@
|
||||
/**
|
||||
* 银联商务 UMS 支付 UTS 插件接口定义
|
||||
* 适配正式版 UMS SDK(Android: qmf-ppplugin / iOS: libUMSPosPayOnly)
|
||||
*/
|
||||
type modeType = '00' | '01'
|
||||
export type PayChannel = 'unionpay' | 'alipay' | 'weixin'
|
||||
|
||||
export type startPayOptions = {
|
||||
/**
|
||||
* 支付渠道,默认 unionpay
|
||||
* unionpay: 云闪付
|
||||
* alipay: 支付宝
|
||||
* weixin: 微信(需申请微信SDK后使用)
|
||||
*/
|
||||
channel?: PayChannel,
|
||||
/**
|
||||
* 支付环境,00正式环境,01测试环境
|
||||
* 【注】UMS SDK 内部根据 payData 中的环境字段判断,此参数保留兼容
|
||||
*/
|
||||
mode: modeType,
|
||||
/**
|
||||
* 服务端返回的支付参数
|
||||
* UMS SDK:appPayRequest 对应的 JSON 字符串(由后端返回)
|
||||
*/
|
||||
tn: string,
|
||||
/**
|
||||
* 【可选】手机pay支付类别,保留兼容字段
|
||||
*/
|
||||
seType?: string,
|
||||
/**
|
||||
* 支付结果回调
|
||||
* result.code: 0成功 / -1失败 / -2取消
|
||||
* result.msg: 提示信息
|
||||
*/
|
||||
callback: (result: any) => void
|
||||
}
|
||||
|
||||
/**
|
||||
* 检查是否安装云闪付App
|
||||
* 【注】UMS SDK 未提供安装检测接口,默认返回 true
|
||||
*/
|
||||
export type checkWalletInstalled = () => boolean
|
||||
|
||||
/**
|
||||
* 发起支付
|
||||
*/
|
||||
export type startPay = (options: startPayOptions) => void
|
||||
|
||||
/**
|
||||
* 检查已安装的支持直通模式的银行app列表
|
||||
* 【注】UMS SDK 暂未实现此功能
|
||||
*/
|
||||
export type getDirectApps = (callback: Function) => void
|
||||
Reference in New Issue
Block a user