Skip to content

集成微信支付,支付宝支付和微信分享,微信登录

Notifications You must be signed in to change notification settings

kotle/PayLibrary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

使用说明

微信支付

1.在gradle.properties中,配置账号。

#微信支付的AppId,可以不需要
wxAppId=null
#微信登录分享的secret,可以不需要
wxAppSecret=null

2.启动微信支付

 PayHelper(WeiXinPay(Activity,PayReq)).startPay( payListener)

支付宝支付

1.在根目录的build.gradle中设置aar文件目录

allprojects {
    repositories {
        // 添加下面的内容
        flatDir {
            dirs 'libs'
        }

        google()
        jcenter()
    }
}

2.复制paylib模块lib里面的支付宝aar文件到app模块的lib目录下 3.启动支付宝支付

 PayHelper(AliPay(OrderInfo,Activity)).startPay( payListener)

微信分享和微信登录

提供一个工具类WxUtils来实现微信登录和微信分享

1.微信登录

fun login(context: Context, call: WxLoginCall?): Boolean

2.微信分享

fun share(context: Context, title: String,desc: String,url: String,type: Int,bitmap: Bitmap )

About

集成微信支付,支付宝支付和微信分享,微信登录

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published