Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_vedio
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_vedio
Commits
107e7758
Commit
107e7758
authored
Aug 17, 2023
by
mengcuiguang2
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除支付宝sdk
parent
01bdbbe7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
98 additions
and
63 deletions
+98
-63
build.gradle
video/app/build.gradle
+1
-1
NinePayActivity.kt
...ava/com/duben/xixiplaylet/ui/activitys/NinePayActivity.kt
+25
-25
VipActivity.kt
...in/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
+71
-36
settings.gradle
video/settings.gradle
+1
-1
No files found.
video/app/build.gradle
View file @
107e7758
...
...
@@ -228,7 +228,7 @@ dependencies {
// 支付
api
project
(
':rxpay'
)
api
project
(
':wxpay'
)
api
project
(
':alipay'
)
//
api project(':alipay')
api
project
(
':oaid'
)
implementation
'com.github.CymChad:BaseRecyclerViewAdapterHelper:3.0.4'
// bugly
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/activitys/NinePayActivity.kt
View file @
107e7758
...
...
@@ -8,8 +8,8 @@ import android.os.Looper
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
com.jobo.alipay.AliPay
import
com.jobo.alipay.AlipayInfoImpl
//
import com.jobo.alipay.AliPay
//
import com.jobo.alipay.AlipayInfoImpl
import
com.jobo.rxpay.RxPay
import
com.jobo.rxpay.callback.IPayCallback
import
com.duben.xixiplaylet.R
...
...
@@ -123,29 +123,29 @@ class NinePayActivity : BaseActivity(), View.OnClickListener, NinePayView {
}
//实例化支付宝支付策略
val
aliPay
=
AliPay
()
//构造支付宝订单实体。一般都是由服务端直接返回。
val
alipayInfoImpl
=
AlipayInfoImpl
()
alipayInfoImpl
.
setOrderInfo
(
wxParanBean
.
params
.
params
)
//策略场景类调起支付方法开始支付,以及接收回调。
RxPay
.
pay
(
aliPay
,
this
,
alipayInfoImpl
,
object
:
IPayCallback
{
override
fun
success
()
{
UserManager
.
getInstance
().
vipFlag
=
true
ninePayPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
true
)
}
override
fun
failed
(
code
:
Int
,
message
:
String
?)
{
ninePayPresenter
?.
payError
(
code
)
if
(!
TextUtils
.
isEmpty
(
message
))
{
showToast
(
message
)
}
}
override
fun
cancel
()
{
ninePayPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
false
)
}
})
//
val aliPay = AliPay()
//
//构造支付宝订单实体。一般都是由服务端直接返回。
//
val alipayInfoImpl = AlipayInfoImpl()
//
alipayInfoImpl.setOrderInfo(wxParanBean.params.params)
//
//策略场景类调起支付方法开始支付,以及接收回调。
//
RxPay.pay(aliPay, this, alipayInfoImpl, object : IPayCallback {
//
override fun success() {
//
UserManager.getInstance().vipFlag = true
//
ninePayPresenter?.queryVipOrder(wxParanBean.tid.toString(), true)
//
}
//
//
override fun failed(code: Int, message: String?) {
//
ninePayPresenter?.payError(code)
//
if (!TextUtils.isEmpty(message)) {
//
showToast(message)
//
}
//
}
//
//
override fun cancel() {
//
ninePayPresenter?.queryVipOrder(wxParanBean.tid.toString(), false)
//
//
}
//
})
}
/**
...
...
video/app/src/main/java/com/duben/xixiplaylet/ui/activitys/VipActivity.kt
View file @
107e7758
...
...
@@ -14,8 +14,8 @@ import com.airbnb.lottie.LottieCompositionFactory
import
com.airbnb.lottie.LottieDrawable
import
com.daimajia.androidanimations.library.Techniques
import
com.daimajia.androidanimations.library.YoYo
import
com.jobo.alipay.AliPay
import
com.jobo.alipay.AlipayInfoImpl
//
import com.jobo.alipay.AliPay
//
import com.jobo.alipay.AlipayInfoImpl
import
com.jobo.rxpay.RxPay
import
com.jobo.rxpay.callback.IPayCallback
import
com.jobo.wxpay.WXPay
...
...
@@ -133,22 +133,38 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
* 设置content样式
*/
private
fun
setVipContent
(
bean
:
VipBean
.
ListBean
)
{
if
(
bean
.
isAlipay
&&
bean
.
isWeixin
)
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
if
(
bean
.
trial
==
0
)
{
//0-没签约 无0.01
ll_vip_alipay
.
visibility
=
View
.
GONE
ll_vip_wx
.
visibility
=
View
.
VISIBLE
}
else
if
(
bean
.
isAlipay
&&
!
bean
.
isWeixin
)
{
payType
=
WEIXIN_PAY
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
else
{
ll_vip_alipay
.
visibility
=
View
.
VISIBLE
ll_vip_wx
.
visibility
=
View
.
GONE
payType
=
ALIPAY
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
else
if
(!
bean
.
isAlipay
&&
bean
.
isWeixin
)
{
ll_vip_alipay
.
visibility
=
View
.
GONE
ll_vip_wx
.
visibility
=
View
.
VISIBLE
payType
=
WEIXIN_PAY
iv_vip_wx
.
setImageResource
(
R
.
mipmap
.
ic_vip_enable_blue
)
iv_vip_alipay
.
setImageResource
(
R
.
mipmap
.
ic_vip_none
)
}
// if (bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.VISIBLE
// } else if (bean.isAlipay && !bean.isWeixin) {
// ll_vip_alipay.visibility = View.VISIBLE
// ll_vip_wx.visibility = View.GONE
// payType = ALIPAY
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_none)
// } else if (!bean.isAlipay && bean.isWeixin) {
// ll_vip_alipay.visibility = View.GONE
// ll_vip_wx.visibility = View.VISIBLE
// payType = WEIXIN_PAY
// iv_vip_wx.setImageResource(R.mipmap.ic_vip_enable_blue)
// iv_vip_alipay.setImageResource(R.mipmap.ic_vip_none)
// }
if
(!
TextUtils
.
isEmpty
(
bean
.
remarks
))
{
...
...
@@ -278,6 +294,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipBean
.
pid
,
isAliPayInstalled
()
)
}
else
if
(
TextUtils
.
equals
(
payType
,
ALIPAY
))
{
if
(!
isAliPayInstalled
()){
showToast
(
"请安装支付宝"
)
return
}
vipPresenter
.
getVipPayParams
(
"ALIPAY"
,
vipBean
.
pid
,
isAliPayInstalled
()
...
...
@@ -390,37 +411,36 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
// 自动签约付费
if
(
wxParanBean
.
params
.
isSign
)
{
openAutoAlipay
(
wxParanBean
.
params
.
params
)
return
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
//实例化支付宝支付策略
val
aliPay
=
AliPay
()
//构造支付宝订单实体。一般都是由服务端直接返回。
val
alipayInfoImpl
=
AlipayInfoImpl
()
alipayInfoImpl
.
setOrderInfo
(
wxParanBean
.
params
.
params
)
//策略场景类调起支付方法开始支付,以及接收回调。
RxPay
.
pay
(
aliPay
,
this
,
alipayInfoImpl
,
object
:
IPayCallback
{
override
fun
success
()
{
UserManager
.
getInstance
().
vipFlag
=
true
vipPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
true
)
}
override
fun
failed
(
code
:
Int
,
message
:
String
?)
{
vipPresenter
?.
payError
(
code
)
if
(!
TextUtils
.
isEmpty
(
message
))
{
showToast
(
message
)
}
}
override
fun
cancel
()
{
vipPresenter
?.
queryVipOrder
(
wxParanBean
.
tid
.
toString
(),
false
)
}
})
//
//实例化支付宝支付策略
//
val aliPay = AliPay()
//
//构造支付宝订单实体。一般都是由服务端直接返回。
//
val alipayInfoImpl = AlipayInfoImpl()
//
alipayInfoImpl.setOrderInfo(wxParanBean.params.params)
//
//策略场景类调起支付方法开始支付,以及接收回调。
//
RxPay.pay(aliPay, this, alipayInfoImpl, object : IPayCallback {
//
override fun success() {
//
UserManager.getInstance().vipFlag = true
//
vipPresenter?.queryVipOrder(wxParanBean.tid.toString(), true)
//
}
//
//
override fun failed(code: Int, message: String?) {
//
vipPresenter?.payError(code)
//
if (!TextUtils.isEmpty(message)) {
//
showToast(message)
//
}
//
}
//
//
override fun cancel() {
//
vipPresenter?.queryVipOrder(wxParanBean.tid.toString(), false)
//
//
}
//
})
}
/**
...
...
@@ -480,6 +500,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipBean
.
pid
,
isAliPayInstalled
()
)
}
else
if
(
TextUtils
.
equals
(
payType
,
ALIPAY
))
{
if
(!
isAliPayInstalled
()){
showToast
(
"请安装支付宝"
)
return
}
vipPresenter
.
getVipPayParams
(
"ALIPAY"
,
vipBean
.
pid
,
isAliPayInstalled
()
...
...
@@ -533,6 +558,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipBean
.
pid
,
isAliPayInstalled
()
)
}
else
if
(
TextUtils
.
equals
(
payType
,
ALIPAY
))
{
if
(!
isAliPayInstalled
()){
showToast
(
"请安装支付宝"
)
return
}
vipPresenter
.
getVipPayParams
(
"ALIPAY"
,
vipBean
.
pid
,
isAliPayInstalled
()
...
...
@@ -582,6 +612,11 @@ class VipActivity : BaseActivity(), VipView, View.OnClickListener, VipAdapter.On
vipBean
.
pid
,
isAliPayInstalled
()
)
}
else
if
(
TextUtils
.
equals
(
payType
,
ALIPAY
))
{
if
(!
isAliPayInstalled
()){
showToast
(
"请安装支付宝"
)
return
}
vipPresenter
.
getVipPayParams
(
"ALIPAY"
,
vipBean
.
pid
,
isAliPayInstalled
()
...
...
video/settings.gradle
View file @
107e7758
include
':app'
include
':oaid'
include
':rxpay'
include
':alipay'
//
include ':alipay'
include
':wxpay'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment