From b84907d0290fa309bb5c5155fc403bb196b79fff Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Thu, 10 Aug 2023 11:42:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=B8=8A=E6=8A=A5=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/service/game.svr.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/service/game.svr.ts b/src/service/game.svr.ts index 3b47f7d..6f3f343 100644 --- a/src/service/game.svr.ts +++ b/src/service/game.svr.ts @@ -9,8 +9,11 @@ import { AppleInApp } from 'modules/AppleInApp' import { GoogleInApp } from 'modules/GoogleInApp' export interface IPayResult { + // 渠道返回的productid productId: string + // 游戏服订单id gameOrderId: string + // 渠道返回的订单id orderId: string status: number } @@ -75,7 +78,7 @@ export async function reportApplePurchaseResult(records: IPayResult[]) { } export async function reportPurchaseResult(records: IPayResult[], channel: string) { - const url = `${process.env.GAME_PAY_CB_URL}?a=dispatch&action=inappPurchase` + const url = `${process.env.GAME_PAY_CB_URL}?c=Callback&a=dispatch&action=inappPurchase` let reportData: any = { channel, records, @@ -125,9 +128,9 @@ export async function reportPurchaseResult(records: IPayResult[], channel: strin { reportStatus: 1 }, ) if (channel === 'apple') { - await AppleInApp.updateOne({ id: record.orderId }, { reportStatus: 1 }) + await AppleInApp.updateOne({ outOrderId: record.orderId }, { reportStatus: 1 }) } else if (channel === 'google') { - await GoogleInApp.updateOne({ id: record.orderId }, { reportStatus: 1 }) + await GoogleInApp.updateOne({ outOrderId: record.orderId }, { reportStatus: 1 }) } } }