Class for PaymentMandate with user authorization functionality
new
PaymentMandateClass(data: PaymentMandate,contentsClass: PaymentMandateContentsClass,options?: { id?: string; createdAt?: Date; status?: MandateStatus; },)
private
validator: PaymentMandateValidator
Get payment mandate contents class
getUserAuthorization(): string | undefined
Get user authorization token
hasUserAuthorization(): boolean
Check if mandate has user authorization
isSigned(): boolean
Check if mandate is signed (overrides base class for user auth support)
setUserAuthorization(userAuthorization: string): void
Set user authorization (SD-JWT-VC) This would typically be done by a wallet or user agent
toString(): string
protected
validate(): Promise<void>
verifyUserAuthorization(expectedCartMandateHash?: string,expectedPaymentMandateHash?: string,): Promise<boolean>
Verify user authorization token with transaction hashes
createNew(data: PaymentMandate,options?: { id?: string; createdAt?: Date; status?: MandateStatus; },): Promise<PaymentMandateClass>
Create a new PaymentMandate instance
fromExisting(data: PaymentMandate,options?: { validateUserAuth?: boolean; expectedCartMandateHash?: string; expectedPaymentMandateHash?: string; },): Promise<PaymentMandateClass>
Create from existing payment mandate with user authorization