银联支付插件

This commit is contained in:
zhouyanli
2026-06-04 17:55:18 +08:00
parent a8e3d1f875
commit d26bd4e86b
46 changed files with 1769 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
/**
* 银联商务 UMS 支付 UTS 插件接口定义
* 适配正式版 UMS SDKAndroid: 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 SDKappPayRequest 对应的 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