-
Notifications
You must be signed in to change notification settings - Fork 509
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[iOS] support weixin payment #28
Comments
See #23 . |
+1 |
请问微信支付功能预期什么时候能够加入?目前很需要这个功能~谢谢 |
暂时没计划,因为没有账号来做测试。 |
@xu-li |
@xu-li 你好,我也获取了微信支付权限,如果需要可以联系我. 83113497 |
多谢大家。能否发我的邮箱: AthenaLightenedMyPath@gmail.com。 |
android上经过测试,点击支付无任何反应 |
@wangxiqiang 请问分享有作用么?支付的代码你是怎么写的? |
分享,登录都有作用。均正常。先由服务器生成prepayid,nonce,timestamp,sign,然后组成数组抛给webchat.sendPaymentRequest。按理说,不管参数对不对,均可以调起微信端。但现在是没有任何的反应。 $http.get(domain+'/api/order/wxpay/sign/'+$scope.order.orderSn).success(function(result){
console.log('请求支付返回:'+JSON.stringify(result));
if (result.status==1){
var parame={
mch_id: wechatMchId, // merchant id
prepay_id: result.data.prepayid, // prepay id
nonce: result.data.noncestr, // nonce
timestamp: result.data.timeStamp, // timestamp
sign: result.data.paySign
};
console.log('调支付的参数:'+JSON.stringify(parame));
Wechat.sendPaymentRequest(parame, function () {
alert("Success");
}, function (reason) {
alert("Failed: " + reason);
});
}else{
alert('失败:'+result.msg);
}
}).error(function(){
alert('支付请求失败!')
}); |
+1 |
@wangxiqiang @ryanlin1986 搞错了app id和open id。现在应该好了。 真不好意思。 |
@xu-li 还是无法调起微信。可能服务端和客户端两边的生成签名的参数大小写的问题。待查实后再反馈 |
你好,我尝试用VS2015+Cordova添加微信的分享插件,然后编译会报错, |
@goneaway1981 不好意思,没用过VS2015。 |
android点支付无反应的估计是因为没有在微信开放平台绑定应用签名 @xu-li 虽然android能正常支付,但是完成后没有调用callback,这是个bug吗?iOS正常。 |
@zhougn 应该是bug。请问:
多谢测试。 |
|
可以请问如何获取签名 统一下单的方法吗? |
@xu-li 补充下, 进入微信支付页面以后,直接按返回键关闭微信支付界面回到app以后,失败callback也没被调用。 |
@xu-li 看了下微信sdk demo,目录下的请先阅读这里.txt有这么一句: 是否这是导致回掉不成功的原因? |
android可以支付(虽然没回调),iOS启动微信以后,界面是空白,中间显示“确定”按钮,只能点确定,点击以后关闭微信回到原界面,取消回调有调用到。 |
@ryanlin1986 不确定android的问题,我明天看一下。 ios界面空白,基本是你的参数错误,后台代码可以参照这里。 |
@xu-li 感谢 已经成功 继续支持插件开发 |
@ryanlin1986 你是对的。微信支付的回调竟然和分享的回调用的不是同一个Activity。 多谢 @zhougn 和 @ryanlin1986 提供测试。 |
@xu-li 经测试android版已经回调已经成功,非常感谢! |
请问大家有在iOS上成功发起过支付的吗? |
不好意思问题已解决, |
https://api.mch.weixin.qq.com/pay/unifiedorder,这个接口我是在客户端请求的,这样会影响正常支付吗? |
@BBPen **http://localhost**肯定是可以的,我的[DEMO](https://github.com/xu-li/cordova-plugin-wechat-example/blob/master/server/payment_demo.php)用的也是这个。具体是否可以在客户端请求unifiedorder API,这个你要问微信官方,在服务端请求肯定是可以的。 回到空白页面的问题,基本是参数问题。你可以参考这个帖子前面几个回复。 |
var url = "https://api.mch.weixin.qq.com/pay/unifiedorder"; |
问题解决了 @xu-li |
cordova run android --release --device的时候,手机上弹出包解析错误。 |
您好:
请问有没有计划支持微信支付?
与支付宝类似,在app中支持微信支付也很重要,现在微信已经提供了微信支付的API(需要申请开通),不知道有没有计划支持呢?
The text was updated successfully, but these errors were encountered: