The hosted-checkout processor as a port, plus a fake.
Callers above this namespace see schema/CheckoutSession values. The Stripe
adapter needs an SDK and lives behind its own alias in adapters/stripe; any
processor with the same two operations drops in beside it.
The hosted-checkout processor as a port, plus a fake. Callers above this namespace see `schema/CheckoutSession` values. The Stripe adapter needs an SDK and lives behind its own alias in `adapters/stripe`; any processor with the same two operations drops in beside it.
(expire! gateway session-id)Mark a fake session expired, as the processor's clock would.
Mark a fake session expired, as the processor's clock would.
(fake-gateway)(fake-gateway {:keys [base-url] :or {base-url "https://checkout.invalid"}})ICardGateway over an atom. Development, tests, and demos.
pay! and expire! move a session the way a customer or a clock would, so
the card path can be exercised without a processor account.
ICardGateway over an atom. Development, tests, and demos. `pay!` and `expire!` move a session the way a customer or a clock would, so the card path can be exercised without a processor account.
(open-checkout! this checkout)Open a hosted checkout. Returns a CheckoutSession.
checkout is {:checkout/reference :checkout/email :checkout/product
:checkout/currency :checkout/amount :checkout/success-url
:checkout/cancel-url}. :checkout/reference is the invoice id and is
replayed on every notice about this checkout; opening the same reference
twice must yield the same session rather than a second way to pay once.
Open a hosted checkout. Returns a CheckoutSession.
`checkout` is {:checkout/reference :checkout/email :checkout/product
:checkout/currency :checkout/amount :checkout/success-url
:checkout/cancel-url}. `:checkout/reference` is the invoice id and is
replayed on every notice about this checkout; opening the same reference
twice must yield the same session rather than a second way to pay once.(read-checkout this session-id)The hosted checkout as the processor reports it now.
Returns a CheckoutSession, or nil when the processor cannot report on
session-id.
The hosted checkout as the processor reports it now. Returns a CheckoutSession, or nil when the processor cannot report on `session-id`.
(pay! gateway session-id)Mark a fake session paid, as a customer completing checkout would.
Mark a fake session paid, as a customer completing checkout would.
(session-for-reference gateway reference)The fake session opened for reference, or nil.
The fake session opened for `reference`, or nil.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |