Added intervals
for funding sources without subscriptions
This commit is contained in:
parent
d3bc33df51
commit
5cce3e9043
1 changed files with 4 additions and 0 deletions
|
|
@ -129,11 +129,13 @@ function received() {
|
||||||
colorLight: '#ffffff',
|
colorLight: '#ffffff',
|
||||||
correctLevel: QRCode.CorrectLevel.M
|
correctLevel: QRCode.CorrectLevel.M
|
||||||
})
|
})
|
||||||
|
setInterval(function(){
|
||||||
getAjax('/v1/invoice/' + thehash, wallet.inkey, function(datab) {
|
getAjax('/v1/invoice/' + thehash, wallet.inkey, function(datab) {
|
||||||
console.log(JSON.parse(datab).PAID)
|
console.log(JSON.parse(datab).PAID)
|
||||||
if (JSON.parse(datab).PAID == 'TRUE') {
|
if (JSON.parse(datab).PAID == 'TRUE') {
|
||||||
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
|
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
|
||||||
}
|
}
|
||||||
|
})}, 3000);
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
@ -150,11 +152,13 @@ function sendfunds(invoice) {
|
||||||
JSON.stringify({payment_request: invoice}),
|
JSON.stringify({payment_request: invoice}),
|
||||||
wallet.adminkey,
|
wallet.adminkey,
|
||||||
function(data) {
|
function(data) {
|
||||||
|
setInterval(function(){
|
||||||
thehash = JSON.parse(data).payment_hash
|
thehash = JSON.parse(data).payment_hash
|
||||||
console.log(JSON.parse(data))
|
console.log(JSON.parse(data))
|
||||||
if (JSON.parse(data).PAID == 'TRUE') {
|
if (JSON.parse(data).PAID == 'TRUE') {
|
||||||
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
|
window.location.href = 'wallet?wal=' + wallet.id + '&usr=' + user
|
||||||
}
|
}
|
||||||
|
})}, 3000);
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue