Skip to content

PP-15812 Fix Adyen payment normalisation error - #4106

Merged
alexbishop1 merged 1 commit into
masterfrom
PP-15812_fix_adyen_normalisation_error
Sep 1, 2026
Merged

alexbishop1 merged 1 commit into
masterfrom
PP-15812_fix_adyen_normalisation_error

Conversation

@alexbishop1

Copy link
Copy Markdown
Contributor

Fix error normalising entered payment data when making an Adyen payment introduced by commit 81c1c66.

The error was caused by the client-side JavaScript adding a duplicate hidden form field with the name jsEnabled, which Node.js handles by combining the two values into an object, which means it’s not a string when later code tries to trim it.

Fix the problem by making sure that there is only one jsEnabled hidden form field (or js_enabled JSON property in the case of Google Pay payments). Enhance the existing Cypress test that tests these hidden form fields by making it submit the form to ensure they’re actually processed correctly on the server side.

Fix error normalising entered payment data when making an Adyen
payment introduced by commit
81c1c66.

The error was caused by the client-side JavaScript adding a
duplicate hidden form field with the name jsEnabled, which
Node.js handles by combining the two values into an object, which
means it’s not a string when later code tries to trim it.

Fix the problem by making sure that there is only one jsEnabled
hidden form field (or js_enabled JSON property in the case of
Google Pay payments). Enhance the existing Cypress test that tests
these hidden form fields by making it submit the form to ensure
they’re actually processed correctly on the server side.

Co-authored-by: Gabriel Boardman <gabriel.boardman@madetech.com>
Co-authored-by: Hugo Jeffreys<hjvoid@users.noreply.github.com>

@hjvoid hjvoid left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I’m confident that this change does not require further review and meets the secure coding requirements of GOV.UK Pay

@alexbishop1
alexbishop1 merged commit d87a682 into master Sep 1, 2026
11 checks passed
@alexbishop1
alexbishop1 deleted the PP-15812_fix_adyen_normalisation_error branch September 1, 2026 15:21
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.

2 participants