用PHP写微信小程序余额支付接口,有大佬可以请教一下吗

共享PHP学习记录 2021-04-29 04:55:49

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
});
}
});
}
},



...全文
117 回复 打赏 收藏 转发到动态 举报
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

20,359

社区成员

发帖
与我相关
我的任务
社区描述
“超文本预处理器”,是在服务器端执行的脚本语言,尤其适用于Web开发并可嵌入HTML中。PHP语法利用了C、Java和Perl,该语言的主要目标是允许web开发人员快速编写动态网页。
phpphpstorm 技术论坛(原bbs)
社区管理员
  • 开源资源社区
  • phpstory
  • xuzuning
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧