活动:支付添加错误码返回
This commit is contained in:
@@ -178,14 +178,18 @@ export class orderHandler {
|
||||
|
||||
//结算奖励
|
||||
let result = await makeOrder(localOrderID, sid, orderInfo);
|
||||
if (result.code !== 0) {//结算失败
|
||||
console.log(`测试支付失败..... ${JSON.stringify(result)}`)
|
||||
return resResult(result);
|
||||
}
|
||||
//推送
|
||||
this.app.channelService.pushMessageByUids('onOrder', resResult(STATUS.SUCCESS, {
|
||||
data: result,
|
||||
data: result.data,
|
||||
}), [{ uid: roleId, sid: sid }]);
|
||||
//活动统计
|
||||
await addRechargeMoney(roleId, serverId, price);
|
||||
console.log('结算完成', localOrderID)
|
||||
return resResult(STATUS.SUCCESS, result);
|
||||
return resResult(STATUS.SUCCESS, result.data);
|
||||
}
|
||||
|
||||
return resResult(STATUS.DUPLICATE_ORDER);
|
||||
@@ -243,14 +247,18 @@ export class orderHandler {
|
||||
if (orderInfo) {
|
||||
//结算奖励
|
||||
let result = await makeOrder(localOrderID, sid, orderInfo);
|
||||
if (result.code !== 0) {//结算失败
|
||||
console.log(`测试支付失败..... ${JSON.stringify(result)}`)
|
||||
return resResult(result);
|
||||
}
|
||||
//推送
|
||||
this.app.channelService.pushMessageByUids('onOrder', resResult(STATUS.SUCCESS, {
|
||||
data: result,
|
||||
data: result.data,
|
||||
}), [{ uid: roleId, sid: sid }]);
|
||||
//活动统计
|
||||
await addRechargeMoney(roleId, serverId, price);
|
||||
console.log(`测试支付完成!!!!!!!!!!!!! serverId:${serverId}, productID:${productID}, productType:${productType}, roleId:${roleId}, localOrderID:${localOrderID}, payType:${payType}`)
|
||||
return resResult(STATUS.SUCCESS, result);
|
||||
return resResult(STATUS.SUCCESS, result.data);
|
||||
}
|
||||
|
||||
return resResult(STATUS.NO_ORDER, {});
|
||||
|
||||
Reference in New Issue
Block a user