[package]
name = "monetize-site-buy"
description = "The buy flow a product SITE relays to the ONE monetize: sign-up, private instance, grow, and the ways back from the vendor, behind one provider trait (BuySite) each product implements. The buyer stays on the site; only the pages differ."
# OPEN (owner 2026-10-23): the shared buy flow of Gunnar and Holger. Never in monetize-impl:
# it holds no vendor and no price, only the relay from a site's own pages to monetize's
# Signup / EstateOrder / Purchase services, over the site's own bearer.
version.workspace = true
edition.workspace = true
rust-version.workspace = true
repository = "https://git.gunnar.rs/nordisk/monetize"
license.workspace = true
authors.workspace = true
publish = true
[dependencies]
monetize-proto = { version = "0.3.2", path = "../monetize-proto" }
tonic.workspace = true
axum.workspace = true
serde.workspace = true
serde_json.workspace = true
# The plans pages' ladders are refreshed by a jera ChainQueue job (LADDER-2).
jera = { version = "0.2.1", default-features = false }
anyhow.workspace = true
tokio = { workspace = true, features = ["time"] }
# The audit lines a buy writes (Gunnar's events, by name; never a session id).
tracing = "0.1"
# The fake ONE box (feature `testkit`): a loopback listener for its services.
tokio-stream = { version = "0.1", features = ["net"], optional = true }
[features]
# **A fake ONE box and a fake Stripe** (`testkit`), for the buy flow's tests here and in each
# product site's own (gunnar-ui-server, holger's front). Never in a release build.
testkit = ["tokio/net", "tokio/rt", "dep:tokio-stream"]
[dev-dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "net", "time"] }
tokio-stream = { version = "0.1", features = ["net"] }
tower = { version = "0.5", features = ["util"] }
# The crate's own tests use its fake ONE box.
monetize-site-buy = { path = ".", features = ["testkit"] }