From 0b210b2f58c2d2f99f05d74815a905d954b26cc0 Mon Sep 17 00:00:00 2001
From: shridhar-chippa <189346280+shridhar-chippa@users.noreply.github.com>
Date: Wed, 15 Oct 2025 18:50:51 +0100
Subject: [PATCH 1/3] DTR-197: Update suspend payment plan
# Conflicts:
# conf/app.routes
# conf/messages.en
---
.../SuspendPaymentPlanController.scala | 41 +++++++++++++++
app/views/PaymentPlanDetailsView.scala.html | 2 +-
app/views/SuspendPaymentPlanView.scala.html | 52 +++++++++++++++++++
app/views/ViewUtils.scala | 3 ++
conf/app.routes | 2 +
conf/messages.en | 12 +++++
.../SuspendPaymentPlanControllerSpec.scala | 28 ++++++++++
7 files changed, 139 insertions(+), 1 deletion(-)
create mode 100644 app/controllers/SuspendPaymentPlanController.scala
create mode 100644 app/views/SuspendPaymentPlanView.scala.html
create mode 100644 test/controllers/SuspendPaymentPlanControllerSpec.scala
diff --git a/app/controllers/SuspendPaymentPlanController.scala b/app/controllers/SuspendPaymentPlanController.scala
new file mode 100644
index 00000000..fc23c3e5
--- /dev/null
+++ b/app/controllers/SuspendPaymentPlanController.scala
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2025 HM Revenue & Customs
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package controllers
+
+import controllers.actions.*
+
+import javax.inject.Inject
+import play.api.i18n.{I18nSupport, MessagesApi}
+import play.api.mvc.{Action, AnyContent, MessagesControllerComponents}
+import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController
+import views.html.SuspendPaymentPlanView
+
+import scala.concurrent.Future
+
+class SuspendPaymentPlanController @Inject() (
+ override val messagesApi: MessagesApi,
+ identify: IdentifierAction,
+ getData: DataRetrievalAction,
+ val controllerComponents: MessagesControllerComponents,
+ view: SuspendPaymentPlanView
+) extends FrontendBaseController
+ with I18nSupport {
+
+ def onPageLoad: Action[AnyContent] = Action { implicit request =>
+ Ok(view())
+ }
+}
diff --git a/app/views/PaymentPlanDetailsView.scala.html b/app/views/PaymentPlanDetailsView.scala.html
index ddb54d62..58b03e68 100644
--- a/app/views/PaymentPlanDetailsView.scala.html
+++ b/app/views/PaymentPlanDetailsView.scala.html
@@ -57,7 +57,7 @@
visuallyHiddenText = Some(messages("Cancel"))
) else null,
if (showActions && planType == PaymentPlanType.BudgetPaymentPlan.toString) ActionItem(
- href = "#",
+ href = routes.SuspendPaymentPlanController.onPageLoad().url,
content = messages("paymentPlanDetails.details.suspend"),
visuallyHiddenText = Some(messages("Suspend"))
) else null
diff --git a/app/views/SuspendPaymentPlanView.scala.html b/app/views/SuspendPaymentPlanView.scala.html
new file mode 100644
index 00000000..23ccf7a1
--- /dev/null
+++ b/app/views/SuspendPaymentPlanView.scala.html
@@ -0,0 +1,52 @@
+@*
+ * Copyright 2025 HM Revenue & Customs
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *@
+
+@import views.html.components.*
+
+@this(
+ layout: templates.Layout,
+ paragraph: Paragraph,
+ paragraphWithLink: ParagraphMessageWithLink,
+ govukButton: GovukButton
+)
+
+@()(implicit request: Request[_], messages: Messages)
+
+@layout(pageTitle = titleNoFormManagePlan(messages("suspendPaymentPlan.title")), backLink = Some(routes.PaymentPlanDetailsController.onPageLoad().url)) {
+
+
@messages("suspendPaymentPlan.heading")
+ @paragraph("suspendPaymentPlan.p1")
+ @paragraph("suspendPaymentPlan.p2")
+
+ - @messages("suspendPaymentPlan.l1")
+ - @messages("suspendPaymentPlan.l2")
+ - @messages("suspendPaymentPlan.l3")
+ - @messages("suspendPaymentPlan.l4")
+
+ @paragraph("suspendPaymentPlan.p3")
+
+ @govukButton(Button(
+ href = Some(routes.JourneyRecoveryController.onPageLoad().url),
+ isStartButton = false,
+ content = Text(messages("suspendPaymentPlan.continue")),
+ attributes = Map("id" -> "continue-button")
+ ))
+
+ @paragraphWithLink(
+ linkMessage = messages("suspendPaymentPlan.cancel.link"),
+ linkUrl = routes.PaymentPlanDetailsController.onPageLoad().url,
+ )
+}
diff --git a/app/views/ViewUtils.scala b/app/views/ViewUtils.scala
index fec4a585..4e32fe57 100644
--- a/app/views/ViewUtils.scala
+++ b/app/views/ViewUtils.scala
@@ -30,6 +30,9 @@ object ViewUtils {
def titleNoForm(title: String, section: Option[String] = None)(implicit messages: Messages): String =
s"${messages(title)} - ${section.fold("")(messages(_) + " - ")}${messages("service.name")} - ${messages("site.govuk")}"
+ def titleNoFormManagePlan(title: String, section: Option[String] = None)(implicit messages: Messages): String =
+ s"${messages(title)} - ${section.fold("")(messages(_) + " - ")}${messages("service.manage")} - ${messages("site.govuk")}"
+
def errorPrefix(form: Form[?])(implicit messages: Messages): String = {
if (form.hasErrors || form.hasGlobalErrors) messages("error.title.prefix") else ""
}
diff --git a/conf/app.routes b/conf/app.routes
index 06bed648..afcb468a 100644
--- a/conf/app.routes
+++ b/conf/app.routes
@@ -146,3 +146,5 @@ GET /cancel-payment-plan controllers.CancelPaymen
POST /cancel-payment-plan controllers.CancelPaymentPlanController.onSubmit()
GET /payment-plan-cancelled controllers.PaymentPlanCancelledController.onPageLoad()
+
+GET /suspend-payment-plan controllers.SuspendPaymentPlanController.onPageLoad()
diff --git a/conf/messages.en b/conf/messages.en
index 6eb97c93..9ec04a77 100644
--- a/conf/messages.en
+++ b/conf/messages.en
@@ -537,3 +537,15 @@ duplicateWarning.error.required = Select one option
duplicateWarning.change.hidden = DuplicateWarning
duplicateWarning.yes= Yes
duplicateWarning.no= No
+
+suspendPaymentPlan.title = Suspend this payment plan
+suspendPaymentPlan.heading = Suspend this payment plan
+suspendPaymentPlan.p1 = You can suspend your payment plan if you need to pause payments.
+suspendPaymentPlan.p2 = When you suspend a payment plan:
+suspendPaymentPlan.p3 = Payments due within the next 3 working days cannot be suspended.
+suspendPaymentPlan.l1 = no payments will be taken during the suspension period
+suspendPaymentPlan.l2 = you can cancel the suspension at any time
+suspendPaymentPlan.l3 = interest may continue to accrue on your outstanding balance
+suspendPaymentPlan.l4 = your payment plan will resume automatically after the suspension ends
+suspendPaymentPlan.continue = Continue
+suspendPaymentPlan.cancel.link = Cancel and return to payment plan details
diff --git a/test/controllers/SuspendPaymentPlanControllerSpec.scala b/test/controllers/SuspendPaymentPlanControllerSpec.scala
new file mode 100644
index 00000000..6e3c7e11
--- /dev/null
+++ b/test/controllers/SuspendPaymentPlanControllerSpec.scala
@@ -0,0 +1,28 @@
+package controllers
+
+import base.SpecBase
+import play.api.test.FakeRequest
+import play.api.test.Helpers.*
+import views.html.SuspendPaymentPlanView
+
+class SuspendPaymentPlanControllerSpec extends SpecBase {
+
+ "SuspendPaymentPlan Controller" - {
+
+ "must return OK and the correct view for a GET" in {
+
+ val application = applicationBuilder(userAnswers = Some(emptyUserAnswers)).build()
+
+ running(application) {
+ val request = FakeRequest(GET, routes.SuspendPaymentPlanController.onPageLoad().url)
+
+ val result = route(application, request).value
+
+ val view = application.injector.instanceOf[SuspendPaymentPlanView]
+
+ status(result) mustEqual OK
+ contentAsString(result) mustEqual view()(request, messages(application)).toString
+ }
+ }
+ }
+}
From 36132c4eed9f98020c7b6ac068b018375dc21231 Mon Sep 17 00:00:00 2001
From: shridhar-chippa <189346280+shridhar-chippa@users.noreply.github.com>
Date: Thu, 16 Oct 2025 10:08:21 +0100
Subject: [PATCH 2/3] update content
---
.../SuspendPaymentPlanController.scala | 6 ------
conf/messages.en | 6 +++---
.../SuspendPaymentPlanControllerSpec.scala | 16 ++++++++++++++++
3 files changed, 19 insertions(+), 9 deletions(-)
diff --git a/app/controllers/SuspendPaymentPlanController.scala b/app/controllers/SuspendPaymentPlanController.scala
index fc23c3e5..0538df27 100644
--- a/app/controllers/SuspendPaymentPlanController.scala
+++ b/app/controllers/SuspendPaymentPlanController.scala
@@ -16,20 +16,14 @@
package controllers
-import controllers.actions.*
-
import javax.inject.Inject
import play.api.i18n.{I18nSupport, MessagesApi}
import play.api.mvc.{Action, AnyContent, MessagesControllerComponents}
import uk.gov.hmrc.play.bootstrap.frontend.controller.FrontendBaseController
import views.html.SuspendPaymentPlanView
-import scala.concurrent.Future
-
class SuspendPaymentPlanController @Inject() (
override val messagesApi: MessagesApi,
- identify: IdentifierAction,
- getData: DataRetrievalAction,
val controllerComponents: MessagesControllerComponents,
view: SuspendPaymentPlanView
) extends FrontendBaseController
diff --git a/conf/messages.en b/conf/messages.en
index 9ec04a77..35a4e38b 100644
--- a/conf/messages.en
+++ b/conf/messages.en
@@ -542,10 +542,10 @@ suspendPaymentPlan.title = Suspend this payment plan
suspendPaymentPlan.heading = Suspend this payment plan
suspendPaymentPlan.p1 = You can suspend your payment plan if you need to pause payments.
suspendPaymentPlan.p2 = When you suspend a payment plan:
-suspendPaymentPlan.p3 = Payments due within the next 3 working days cannot be suspended.
suspendPaymentPlan.l1 = no payments will be taken during the suspension period
-suspendPaymentPlan.l2 = you can cancel the suspension at any time
+suspendPaymentPlan.l2 = you can remove the suspension at any time
suspendPaymentPlan.l3 = interest may continue to accrue on your outstanding balance
suspendPaymentPlan.l4 = your payment plan will resume automatically after the suspension ends
+suspendPaymentPlan.p3 = Payments due within the next 3 working days cannot be suspended.
suspendPaymentPlan.continue = Continue
-suspendPaymentPlan.cancel.link = Cancel and return to payment plan details
+suspendPaymentPlan.cancel.link = Cancel and return to payment plan
diff --git a/test/controllers/SuspendPaymentPlanControllerSpec.scala b/test/controllers/SuspendPaymentPlanControllerSpec.scala
index 6e3c7e11..68da9af0 100644
--- a/test/controllers/SuspendPaymentPlanControllerSpec.scala
+++ b/test/controllers/SuspendPaymentPlanControllerSpec.scala
@@ -1,3 +1,19 @@
+/*
+ * Copyright 2025 HM Revenue & Customs
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
package controllers
import base.SpecBase
From 77ee6cc7e53dc6feeccd582f6a73682e73199311 Mon Sep 17 00:00:00 2001
From: Sandip Khedekar <17478517+SandipKhedekar@users.noreply.github.com>
Date: Thu, 23 Oct 2025 01:07:36 +0100
Subject: [PATCH 3/3] DTR-197 - Changes for updates
---
conf/app.routes | 2 +-
conf/messages.en | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/conf/app.routes b/conf/app.routes
index afcb468a..ca16fc4e 100644
--- a/conf/app.routes
+++ b/conf/app.routes
@@ -147,4 +147,4 @@ POST /cancel-payment-plan controllers.CancelPaymen
GET /payment-plan-cancelled controllers.PaymentPlanCancelledController.onPageLoad()
-GET /suspend-payment-plan controllers.SuspendPaymentPlanController.onPageLoad()
+GET /suspending-this-payment-plan controllers.SuspendPaymentPlanController.onPageLoad()
diff --git a/conf/messages.en b/conf/messages.en
index 35a4e38b..2ceda6c9 100644
--- a/conf/messages.en
+++ b/conf/messages.en
@@ -538,9 +538,9 @@ duplicateWarning.change.hidden = DuplicateWarning
duplicateWarning.yes= Yes
duplicateWarning.no= No
-suspendPaymentPlan.title = Suspend this payment plan
-suspendPaymentPlan.heading = Suspend this payment plan
-suspendPaymentPlan.p1 = You can suspend your payment plan if you need to pause payments.
+suspendPaymentPlan.title = Suspending this payment plan
+suspendPaymentPlan.heading = Suspending this payment plan
+suspendPaymentPlan.p1 = You can suspend this payment plan if you need to pause payments.
suspendPaymentPlan.p2 = When you suspend a payment plan:
suspendPaymentPlan.l1 = no payments will be taken during the suspension period
suspendPaymentPlan.l2 = you can remove the suspension at any time