9 Issuance evidence verification
| (require commerce/evidence) | package: commerce |
Server processes explicitly require commerce/evidence. The evidence verifier re-checks that a journal record actually proves the commercial identity an outbox row claims before signing: catalog and claim match, binding amounts match, and channel-native evidence is verified again — independently of the webhook edge that accepted it.
procedure
(make-issuance-evidence-verifier #:catalog catalog [ #:alipay-public-key-pem alipay-public-key-pem #:alipay-app-id alipay-app-id #:alipay-seller-id alipay-seller-id #:pancake-keyring pancake-keyring #:binding-lookup binding-lookup]) → issuance-evidence-verifier? catalog : permit-policy-catalog? alipay-public-key-pem : (or/c string? #f) = #f alipay-app-id : (or/c string? #f) = #f alipay-seller-id : (or/c string? #f) = #f
pancake-keyring : pancake-webhook-keyring? = (default-pancake-webhook-keyring) binding-lookup : (or/c procedure? #f) = #f
Binds the pinned catalog and the channel verification material behind one
opaque verifier. Signed-return reconciliation additionally requires both trusted
Alipay app and seller identifiers; missing merchant identity refuses that
evidence source before signing. Existing notification/refund paths are unchanged.
procedure
(issuance-evidence-verifier? value) → boolean?
value : any/c
Recognizes one opaque evidence verifier.
procedure
(verify-issuance-evidence! verifier record claimed-offer-id claimed-subject-id [ #:require-paid-time? require-paid-time?]) → symbol? verifier : issuance-evidence-verifier? record : journal-record? claimed-offer-id : string? claimed-subject-id : string? require-paid-time? : boolean? = #f
Re-verifies the journaled evidence for one claimed Offer and subject.
Returns 'verified. Calendar issuers pass #t for
#:require-paid-time?, binding the signed Alipay payment timestamp and
merchant identity; providers without equivalent paid-time verification refuse.
Mismatched fields, forged bytes, and failed channel re-verification raise
typed exn:fail:commerce refusals before any signing happens.