收藏
回答

wx.chooseWXPay微信支付问题

wx.chooseWXPay调起微信支付成功付款后,没有执行success函数,请问有人遇到过吗?

wx.chooseWXPay({
                                timestamp: payJson.timeStamp,
                                nonceStr: payJson.nonceStr,
                                package: payJson.package,
                                signType: payJson.signType,
                                paySign: payJson.paySign,
                                success: function (r) {
                                    alert('微信api:success')
                                    alert(r)
                                    this.$router.push({ name: 'Home'});
                                    // 支付成功后的回调函数
                                    if (r.errMsg == "chooseWXPay:ok") {
                                        alert('支付成功')
                                        this.$router.push({ name: 'Home'});
                                        //支付成功
                                        // _this.checkDetail(res.ordersNo);
                                         
                                    } else {
                                        alert('success支付失败')
                                        this.$router.push({ name: 'Home'});
                                        // _this.checkDetail(res.ordersNo);
                                        alert(r.errMsg,null);
                                    }
                                },
                                cancel: function(r) {
                                    alert('取消支付')
                                    this.$router.push({ name: 'Home'});
                                    //支付取消
                                    this.$route.push
                                    _this.checkDetail(res.ordersNo);
                                },
                                fail:function(r){
                                    alert('fail支付失败了')
                                    this.$router.push({ name: 'All_order_list'});
                                    //支付失败
                                }
                            });


回答关注问题邀请回答
收藏

3 个回答

  • 不负时光
    不负时光
    2020-05-27

    我也遇到了,支付成功后,跳转了一个商家活动推广页面,退出这个页面直接关闭公众号。求解!!!

    2020-05-27
    有用
    回复
  • 青稞
    青稞
    2020-03-18

    解决了吗?我也遇到了这个问题,执行了fail函数【chooseWXPay:没有此SDK或暂不支持此SDK模拟】

    2020-03-18
    有用
    回复 2
    • 不负时光
      不负时光
      2020-05-27
      真机测试,模拟器不能模拟支付
      2020-05-27
      1
      回复
    • -273.15°C
      -273.15°C
      04-12
      我差,果然是,模拟器半天没跑出来哦,然后他们用手机一试试,诶,可以付
      04-12
      回复
  • 薛定谔de小白喵
    薛定谔de小白喵
    2019-07-12

    我也遇到了相同的问题,请问解决了吗,感觉会有1%左右的概率会出现

    2019-07-12
    有用
    回复 3
登录 后发表内容