AppPay

open class AppPay : IAppPay

AppPay主要包含微信支付、支付宝支付,让App集成支付功能变的更简单。

Author

Jenly

Follow me

Constructors

Link copied to clipboard
constructor(activity: Activity)

Functions

Link copied to clipboard
open fun checkAliAuth(authInfo: String)
open fun checkAliAuth(authInfo: String, listener: AliPay.OnAuthListener)
检测支付宝授权
Link copied to clipboard
open fun getAliPay(): AliPay
获取 AliPay
Link copied to clipboard
open fun getUnionPay(): UnionPay
获取 UnionPay
Link copied to clipboard
open fun getWXPay(): WXPay
获取 WXPay
Link copied to clipboard
open fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent)
当使用银联支付时,需要在 Activity 中的 onActivityResult 方法中调用此方法,来接收支付结果监听回调
Link copied to clipboard
open fun sendAliPayReq(orderInfo: String)
open fun sendAliPayReq(orderInfo: String, listener: AliPay.OnPayListener)
发送支付宝支付请求
Link copied to clipboard
open fun sendUnionPayReq(orderInfo: String)
open fun sendUnionPayReq(orderInfo: String, listener: UnionPay.OnPayListener)
open fun sendUnionPayReq(orderInfo: String, serverMode: String)
open fun sendUnionPayReq(orderInfo: String, serverMode: String, listener: UnionPay.OnPayListener)
发起银联支付请求
Link copied to clipboard
open fun sendWXPayReq(req: WXPayReq)
open fun sendWXPayReq(req: WXPayReq, listener: WXPay.OnPayListener)
发送微信支付请求
Link copied to clipboard
设置支付宝授权监听
Link copied to clipboard
设置支付宝支付监听
Link copied to clipboard
设置银联支付监听;记得在 Activity 中的 onActivityResult 方法中调用 onActivityResult方法,这样设置的银联支付监听才会被触发。
Link copied to clipboard
设置微信支付监听