8 Provider admission
| (require commerce/admission) | package: commerce |
Server processes explicitly require commerce/admission. A provider admission record is the reviewed, file-carried permission that turns configured channel credentials into an authorized checkout: no admission, no checkout, even with valid keys.
procedure
(provider-admission? value) → boolean?
value : any/c
Recognizes one read admission record.
procedure
path : path-string?
Reads and validates one admission record. Missing, oversized, malformed,
duplicate-key, or unapproved records refuse before any network call or
database checkout binding is made.
procedure
(authorize-provider-checkout! admission #:provider provider #:environment environment #:merchant-app-id app #:seller-id seller #:product-id product #:offer-id offer #:payment-method method #:transaction-type transaction #:amount amount [ #:at now]) → void? admission : provider-admission? provider : string? environment : (or/c "sandbox" "production") app : string? seller : string? product : string? offer : string? method : string? transaction : string? amount : money? now : exact-nonnegative-integer? = (current-seconds)
Checks the checkout request against the admission record — provider,
environment, app, seller, product, offer, payment method, transaction type,
and amount bounds — and refuses with a typed exn:fail:commerce
before any provider call when anything is outside the approved record.