Commit e85b2db2 authored by 何娜's avatar 何娜

taxh5 修改回调key

parent 55c5be6e
Pipeline #7047 passed with stage
in 2 seconds
......@@ -48,7 +48,7 @@ class OrderController extends Controller {
async create() {
const { ctx, service } = this;
ctx.validate(this.createRule);
let { appKey, userId, notifyUrl, backUrl, orderId } = ctx.request.body;
let { appKey, userId, notifyUrl, redirectUrl, orderId } = ctx.request.body;
ctx.logger.info('【orders】 appKey', appKey);
const appKeyInfo = await service.partner.fetchInfo(appKey);
ctx.logger.info(appKey, ',appKeyInfo,', appKeyInfo);
......@@ -61,7 +61,7 @@ class OrderController extends Controller {
userId: userId || '',
cityId: '',
notifyUrl: notifyUrl || (ctx.app.notifyMap && ctx.app.notifyMap.get(appKey) && ctx.app.notifyMap.get(appKey).notifyUrl) || '',
backUrl: backUrl || '',
backUrl: redirectUrl || '',
appkey: appKey,
status: 'init',
};
......
......@@ -143,6 +143,7 @@ class TaskController extends Controller {
result.taskId = taskId;
result.data = JSON.parse(result.data.data);
result.orderId = orderId;
result.orderSn = orderId;
result.appKey = appkey;
delete result.code;
delete result.msg;
......
......@@ -48,9 +48,9 @@ class OrderService extends Service {
return;
}
}
const { appkey, taskId, notifyUrl, backUrl, userId } = order[0];
const { appkey, taskId, notifyUrl, redirectUrl, userId } = order[0];
if (taskId) {
await ctx.model.TaskStatus.create({ appkey, status: 'init', notifyUrl, backUrl, userId, ...params })
await ctx.model.TaskStatus.create({ appkey, status: 'init', notifyUrl, backUrl: redirectUrl, userId, ...params })
} else {
await order[0].update(params);
}
......
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