支付协议修改
This commit is contained in:
@@ -9,6 +9,8 @@ import PaymentPoller from "./PaymentPoller";
|
||||
import proto from 'db://assets/Scripts/proto/proto.pb.js';
|
||||
import { DataManager, DataId } from "db://assets/Scripts/chat18x/data/DataManager";
|
||||
import { OrderData } from "db://assets/Scripts/chat18x/data/OrderData";
|
||||
import Utils from "../../Main/Common/Utils";
|
||||
import { InnerMsgCode } from "../../Main/Config/InnerMsgCode";
|
||||
|
||||
export class PaymentService {
|
||||
private static _I: PaymentService | null = null;
|
||||
@@ -29,6 +31,9 @@ export class PaymentService {
|
||||
const orderData = DataManager.I.getDataById<OrderData>(DataId.Order);
|
||||
orderData.saveOrderData(create.data);
|
||||
|
||||
// 发出事件,支付订单创建成功
|
||||
Utils.sendInnerMsg(InnerMsgCode.PayOrderCreateSucc, { orderId: orderId });
|
||||
|
||||
// 打开支付页
|
||||
await PaymentOpenerFactory.create(open).open(payUrl);
|
||||
|
||||
|
||||
@@ -16,6 +16,12 @@ export type OrderStatus =
|
||||
export interface OrderVO {
|
||||
orderId: string;
|
||||
payUrl: string;
|
||||
payType: number;
|
||||
network: number;
|
||||
wallet: string;
|
||||
amount: string;
|
||||
expire: number;
|
||||
expireUnix: string;
|
||||
status: OrderStatus;
|
||||
retCode: number; // 失败时的原因码
|
||||
createdAt: number;
|
||||
|
||||
Reference in New Issue
Block a user