parent
a616bf5169
commit
31d2a20ebf
|
|
@ -215,32 +215,36 @@ class MemberRechargeActivity : BaseActivity() {
|
|||
when (rsp.data.payModel) {
|
||||
1000 -> {
|
||||
val orderInfo = rsp.data.appFormat
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val alipay = PayTask(this@MemberRechargeActivity)
|
||||
val result = alipay.payV2(orderInfo, true)
|
||||
android.util.Log.i("payResult", "result::$result")
|
||||
launch(Dispatchers.Main) {
|
||||
val resultStatus = result["resultStatus"]
|
||||
val memo = result["memo"]
|
||||
if (resultStatus == "9000") {
|
||||
MaterialDialog(this@MemberRechargeActivity).show {
|
||||
this.cancelable(true)
|
||||
cornerRadius(res = R.dimen.dp_15)
|
||||
customView(
|
||||
R.layout.pay_sure_dialog_layout,
|
||||
scrollable = false,
|
||||
noVerticalPadding = true,
|
||||
horizontalPadding = false
|
||||
)
|
||||
val tvSure = findViewById<TextView>(R.id.tvSure)
|
||||
tvSure.setOnClickListener {
|
||||
dismiss()
|
||||
if(orderInfo!=null){
|
||||
CoroutineScope(Dispatchers.IO).launch {
|
||||
val alipay = PayTask(this@MemberRechargeActivity)
|
||||
val result = alipay.payV2(orderInfo, true)
|
||||
android.util.Log.i("payResult", "result::$result")
|
||||
launch(Dispatchers.Main) {
|
||||
val resultStatus = result["resultStatus"]
|
||||
val memo = result["memo"]
|
||||
if (resultStatus == "9000") {
|
||||
MaterialDialog(this@MemberRechargeActivity).show {
|
||||
this.cancelable(true)
|
||||
cornerRadius(res = R.dimen.dp_15)
|
||||
customView(
|
||||
R.layout.pay_sure_dialog_layout,
|
||||
scrollable = false,
|
||||
noVerticalPadding = true,
|
||||
horizontalPadding = false
|
||||
)
|
||||
val tvSure = findViewById<TextView>(R.id.tvSure)
|
||||
tvSure.setOnClickListener {
|
||||
dismiss()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
RxToast.info(resources.getString(R.string.PayError)+memo)
|
||||
}
|
||||
} else {
|
||||
RxToast.info(resources.getString(R.string.PayError)+memo)
|
||||
}
|
||||
}
|
||||
}else{
|
||||
RxToast.error("订单支付异常,请更换支付方式!")
|
||||
}
|
||||
}
|
||||
0->{
|
||||
|
|
|
|||
Loading…
Reference in New Issue