Skip to content

Add validation functionality #4

@judgej

Description

@judgej

A means to validate and to transform data (into valid formats) is needed to provide a robust working environment.

Some items, such as basket descriptions, can be truncated and have invalid characters removed, and stuff will still work as expected. Other fields cannot be transformed (munged) in this way, and need to result in a failed payment request so that remedial action can be taken.

The validation actually needs to happen before anything is submitted to SagePay, as the error responses we get back are not technically useful (e.g. they don't make it easy to identify the incorrect field - "the basket format is invalid" is one cringe-worthy example than can mean anything and SagePay will halt at the first error it finds and report only that one error. If every field on my submitted address is invalid, I would want to know about all of them and not have to submit the form once for each error and slowly work through them).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions