Validator for PaymentMandate entities
private
readonly
config: ValidationConfig
private
readonly
contentsValidator: PaymentMandateContentsValidator
checkExpiry(paymentMandate: PaymentMandate,currentDate?: Date,): Promise<boolean>
Check if PaymentMandate has expired (through its contents timestamp)
validate(paymentMandate: PaymentMandate): Promise<ValidationResult>
Validate PaymentMandate by delegating to contents validation
validateIntegrity(paymentMandate: PaymentMandate): Promise<ValidationResult>
Validate the integrity of PaymentMandate by checking required fields
validateTransactionHashes(paymentMandate: PaymentMandate,expectedCartMandateHash?: string,expectedPaymentMandateHash?: string,): Promise<ValidationResult>
Validate that user_authorization contains expected transaction hashes
private
validateUserAuthorizationFormat(userAuth: string): ValidationResult
Validate user_authorization JWT format
checkExpiry(paymentMandate: PaymentMandate,currentDate?: Date,): Promise<boolean>
Static method to check PaymentMandate expiry with default config
validate(paymentMandate: PaymentMandate): Promise<ValidationResult>
Static method to validate PaymentMandate with default config
validateIntegrity(paymentMandate: PaymentMandate): Promise<ValidationResult>
Static method to validate PaymentMandate integrity with default config
withConfig(config: ValidationConfig): PaymentMandateValidator
Create a validator with custom configuration