diff --git a/pages/API/virtual-payment/virtual-payment.uvue b/pages/API/virtual-payment/virtual-payment.uvue index 52182b006f1e20d250497acb88a6b7a7eab527e8..3d59bb4ccdddbfef68c58d20a0bb3c8ccfc84163 100644 --- a/pages/API/virtual-payment/virtual-payment.uvue +++ b/pages/API/virtual-payment/virtual-payment.uvue @@ -2,7 +2,7 @@ - + requestVirtualPayment api 适用于消耗性类型、非消耗性类型、自动续期订阅类型、非自动续期订阅类型产品的购买。\n\n @@ -131,22 +131,22 @@ }, success: (res) => { uni.hideLoading() - console.log("购买成功:该productId= " + res.apple?.payment.productId) + console.log("购买成功:该productId= " + res.apple?.productId) //TODO: 开发者server验证逻辑 //经过开发者server验证成功后请结束该交易 uni.showToast({ - title: "购买成功:" + res.apple?.payment.productId, + title: "购买成功:" + res.apple?.productId, icon: 'success' }) this.virtualPaymentContext.finishTransaction({ transaction: res.apple, success: (r) => { - console.log("关单成功, 该productId= " + res.apple?.payment.productId) + console.log("关单成功, 该productId= " + res.apple?.productId) }, fail: (e) => { - console.log("关单失败, 该productId= " + res.apple?.payment.productId) + console.log("关单失败, 该productId= " + res.apple?.productId) } }) }, @@ -174,7 +174,7 @@ //TODO: 开发者server验证逻辑 - console.log("restore成功的交易productId= " + transaction.payment.productId) + console.log("restore成功的交易productId= " + transaction.productId) }) uni.showToast({ title: "restore成功的交易个数:" + res.transactions.length, @@ -203,7 +203,7 @@ console.log("获取未结束的订单列表个数:" + res.transactions.length) res.transactions.forEach(transaction => { - console.log("getUnfinishedTransactions成功的交易productId= " + transaction.payment.productId) + console.log("getUnfinishedTransactions成功的交易productId= " + transaction.productId) //TODO: 开发者server验证逻辑 uni.showToast({ @@ -214,10 +214,10 @@ this.virtualPaymentContext.finishTransaction({ transaction: transaction, success: (r) => { - console.log("关单成功, 该productId= " + transaction.payment.productId) + console.log("关单成功, 该productId= " + transaction.productId) }, fail: (e) => { - console.log("关单失败, 该productId= " + transaction.payment.productId) + console.log("关单失败, 该productId= " + transaction.productId) } }) })