commit fc65ecfdaf6c0c0c985d387cf4ad8b8bc52703ae
parent 5ef237c75b7255ea1087a26321aa0aaa1dce7d66
Author: Sebastian <sebasjm@taler-systems.com>
Date: Sun, 3 May 2026 19:54:54 -0300
dont follow redirect when checking payment
Diffstat:
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/contrib/paywall.en.must b/contrib/paywall.en.must
@@ -137,6 +137,7 @@
const res = await fetch(`${origin}/.well-known/paivana`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
+ redirect: "manual",
body: JSON.stringify({ order_id, nonce, cur_time: { t_s: expTime }, website }),
});
if (res.status >= 400) {
@@ -145,7 +146,7 @@
}
const dest = res.redirected ? res.url : website;
await waitMs(400);
- // location.href = dest;
+ location.href = dest;
} catch (e) {
console.warn('[paivana] Error trying to confirm payment:', e);
errorMessage.textContent = I18N_PAYMENT_CONFIRMED_ERROR;
@@ -174,8 +175,8 @@
await confirmPayment(info.order_id);
} else {
talerLink.textContent = I18N_PAYMENT_CONFIRMED_NO_ORDER;
- await waitMs(400);
- // location.href = website;
+ await waitMs(3000);
+ location.href = website;
}
return;
}