Commit cf7414f6 authored by 任国军's avatar 任国军

wechat check

parent a70760ab
Pipeline #24414 passed with stage
in 3 seconds
......@@ -93,7 +93,7 @@ class WechatController extends Controller {
xmlData += '<return_msg><![CDATA[OK]]></return_msg>';
xmlData += '</xml>';
ctx.body = xmlData;
ctx.logger.info(ctx.request.body);
ctx.logger.info(JSON.stringify(ctx.request));
return ctx.body;
}
}
......
......@@ -353,13 +353,14 @@ class WechatService extends Service {
ctx.logger.info('course_wechat_pay_params: ' + xmlData);
let ret = await new Promise((resolve, reject) => {
request({ url: 'https://api.mch.weixin.qq.com/pay/unifiedorder', method: 'POST', body: xmlData }, function(err, response, body) {
request({ url: 'https://uat-nginx.jianbing.com/51business/api/course/v5/wechat/pay/notify', method: 'POST', body: xmlData }, function(err, response, body) {
if (!err && response.statusCode === 200) {
ctx.logger.info('course_wechat_pay_result: ' + body);
resolve(body);
} else {
resolve(err);
}
console.log(response);
});
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment