Skip to content

feat/DF-623: Added payment fields but needs engine bump#23

Merged
jbarnsley10 merged 5 commits intomainfrom
feat/DF-623-payments
Feb 4, 2026
Merged

feat/DF-623: Added payment fields but needs engine bump#23
jbarnsley10 merged 5 commits intomainfrom
feat/DF-623-payments

Conversation

@jbarnsley10
Copy link
Copy Markdown
Contributor

@jbarnsley10 jbarnsley10 commented Jan 27, 2026

Added payment fields as part of ticket DF-623

Needs engine bump before type checking and unit tests will pass i.e. depends on: DEFRA/forms-engine-plugin#295

Comment thread src/service/sharepoint.js Outdated
Comment thread src/service/sharepoint.js Outdated
*/
export function addPaymentFields(message, fields) {
const payment = /** @type {FormAdapterPayment | undefined} */ (
Object.values(message.data.payments)[0]
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.

[0] makes me a bit nervous. Why is this neccessary?

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.

Related to https://github.com/DEFRA/forms-engine-plugin/pull/293/changes#r2742602271 I am guessing we are handling multiple payments, although this isn't possible. We could simplify it and ditch data.payments altogether in favour of a single component?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Refactored

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 4, 2026

@jbarnsley10 jbarnsley10 merged commit 8774045 into main Feb 4, 2026
9 checks passed
@jbarnsley10 jbarnsley10 deleted the feat/DF-623-payments branch February 4, 2026 14:36
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.

3 participants