测试账号-授权,支付联调
来源:16-8 支付2
宝慕林9190631
2020-12-02
师兄你好,问个问题:
(1)微信授权,支付都可以分开调通
(2)想使用借用账号,微信访问sell.com进入,连在一起调通下单支付?
(3) openid写死的地方有:
1.OrderForm2OrderDTOConverter() 下的
orderDTO.setBuyerOpenid(“oTgZpwQnZ-oUhy65POuX24EbqYiY”); // 购物车中
2.PayServiceImpl 下的 create()方法下的
payRequest.setOpenid(“oTgZpwQnZ-oUhy65POuX24EbqYiY”);
3.WechatController 下的 userInfo ()下的 // 微信授权下的userInfo
String openId = “oTgZpwQnZ-oUhy65POuX24EbqYiY”;
4.前端代码下/opt/code/sell_fe_buyer/src/components/payment/目录下index.vue 文件
this.$http.post("/sell/buyer/order/create", {
‘openid’: getCookie(‘openid’), // 固定了openid
’phone’: this.phone,
‘name’: this.name,
‘address’: this.address,
‘items’: JSON.stringify(goods)}
).then((respones) => {
respones = respones.body;
if (respones.code == ERR_OK) {
location.href = config.wechatPayUrl +
’?openid=’ + getCookie(‘openid’) + // 固定了 openid
’&orderId=’ + respones.data.orderId +
’&returnUrl=’ + encodeURIComponent(config.sellUrl + ‘/#/order/’ + respones.data.orderId);
}
5.前端代码中:/opt/code/sell_fe_buyer/src/components/order/ 目录下detail.vue文件
pay: function (orderId) {
location.href = config.wechatPayUrl +
’?openid=’ + getCookie(‘openid’) + // 固定了openid
’&orderId=’ + orderId +
’&returnUrl=’ + encodeURIComponent(config.sellUrl + ‘/#/order/’ + orderId);
}
(4) 这是/opt/code/sell_fe_buyer/config/ index.js文件信息
port: 9000,
sellUrl: ‘http://sell.com’,
openidUrl: ‘http://pfzhang18.natapp1.cc/sell/wechat/authorize’,
wechatPayUrl: ‘http://proxy.springboot.cn/pay’
现在的问题是:
微信上访问 sell.com,进行下单。
这是抓包工具 Fiddler 下的错误
这是idea 中 显示的错误:
搞了很久了,我想的是,Openid,我都写死了,怎么还提示没传进去呢,
是哪个地方漏了?还是?
上面create()方法标红,怎么访问不到,是我哪里配置出错了嘛?
请师兄解惑。谢谢。后面章节看了。
1回答
-
大先生灬
2020-12-03
我也是遇到这个问题,请问解决了吗?
052020-12-04
相似问题