用PHP写微信小程序余额支付接口,有大佬可以请教一下吗
payNow() {
if(this.orderDetail.pay_way===3){ //余额支付
//这里就要请求余额支付接口了,后台扣完款后 修改订单状态,返回支付成功信息,这里提示支付成功,跳转或者刷新就行了。
}else{
this.showLoading = true
prepay({
from: 'order',
order_id: Number(this.id)
}).then(res => {
if (res.code == 1) {
this.showLoading = false
let args = res.data; //data: "余额测试" args取到的就是"余额测试" wxpay这个里面的参数就是"余额测试" 你那边怎么取的到呢
wxpay(args).then(() => {
this.$toast({
title: "支付成功"
})
this.getOrderDetailFun();
uni.$emit("refreshorder")
}).catch(() => {
this.showLoading = false
});
}
});
}
},