支付:修复支付测试bug
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { Application, BackendSession, HandlerService, } from 'pinus';
|
||||
import { genCode, resResult } from '../../../pubUtils/util';
|
||||
import { ACTIVITY_TYPE, DEBUG_MAGIC_WORD, ORDER_STATE, PAY_TYPE, STATUS, TASK_TYPE, TA_EVENT } from '../../../consts';
|
||||
import { ACTIVITY_TYPE, DEBUG_MAGIC_WORD, DEBUG_PRICE, ORDER_STATE, PAY_TYPE, STATUS, TASK_TYPE, TA_EVENT } from '../../../consts';
|
||||
import { dicRMB } from '../../../pubUtils/dictionary/DicRMB';
|
||||
import { UserOrderModel } from '../../../db/UserOrder';
|
||||
import _ = require('underscore');
|
||||
@@ -12,6 +12,7 @@ import { addRechargeMoney } from '../../../services/activity/rechargeMoneyServic
|
||||
import { addVipRechargeMoney } from '../../../services/activity/vipRechargeMoneyService';
|
||||
import { getActivityById } from '../../../services/activity/activityService';
|
||||
import { reportTAEvent } from '../../../services/sdkService';
|
||||
import { gameData } from '../../../pubUtils/data';
|
||||
|
||||
export default function (app: Application) {
|
||||
new HandlerService(app, {});
|
||||
@@ -112,6 +113,9 @@ export class orderHandler {
|
||||
reportTAEvent(roleId, TA_EVENT.RECHARGE, {
|
||||
pay_id: localOrderID, chargeId: productID, pay_name: message, pay_amount: price, pay_channel: payType
|
||||
}, ip)
|
||||
if(gameData.serverConst.DEBUG_PAY == 1) {
|
||||
productInfo = {...productInfo, price: DEBUG_PRICE}
|
||||
}
|
||||
return resResult(STATUS.SUCCESS, { orderInfo: sdkOrderInfo, productInfo, localOrderID });
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { UserOrderModel, UserOrderModelType } from '../db/UserOrder';
|
||||
import { ACTIVITY_TYPE, ORDER_STATE, PAY_TYPE, PUSH_ROUTE, REFUND_PRICE_TO_GOLD, STATUS, TASK_TYPE, TA_EVENT, TA_USERSET_TYPE } from '../consts';
|
||||
import { ACTIVITY_TYPE, DEBUG_PRICE, ORDER_STATE, PAY_TYPE, PUSH_ROUTE, REFUND_PRICE_TO_GOLD, STATUS, TASK_TYPE, TA_EVENT, TA_USERSET_TYPE } from '../consts';
|
||||
import { dicRMB } from '../pubUtils/dictionary/DicRMB';
|
||||
import { makeYuanbaoShopReward } from './activity/yuanbaoService';
|
||||
import { RoleModel } from '../db/Role';
|
||||
@@ -32,6 +32,7 @@ import { recordFirstGift } from './activity/firstGiftService';
|
||||
import { makeTaskPass } from './activity/taskPassService';
|
||||
import { addGuildPay } from './activity/guildPayService';
|
||||
import { sendMessageToUserWithSuc } from './pushService';
|
||||
import { gameData } from '../pubUtils/data';
|
||||
|
||||
export async function checkOrderCanBuy(roleId: string, serverId: number, activityData: ActivityModelType, productID: string, paramStr: string) {
|
||||
let activityId = activityData.activityId;
|
||||
@@ -277,7 +278,7 @@ export async function settleOrderFromRedisPub(message: string) {
|
||||
console.log('订单玩家错误');
|
||||
return false;
|
||||
}
|
||||
if(order.price != parseFloat(params.money)) {
|
||||
if((gameData.serverConst.DEBUG_PAY != 1 && order.price != parseFloat(params.money))||(gameData.serverConst.DEBUG_PAY == 1 && parseFloat(params.money) != DEBUG_PRICE)) {
|
||||
console.log('订单金额错误');
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SDK_37_CONST, STATUS } from "../../consts";
|
||||
import { DEBUG_PRICE, SDK_37_CONST, STATUS } from "../../consts";
|
||||
import { RoleModel } from "../../db/Role";
|
||||
import { UserModel } from "../../db/User";
|
||||
import { LoginValidateData37 } from "../../domain/sdk";
|
||||
@@ -40,7 +40,7 @@ export async function applyOrder37(localOrderID: string, roleId: string, product
|
||||
ext
|
||||
}
|
||||
if(gameData.serverConst.DEBUG_PAY == 1) {
|
||||
body = {...body, money: 0.1}
|
||||
body = {...body, money: DEBUG_PRICE}
|
||||
}
|
||||
|
||||
let sign = get37Md5SignA(body, SDK_37_CONST.PAY_KEY);
|
||||
|
||||
Reference in New Issue
Block a user