feat: update README for payment process clarity and enhance success notification button behavior

This commit is contained in:
Danel Kungla
2025-08-11 17:51:35 +03:00
parent 99ba14bab2
commit c3cab7c06d
4 changed files with 16 additions and 13 deletions

View File

@@ -106,9 +106,11 @@ To access admin pages follow these steps:
1. Customer adds analysis to cart in **B2B** storefront
2. Customer checks out from cart and is redirected to **Montonio**
3. Customer pays and is redirected back to **B2B** `GET B2B/home/cart/montonio-callback?order-token=$JWT`
- **Medusa** order is created and cart is emptied
- email is sent to customer
- B2B sends order XML as private message to Medipost.
When **Montonio** has confirmed payment, it will call **Medusa** webhook endpoint and **Medusa** will mark order payment as captured.
In background a job will call `POST B2B/api/job/sync-analysis-results` every n minutes and sync private messages with responses from **Medipost**.

View File

@@ -4,14 +4,11 @@ import { redirect } from 'next/navigation';
import { updateCustomer } from '@lib/data/customer';
import { createAuthApi } from '@kit/auth/api';
import { enhanceAction } from '@kit/next/actions';
import { getSupabaseServerClient } from '@kit/supabase/server-client';
import pathsConfig from '~/config/paths.config';
import { UpdateAccountSchema } from '../../schemas/update-account.schema';
export interface AccountSubmitData {
firstName: string;
lastName: string;

View File

@@ -1,5 +1,5 @@
import Image from 'next/image';
import Link from 'next/link';
import { redirect } from 'next/navigation';
import { MedReportLogo } from '@/components/med-report-logo';
@@ -56,10 +56,11 @@ export const SuccessNotification = ({
</div>
)}
{buttonProps && (
<Button className="mt-8 w-full">
<Link href={buttonProps.href}>
<Button
className="mt-8 w-full"
onClick={() => redirect(buttonProps.href)}
>
<Trans i18nKey={buttonProps.buttonTitleKey} />
</Link>
</Button>
)}
</div>

View File

@@ -0,0 +1,3 @@
grant
execute on function medreport.can_action_account_member (uuid, uuid) to authenticated,
service_role;