Closed judgej closed 8 years ago
The toArray()
and fromArray()
methods can be used in pairs to achieve this. These response messages are built entirely from data returned in a request, so don't rely on other objects to be injected in order to construct them.
JSON serialisation is used throughout, with appropriate items secured from accidental serialisation and logging or display.
Some objects are going to be needed over a number of page loads. For example, the
SessionKeyResponse
object can be used to get a card identifier token for up to three attempts. Once obtained, theCardIdentifierResponse
will be valid for 200 seconds, so can be used to submit a form multiple times (catching validation errors each time). These objects will need to be serialisable so they can be saved and reconstructed on each page load.