Skip to content

fix(DF-830): change preview banner text when notification email is not set. #397

Open
mokhld wants to merge 8 commits into
mainfrom
feat/df-830-payment-v2-designer-fixes
Open

fix(DF-830): change preview banner text when notification email is not set. #397
mokhld wants to merge 8 commits into
mainfrom
feat/df-830-payment-v2-designer-fixes

Conversation

@mokhld
Copy link
Copy Markdown
Contributor

@mokhld mokhld commented May 12, 2026

Proposed change

Payment-only forms can now submit through GOV.UK Pay without a notification email being set on the form metadata. The summary controller routes the no-email path through PaymentField onSubmit (preauth/redirect) only, instead of skipping submission entirely.

Impact

  1. Impact on active users

For the in-memory cache, the cache is stored in the server’s memory, so it is cleared every time the server restarts, including during a deployment. Active users will simply trigger a cache miss on their next request, which causes the server to rebuild the form model with the new key. No data is lost because user answers are stored in the session, not in the model cache.

For Redis cache, the old keys, for example formId_live_false, will remain until they expire. New requests will generate the new keys, for example formId_live_false_email@ref.com. This creates a one-time cache miss for existing users, which is safe.

  1. Save and exit

Save and Exit persists the user’s answers, or state, to the Submission API. It does not store the cache key itself. When a user clicks a resume link, the Runner fetches the latest form metadata, including the current notificationEmail, and then asks the Engine to resolve the model.

The Engine generates the new cache key based on that latest metadata. Whether the user saved their progress before or after this change was merged is irrelevant to the resumption process.

  1. Submission API

The notificationEmail is sent to the Submission API at the point the user submits the form. By including the email in the cache key, we have increased reliability.

Previously, if a form was cached and the notification email was then changed in Designer, the Engine might have used the old cached model with the old email during submission. Now, a change in the email address forces a cache bust.

Jira ticket: DF-830

Type of change

  • Bug fix
  • New feature
  • Breaking change
  • Misc. (documentation, build updates, etc)

Checklist

  • You have executed this code locally and it performs as expected.
  • You have added tests to verify your code works.
  • You have added code comments and JSDoc, where appropriate.
  • There is no commented-out code.
  • You have added developer docs in README.md and docs/* (where appropriate, e.g. new features).
  • The tests are passing (npm run test).
  • The linting checks are passing (npm run lint).
  • The code has been formatted (npm run format).

@mokhld mokhld changed the title fix(payment): allow GOV.UK Pay submission without notification email fix(DF-830): allow GOV.UK Pay submission without notification email May 12, 2026
@mokhld mokhld changed the title fix(DF-830): allow GOV.UK Pay submission without notification email fix(DF-830): change preview banner text when notification email is not set. May 14, 2026
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant