Commit 5cd4c991 by 霍志良

feat:服务端to-pay接口增加字段解决微信支付商户限额问题,

parent 5bdcc9d9
......@@ -36,10 +36,10 @@ ext {
"ydl-platform" : "0.0.39.57",
//第二步 若干
"ydl-webview" : "0.0.38.32",
"ydl-webview" : "0.0.38.32",
"ydl-webview" : "0.0.38.33",
"ydl-webview" : "0.0.38.33",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9",
"ydl-pay" : "0.0.18.11",
"m-audioim" : "0.0.49.29.7",
"ydl-flutter-base": "0.0.14.19",
......@@ -118,9 +118,9 @@ ext {
"ydl-platform" : "0.0.39.57",
//第二步 若干
"ydl-webview" : "0.0.38.31",
"ydl-webview" : "0.0.38.32",
"ydl-media" : "0.0.21.6",
"ydl-pay" : "0.0.18.9",
"ydl-pay" : "0.0.18.10",
"m-audioim" : "0.0.49.29.7",
"ydl-flutter-base": "0.0.14.19",
......
......@@ -157,7 +157,7 @@ class CommonPayDialog : Dialog {
PAY_WECHAT -> {
getWeiXinPayOrderId(
thankPayId!!,
if (useMoneyType == 2) 1 else 0
if (useMoneyType == 2) 1 else 0,bean.merchantType
)
}
else -> {
......@@ -433,7 +433,8 @@ class CommonPayDialog : Dialog {
PAY_WECHAT -> {
getWeiXinPayOrderId(
it.data.payId,
if (useMoneyType == 2) 1 else 0
if (useMoneyType == 2) 1 else 0,
it.data.merchantType
)
}
else -> {
......@@ -511,7 +512,7 @@ class CommonPayDialog : Dialog {
* 微信支付
*/
@SuppressLint("CheckResult")
private fun getWeiXinPayOrderId(payId: String, isThreePay: Int) {
private fun getWeiXinPayOrderId(payId: String, isThreePay: Int,merchantType:String) {
if (!NetUtils.isConnected(activity)) {
activity.runOnUiThread {
ToastHelper.show(activity, activity.getString(R.string.net_error))
......@@ -519,7 +520,7 @@ class CommonPayDialog : Dialog {
return
}
var bean = WxPayParam(payId, isThreePay)
var bean = WxPayParam(payId, isThreePay,merchantType)
HttpUtils.wxPay(bean)
.subscribeOn(Schedulers.io())
.subscribe({
......
......@@ -29,4 +29,5 @@ public class OrderInfoBean {
//ios 壹贝字段
public String ybBalance;
public CommonCouponBean maxCoupon;
public String merchantType="";
}
......@@ -15,4 +15,5 @@ public class PayOrderBean {
public String uid;//用户id
public float rechargeMoney;//需要充值的金额
public boolean payStatus;//支付状态 true已支付 false未支付 ,
public String merchantType="";
}
......@@ -13,8 +13,8 @@ import com.ydl.ydlcommon.base.config.YDLConstants;
* @date 2019/4/24
*/
public class WxPayParam extends CommonPayParam {
public WxPayParam(String payId, int isThreePay) {
private String merchantType="";//增加微信支付参数,用于解决微信支付限额的问题
public WxPayParam(String payId, int isThreePay,String merchantType) {
super(payId, "wxapp_hz", isThreePay);
if(!TextUtils.isEmpty(BaseApp.instance.getGlobalConfig().getAppWxPayType())) {
type =BaseApp.instance.getGlobalConfig().getAppWxPayType();
......
......@@ -724,18 +724,18 @@ class PayActivity : BaseActivity() {
return when (inlet) {
INLET_NORMAL -> {
//正常入口
wxPayById(payParams!!.payId)
wxPayById(payParams!!.payId,payParams?.merchantType.toString())
}
INLET_TEST -> {
//测评入口
if (null != testAddOrderBean && !TextUtils.isEmpty(testAddOrderBean!!.payId!!)) {
wxPayById(testAddOrderBean!!.payId!!)
wxPayById(testAddOrderBean!!.payId!!,payParams?.merchantType.toString())
} else {
null
}
}
else -> {
wxPayById(payParams!!.payId)
wxPayById(payParams!!.payId,payParams?.merchantType.toString())
}
}
}
......@@ -744,8 +744,8 @@ class PayActivity : BaseActivity() {
* 微信支付
* @param payId 支付id
*/
private fun wxPayById(payId: String): Observable<PayStatus> {
val bean = WxPayParam(payId, 1)
private fun wxPayById(payId: String,merchantType:String): Observable<PayStatus> {
val bean = WxPayParam(payId, 1,merchantType)
return HttpUtils.wxPay(bean)
.compose(RxUtils.resultData())
.observeOn(AndroidSchedulers.mainThread())
......
......@@ -39,17 +39,21 @@ data class PayParams(
/**
* 已使用的红包金额(代付款列表入口 使用)
*/
var coupon_money: Float = 0F
) : Parcelable {
var coupon_money: Float = 0F,
var merchantType:String?=""
) : Parcelable{
constructor(parcel: Parcel) : this(
parcel.readInt(),
parcel.readInt(),
parcel.readString(),
parcel.readByte() != 0.toByte(),
parcel.readString(),
parcel.readFloat(),
parcel.readString(),
parcel.readFloat())
parcel.readInt(),
parcel.readInt(),
parcel.readString(),
parcel.readByte() != 0.toByte(),
parcel.readString(),
parcel.readFloat(),
parcel.readString(),
parcel.readFloat(),
parcel.readString()
) {
}
override fun writeToParcel(parcel: Parcel, flags: Int) {
parcel.writeInt(inlet)
......@@ -60,6 +64,7 @@ data class PayParams(
parcel.writeFloat(needPay)
parcel.writeString(payId)
parcel.writeFloat(coupon_money)
parcel.writeString(merchantType)
}
override fun describeContents(): Int {
......@@ -78,7 +83,6 @@ data class PayParams(
*/
const val INLET_NORMAL = 1
const val INLET_TEST = 2
override fun createFromParcel(parcel: Parcel): PayParams {
return PayParams(parcel)
}
......
......@@ -15,13 +15,15 @@ class ConfidePayParams{
var payId : String? = null
//支付成功跳转地址
var confideUrl : String? = null
var merchantType:String?=""
constructor(payTitle: String?, orderPrice: Double?, coupnPrice: Double?, avliableMoney: Double?, payId: String?, confideUrl: String?) {
constructor(payTitle: String?, orderPrice: Double?, coupnPrice: Double?, avliableMoney: Double?, payId: String?, confideUrl: String?,merchantType:String?) {
this.payTitle = payTitle
this.orderPrice = orderPrice
this.coupnPrice = coupnPrice
this.avliableMoney = avliableMoney
this.payId = payId
this.confideUrl = confideUrl
this.merchantType=merchantType
}
}
\ No newline at end of file
......@@ -168,7 +168,7 @@ class PayDialog : Dialog {
.flatMap {
when (it) {
0, 1 -> {
wxPayById(data?.payId!!)
wxPayById(data?.payId!!,data?.merchantType.toString())
}
else -> {
aliPayById(data?.payId!!)
......@@ -199,8 +199,8 @@ class PayDialog : Dialog {
* 微信支付
* @param payId 支付id
*/
private fun wxPayById(payId: String): Observable<PayStatus> {
val bean = WxPayParam(payId, 1)
private fun wxPayById(payId: String,merchantType:String): Observable<PayStatus> {
val bean = WxPayParam(payId, 1,merchantType)
return HttpUtils.wxPay(bean)
.compose(RxUtils.resultData())
.observeOn(AndroidSchedulers.mainThread())
......
......@@ -103,7 +103,12 @@ class H5JsBean {
var sourceUrl: String? = null//登录完成后跳转地址
override fun toString(): String {
return "Params(url=$url, search_name='$search_name', id=$id, uid=$uid, toName=$toName, toUid=$toUid, docHead=$docHead, doctorId=$doctorId, listenerId=$listenerId, orderStatus=$orderStatus, orderStatusDesc=$orderStatusDesc, orderContent=$orderContent, action_name=$action_name, login=$login, orderid=$orderid, weixin=$weixin, phoneNumber=$phoneNumber, type=$type, dot_flag=$dot_flag, payId=$payId, money=$money, orderId=$orderId, succ=$succ, course_id=$course_id, tid=$tid, doctor_id=$doctor_id, open_long=$open_long, roomid=$roomid, roomname=$roomname, httpPullUrl=$httpPullUrl, hlsPushUrl=$hlsPushUrl, live_cid=$live_cid, host_uid=$host_uid, host_head=$host_head, live_status=$live_status, replay_url=$replay_url, start_time=$start_time, host_name=$host_name, live_online_counter=$live_online_counter, product_id=$product_id, schedule_id=$schedule_id, schedule_time=$schedule_time, cate_id=$cate_id)"
return "Params(url=$url, search_name='$search_name', id=$id, uid=$uid, toName=$toName, toUid=$toUid, docHead=$docHead, doctorId=$doctorId, listenerId=$listenerId, " +
"orderStatus=$orderStatus, orderStatusDesc=$orderStatusDesc, orderContent=$orderContent, action_name=$action_name, login=$login, orderid=$orderid, weixin=$weixin, " +
"phoneNumber=$phoneNumber, type=$type, dot_flag=$dot_flag, payId=$payId, money=$money, orderId=$orderId, succ=$succ, course_id=$course_id, tid=$tid, doctor_id=$doctor_id, " +
"open_long=$open_long, roomid=$roomid, roomname=$roomname, httpPullUrl=$httpPullUrl, hlsPushUrl=$hlsPushUrl, live_cid=$live_cid, host_uid=$host_uid, host_head=$host_head, " +
"live_status=$live_status, replay_url=$replay_url, start_time=$start_time, host_name=$host_name, live_online_counter=$live_online_counter, product_id=$product_id, " +
"schedule_id=$schedule_id, schedule_time=$schedule_time, cate_id=$cate_id,merchantType$merchantType)"
}
var test_items_id = 0
......@@ -135,6 +140,8 @@ class H5JsBean {
var switchStatus = 1
var closeReplaceChat=false
var merchantType:String?=""
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment