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) {
|
if (!url) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
let finalUrl = url.replace(`%[invoice]`, invoice)
|
let finalUrl = url.replace(`%[invoice]`, invoice).replace(`%[amount]`, amount.toString())
|
||||||
finalUrl = finalUrl.replace(`%[amount]`, amount.toString())
|
|
||||||
if (other) {
|
if (other) {
|
||||||
for (const [key, value] of Object.entries(other)) {
|
for (const [key, value] of Object.entries(other)) {
|
||||||
finalUrl = url.replace(`%[${key}]`, value)
|
finalUrl = finalUrl.replace(`%[${key}]`, value)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const symbol = url.includes('?') ? "&" : "?"
|
const symbol = finalUrl.includes('?') ? "&" : "?"
|
||||||
finalUrl = finalUrl + symbol + "ok=true"
|
finalUrl = finalUrl + symbol + "ok=true"
|
||||||
log("sending paid callback to", finalUrl)
|
log("sending paid callback to", finalUrl)
|
||||||
await fetch(finalUrl)
|
await fetch(finalUrl)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue