提交 0ec8bbec 编写于 作者: zhaofengliang920817's avatar zhaofengliang920817

调整virtual-payment 示例。#3843

上级 01f32162
......@@ -135,6 +135,11 @@
//TODO: 开发者server验证逻辑
//经过开发者server验证成功后请结束该交易
uni.showToast({
title: "购买成功:" + res.apple?.payment.productId,
icon: 'success'
})
this.virtualPaymentContext.finishTransaction({
transaction: res.apple,
success: (r) => {
......@@ -144,10 +149,6 @@
console.log("关单失败, 该productId= " + res.apple?.payment.productId)
}
})
uni.showToast({
title: "购买成功:" + res.apple?.payment.productId,
icon: 'error'
})
},
fail: (e) => {
uni.hideLoading()
......@@ -177,7 +178,7 @@
})
uni.showToast({
title: "restore成功的交易个数:" + res.transactions.length,
icon: 'error'
icon: 'success'
})
},
fail: (e) => {
......@@ -205,6 +206,10 @@
console.log("getUnfinishedTransactions成功的交易productId= " + transaction.payment.productId)
//TODO: 开发者server验证逻辑
uni.showToast({
title: "获取未结束的订单列表个数:" + res.transactions.length,
icon: 'success'
})
//经过开发者server验证成功后请结束该交易
this.virtualPaymentContext.finishTransaction({
transaction: transaction,
......@@ -216,11 +221,6 @@
}
})
})
uni.showToast({
title: "获取未结束的订单列表个数:" + res.transactions.length,
icon: 'error'
})
},
fail: (e) => {
uni.hideLoading()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册