|
@@ -74,14 +74,18 @@ const selected = ref(0)
|
|
|
function buy() {
|
|
function buy() {
|
|
|
const { store, ProductType, Platform } = CdvPurchase
|
|
const { store, ProductType, Platform } = CdvPurchase
|
|
|
store.when().finished(() => {
|
|
store.when().finished(() => {
|
|
|
|
|
+ emit('update:show', false)
|
|
|
getBalance()
|
|
getBalance()
|
|
|
})
|
|
})
|
|
|
- store.validator = uri.resolve(import.meta.env.VITE_HTTP_BASE_URL, '/api/userBalances/recharge/' + user.id)
|
|
|
|
|
|
|
+ store.validator = uri.resolve(import.meta.env.VITE_HTTP_BASE_URL, '/api/userBalances/recharge/' + user.value.id)
|
|
|
// store.validator = 'http://192.168.6.215:3333/api/userBalances/recharge/1'
|
|
// store.validator = 'http://192.168.6.215:3333/api/userBalances/recharge/1'
|
|
|
console.log(products.value[selected.value].id)
|
|
console.log(products.value[selected.value].id)
|
|
|
const product = store.get(products.value[selected.value].id, Platform.GOOGLE_PLAY)
|
|
const product = store.get(products.value[selected.value].id, Platform.GOOGLE_PLAY)
|
|
|
const myTransaction = store.findInLocalReceipts(product)
|
|
const myTransaction = store.findInLocalReceipts(product)
|
|
|
console.log('myTransaction', myTransaction)
|
|
console.log('myTransaction', myTransaction)
|
|
|
|
|
+ if (myTransaction) {
|
|
|
|
|
+ myTransaction.verify()
|
|
|
|
|
+ }
|
|
|
console.log('product', product)
|
|
console.log('product', product)
|
|
|
product.getOffer().order()
|
|
product.getOffer().order()
|
|
|
}
|
|
}
|