ios平台app支付成功uni-app的uni.requestPayment不执行回调

ios平台app支付成功uni-app的uni.requestPayment不执行回调

开发环境 版本号 项目创建方式
Windows win 10 HBuilderX

产品分类:uniapp/App

PC开发环境操作系统:Windows

手机系统:iOS

手机系统版本号:IOS 14

手机厂商:苹果

手机机型:14.6

页面类型:vue

打包方式:离线

示例代码:

payment(way) {  
    // #ifdef APP-PLUS  
    uni.getProvider({  
        service: 'payment',  
        success: res => {  
            //微信  
            this.paymentWay = 3;  
            if (res.provider.indexOf('wxpay') == -1) {  
                uni.showToast({  
                    title: '未开通微信',  
                    icon: 'none',  
                    image: '/static/imgs/icon_fb_incorrect.png',  
                    mask: true  
                });  
                return;  
            }  

            this.$utils .request( 'getOrderCode', params, 'POST' )  
            .then(res => {  
                uni.requestPayment({  
                    provider: 'wxpay',  
                    orderInfo,  
                    success: res1 => {  
                        //支付接口成功  
                    },  
                    fail: err => {  
                        //支付接口失败  
                    },  
                    complete: () => {  
                    }  
                });  
            })  
            .catch(params => {  
                uni.showModal({  
                    title: 'orderpay/pay',  
                    content: params  
                })  
            });  
        });  
    });  
}

操作步骤:

打开支付, 进入微信, 支付成功返回商家

预期结果:

执行回调函数

实际结果:

未执行任何回调函数

bug描述:

可以正常打开微信支付, 支付成功后回到app不执行回调函数。


更多关于ios平台app支付成功uni-app的uni.requestPayment不执行回调的实战教程也可以访问 https://www.itying.com/category-93-b0.html

4 回复

好多年bug了没人管,绑定支付还会丢单,放弃ios支付吧

更多关于ios平台app支付成功uni-app的uni.requestPayment不执行回调的实战教程也可以访问 https://www.itying.com/category-93-b0.html


可是只是在ios中调用微信支付啊,也有问题嘛? 我用的早期构建的版本都可以正常支付的

确认是离线打包吗?如果是的话,离线打包使用的 SDK 版本是否和 HBuilderX 一致?

Hmm 感觉应该是SDK的问题, 我切换会3.1.22的HB及对应的SDK之后就完全没问题了

回到顶部