libretech d56ae43597 feat(checkout): capture a payment through injected dependencies
capturePayment(deps, { uuid, paypalOrderId, now }) is the capture flow
without Strapi or the PayPal SDK, so it is tested with fakes:

- a missing order is answered 404;
- a paid order is answered alreadyCaptured for the PayPal order it was
  paid with, else 409, without a call or a write;
- a PayPal order the checkout did not store on the order is answered
  409 before PayPal is asked anything;
- a PayPal order that does not verify as approved for the order is
  answered 409 without a capture;
- the capture is sent with the PayPal-Request-Id
  capture-<uuid>-<paypalOrderId>, so a retry captures once;
- a capture that does not verify leaves the order unpaid, is logged as
  an error with the order id and the reason, and is answered 502: PayPal
  may have taken the money, so it needs a manual refund check;
- the payment is written only while the order still carries the PayPal
  order id, so an order whose cart or address changed during the
  capture stays unpaid (409, logged with the capture id);
- PayPal and network errors are answered 502 and logged by name,
  message and status code only.

Refs libretech/mp#71
2026-10-09 01:12:20 +02:00

libreshop/cms

Strapi-based content backend (catalogue, orders, customers).

Part of the libreshop toolkit. Image published at git.librete.ch/libreshop/cms on every push to main and on v* tags.

Source

This repo was extracted from mp/cms/ on 2026-04-29; mp was the first concrete adapter consuming the toolkit. mp's compose.yml now pulls git.librete.ch/libreshop/cms:<pin> instead of building locally.

Build locally

docker build -t libreshop/cms:dev .

Adapter contract

See docker-entrypoint.sh and Dockerfile for the runtime surface. Adapters configure the component via env vars and bind-mounted volumes; do not patch the running container or rely on internal paths.

S
Description
libreshop/cms — Strapi-based content backend
Readme
316 KiB
0 Stars 2 Watchers 0 Forks
Languages
TypeScript 95%
Shell 4.4%
JavaScript 0.4%
Dockerfile 0.2%