支付协议修改
This commit is contained in:
@@ -41,9 +41,9 @@ export class PaymentPoller {
|
||||
this.currentPollCount++;
|
||||
// 查询
|
||||
let reqData = {orderId: orderId};
|
||||
console.log("第 ", this.currentPollCount, " 次轮询订单的请求数据:", reqData);
|
||||
console.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的请求数据:", reqData);
|
||||
const r = await PaymentApi.I.queryOrder(reqData);
|
||||
console.log("第 ", this.currentPollCount, " 次轮询订单的响应数据:", r);
|
||||
console.log("订单:", orderId, " ,第 ", this.currentPollCount, " 次轮询订单的响应数据:", r);
|
||||
if (r.code === proto.cs.EnmRetCode.SUCCESS && r.data) {
|
||||
// 回调
|
||||
onTick?.(r.data);
|
||||
|
||||
@@ -32,6 +32,7 @@ export class PaymentService {
|
||||
/** 发起支付:创建订单→打开URL→回到App后开始轮询 */
|
||||
async startPayment(req: proto.cs.ICSCreateOrderReq, open: OpenStrategy = "system"): Promise<proto.cs.ICSQueryOrderRes> {
|
||||
// 下单
|
||||
console.log("创建订单的请求数据:", req);
|
||||
const create = await PaymentApi.I.createOrder(req);
|
||||
console.log("创建订单的响应数据:", create);
|
||||
if (create.code !== proto.cs.EnmRetCode.SUCCESS || !create.data) {
|
||||
|
||||
@@ -128,7 +128,7 @@ export class PurchasePanel extends li_BaseView {
|
||||
const isRechargeId = shopData.isRechargeId(id);
|
||||
if (isRechargeId) {
|
||||
// 需要外部支付进行购买
|
||||
this.startPayment(id, proto.cs.EnmPayType.EPT_Cash_INR, 0);
|
||||
this.startPayment(id, proto.cs.EnmPayType.EPT_Cash_INR, proto.cs.EnmNetworkType.ENT_TRON);
|
||||
} else {
|
||||
//是u币充值,打开页面
|
||||
NavigationManager.Instance.openSubPanel("Web3PopPanel", this.node);
|
||||
|
||||
Reference in New Issue
Block a user