feat(MED-131): move medipost xml logic to service

This commit is contained in:
2025-08-04 12:49:03 +03:00
parent 853bd75119
commit b2003ad30d
3 changed files with 46 additions and 50 deletions

View File

@@ -108,9 +108,8 @@ To access admin pages follow these steps:
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
4. When **Montonio** has confirmed payment, it will call **Medusa** webhook endpoint and **Medusa** will mark order payment as captured.
**Medusa** sends `POST B2B/api/order/medipost-create` with `medusaOrderId`. B2B sends order XML as private message to Medipost.
This could possibly later happen on montonio-callback URL also but currently not possible in Medusa
- 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**.