tvrcgo / weixin-pay

微信支付 Nodejs SDK
MIT License
916 stars 241 forks source link

调用 createUnifiedOrder() 生成预支付交易单,该如何将结果的XML数据返回给微信? #23

Closed matt1991 closed 6 years ago

matt1991 commented 7 years ago

试过多次,

wxpay.createUnifiedOrder({ body: '扫码支付测试', out_trade_no: '20140703'+Math.random().toString().substr(2, 10), total_fee: 1, spbill_create_ip: '192.168.2.210', notify_url: 'http://xxx.74.212.xxx:3000/order/notify', //发帖时隐藏下IP trade_type: 'NATIVE', product_id: pid, openid:openid, sign:sign, nonce_str:nonce_str }, function(err, result){ cb(err, result); } ); 将结果变成XML, 然后通过res.send(xmlMessage); 始终没有收到任何来自微信的回调。理论上应该会call我的/order/notify的。 不知道为什么。。。卡在这里了

tvrcgo commented 7 years ago

@matt1991 你的服务通么?

tvrcgo commented 7 years ago

@matt1991 问题解决了吗?