alpha
Login
or
Join now
lgtm.shop
/
commerce
Star
5
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Pilot atproto-native commerce backend
Star
5
Fork
0
Atom
Configure Feed
Issues
Pull Requests
Commits
Tags
Feed URL
Select the types of activity you want to include in your feed.
Overview
Issues
Pulls
Pipelines
commerce
/
crates
/
integrations
/
src
/
at
main
6 files
Nate Moore
fix(stripe): make automatic tax opt-in (was hardcoded on, broke checkout)
3d ago
f9c5db10
error.rs
fix(stripe): make automatic tax opt-in (was hardcoded on, broke checkout) Prod checkout returned 502 for every order: the handler forwards a valid session to Stripe, but the form hardcoded automatic_tax[enabled]=true, and Stripe rejects the session with a 400 ("You must have a valid head office address to enable automatic tax") unless the account has a head-office address + tax registrations. (The v0.3.1 error mapping surfaced this cleanly in the logs — it is a Stripe account-config requirement, not a crash.) Gate automatic tax behind LGTM_STRIPE_AUTOMATIC_TAX=1 (config_for["stripe"] ["automatic_tax"]), default off, so the reference impl creates checkout sessions without requiring Stripe Tax setup. Extract checkout_form() so the form (incl. the on/off tax field + non-empty product name + redirect URLs) is unit-tested.
3 days ago
files.rs
feat(core): route fulfillment webhooks + Printful URL-token auth - Registry::fulfillment_by_id resolves a fulfillment provider by integration id. - Integration::verify_webhook gains a query: &str param so each provider owns its auth (Stripe: signature header; Printful: URL token). - Printful does not sign webhooks (confirmed against developers.printful.com), so drop the invented x-printful-signature HMAC and authenticate via a shared token in the registered webhook URL (?token=<secret>), constant-time compared.
5 days ago
lib.rs
feat(integrations): printful catalog types + response parsers
5 days ago
printful.rs
fix(checkout): make real Stripe checkout succeed (was a bare 400 for every order) With fake-payments off, every POST /api/checkout returned an empty-body 400. The real Stripe path could never succeed: place_order sent empty success_url/ cancel_url and DbVariantLookup left product_uri (used as the Stripe line-item name) empty. Stripe rejects both, and the handler swallowed the error with a bare `Err(_) => 400`, making it undebuggable from the storefront. - Thread configurable redirect URLs through place_order. New optional env vars LGTM_CHECKOUT_SUCCESS_URL / LGTM_CHECKOUT_CANCEL_URL, defaulting to {public_url}/checkout/success?session_id={CHECKOUT_SESSION_ID} and {public_url}/cart. - DbVariantLookup joins product for the real at_uri + title; carry a display name through VariantInfo -> DraftLine -> OrderItem to the Stripe line item (fallback title -> SKU -> "Item"). Name is a checkout-time snapshot, not persisted in P1. - Map checkout errors: validation/currency/not-found -> descriptive 400; missing key / provider rejection -> logged in full + generic 502, never a bare empty 400. Tests: place_order fake now asserts non-empty URLs + names are forwarded; DbVariantLookup join covered (title + SKU fallback); config default/override.
4 days ago
printful_catalog.rs
fix(integrations): keep HTTP status in printful catalog client errors
5 days ago
stripe.rs
fix(stripe): make automatic tax opt-in (was hardcoded on, broke checkout) Prod checkout returned 502 for every order: the handler forwards a valid session to Stripe, but the form hardcoded automatic_tax[enabled]=true, and Stripe rejects the session with a 400 ("You must have a valid head office address to enable automatic tax") unless the account has a head-office address + tax registrations. (The v0.3.1 error mapping surfaced this cleanly in the logs — it is a Stripe account-config requirement, not a crash.) Gate automatic tax behind LGTM_STRIPE_AUTOMATIC_TAX=1 (config_for["stripe"] ["automatic_tax"]), default off, so the reference impl creates checkout sessions without requiring Stripe Tax setup. Extract checkout_form() so the form (incl. the on/off tax field + non-empty product name + redirect URLs) is unit-tested.
3 days ago