From f309b15145bcad93c8131b865ca556c5390f5864 Mon Sep 17 00:00:00 2001 From: RinYato Date: Fri, 11 Oct 2024 11:44:45 +0700 Subject: [PATCH] chore(web): adjust timing in portal --- apps/api/src/task/webhook/tasker.ts | 3 ++- apps/web/src/route/portal/$checkoutId.tsx | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/api/src/task/webhook/tasker.ts b/apps/api/src/task/webhook/tasker.ts index 90e2a1b..b087d95 100644 --- a/apps/api/src/task/webhook/tasker.ts +++ b/apps/api/src/task/webhook/tasker.ts @@ -38,8 +38,9 @@ export class WebhookTasker implements Tasker { const response = await ky .post(job.data.webhookUrl, { retry: 0, - redirect: "error", + redirect: "manual", json: { checkoutId: job.data.checkoutId }, + throwHttpErrors: false, }) .then(ok) .catch(err); diff --git a/apps/web/src/route/portal/$checkoutId.tsx b/apps/web/src/route/portal/$checkoutId.tsx index 3910c22..918bef6 100644 --- a/apps/web/src/route/portal/$checkoutId.tsx +++ b/apps/web/src/route/portal/$checkoutId.tsx @@ -77,7 +77,7 @@ function CheckoutPage() { toast.info("Unable to process your payment.", { id: toastIdRef.current, richColors: true, - duration: 10_000, // 10s + duration: 34_000, // 34s }); setIsProcessing(true); }, 5000); @@ -90,7 +90,7 @@ function CheckoutPage() { ) { const redirectUrl = data.checkout.redirectUrl; const validURL = URL.canParse(redirectUrl); - const delay = 2600; + const delay = 3300; toast.success("Payment successful!", { id: toastIdRef.current,