diff --git a/assets/Scripts/chat18x/payment/PaymentService.ts b/assets/Scripts/chat18x/payment/PaymentService.ts index d9baac96..8a08d363 100644 --- a/assets/Scripts/chat18x/payment/PaymentService.ts +++ b/assets/Scripts/chat18x/payment/PaymentService.ts @@ -50,6 +50,7 @@ export class PaymentService { Utils.sendInnerMsg(InnerMsgCode.PayOrderCreateSucc, { orderId: orderId, payType: req.payType,goodId:req.goodId }); // 分发流程 + logger.log("选择支付分发流程:", payMethod); const flow = this.flowMap.get(payMethod); return flow?.run(orderId, payUrl, open) ?? null; } diff --git a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts index 16176949..ee8c9ffc 100644 --- a/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts +++ b/assets/Scripts/chat18x/ui/panels/PurchasePanel.ts @@ -178,6 +178,20 @@ export class PurchasePanel extends li_BaseView { } } + // 获取支付方式 + getPaymentMethod(): PaymentMethod { + if (this.currentPayType === proto.cs.EnmPayType.EPT_Cash_INR) { + // 现金支付 + return PaymentMethod.CashPay; + } else if (this.currentPayType === proto.cs.EnmPayType.EPT_WEB3_USD) { + // Web3支付 + return PaymentMethod.Web3; + } else { + // Web3支付 + return PaymentMethod.Web3; + } + } + purchaseGood(id: number, networkType: proto.cs.EnmNetworkType) { const shopData = DataManager.I.getDataById(DataId.Shop); const isRechargeId = shopData.isRechargeId(id); @@ -187,7 +201,7 @@ export class PurchasePanel extends li_BaseView { id, this.currentPayType, networkType, - PaymentMethod.CashPay + this.getPaymentMethod() ); } //测试用