修改上报地址
This commit is contained in:
parent
ae63c60c67
commit
b84907d029
@ -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 })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user