fix
This commit is contained in:
parent
fa8a8272d7
commit
272cb38f1a
1 changed files with 3 additions and 4 deletions
|
|
@ -242,15 +242,14 @@ export default class {
|
|||
if (!url) {
|
||||
return
|
||||
}
|
||||
let finalUrl = url.replace(`%[invoice]`, invoice)
|
||||
finalUrl = finalUrl.replace(`%[amount]`, amount.toString())
|
||||
let finalUrl = url.replace(`%[invoice]`, invoice).replace(`%[amount]`, amount.toString())
|
||||
if (other) {
|
||||
for (const [key, value] of Object.entries(other)) {
|
||||
finalUrl = url.replace(`%[${key}]`, value)
|
||||
finalUrl = finalUrl.replace(`%[${key}]`, value)
|
||||
}
|
||||
}
|
||||
try {
|
||||
const symbol = url.includes('?') ? "&" : "?"
|
||||
const symbol = finalUrl.includes('?') ? "&" : "?"
|
||||
finalUrl = finalUrl + symbol + "ok=true"
|
||||
log("sending paid callback to", finalUrl)
|
||||
await fetch(finalUrl)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue