diff --git a/facia/app/controllers/FaciaController.scala b/facia/app/controllers/FaciaController.scala index 191ce1786a6..87beba5ee98 100644 --- a/facia/app/controllers/FaciaController.scala +++ b/facia/app/controllers/FaciaController.scala @@ -47,6 +47,7 @@ trait FaciaController val mostViewedAgent: MostViewedAgent val deeplyReadAgent: DeeplyReadAgent val remoteRenderer: DotcomRenderingService = DotcomRenderingService() + val assets: Assets implicit val context: ApplicationContext @@ -67,6 +68,13 @@ trait FaciaController ) } + //ApplePay MerchantId + def appleDeveloperMerchantId(): Action[AnyContent] = + if (Configuration.environment.isProd) + assets.at(path = "/public", file = "apple-developer-merchantid-domain-association-prod.txt") + else + assets.at(path = "/public", file = "apple-developer-merchantid-domain-association-code.txt") + //Only used by dev-build for rending special urls such as lifeandstyle/home-and-garden def renderFrontPressSpecial(path: String): Action[AnyContent] = Action.async { implicit request => renderFrontPressResult(path) } @@ -529,5 +537,6 @@ class FaciaControllerImpl( val ws: WSClient, val mostViewedAgent: MostViewedAgent, val deeplyReadAgent: DeeplyReadAgent, + val assets: Assets, )(implicit val context: ApplicationContext) extends FaciaController diff --git a/facia/app/controllers/FaciaControllers.scala b/facia/app/controllers/FaciaControllers.scala index 044d9edff58..c9c9d86c8fa 100644 --- a/facia/app/controllers/FaciaControllers.scala +++ b/facia/app/controllers/FaciaControllers.scala @@ -13,6 +13,7 @@ trait FaciaControllers { def wsClient: WSClient def mostViewedAgent: MostViewedAgent def deeplyReadAgent: DeeplyReadAgent + def assets: Assets implicit def appContext: ApplicationContext lazy val faciaController = wire[FaciaControllerImpl] } diff --git a/facia/conf/application.conf b/facia/conf/application.conf index ec8fbd10aee..00e3027c631 100644 --- a/facia/conf/application.conf +++ b/facia/conf/application.conf @@ -6,6 +6,9 @@ "assets.cache./public/security.txt"="public, max-age=900" "assets.cache./public/security.txt.asc"="public, max-age=900" +# Caching for applepay merchantId file +"assets.cache./public/apple-developer-merchantid-domain-association.txt"="public, max-age=900" + pekko { loggers = ["org.apache.pekko.event.Logging$DefaultLogger", "org.apache.pekko.event.slf4j.Slf4jLogger"] loglevel = WARNING diff --git a/facia/conf/routes b/facia/conf/routes index 8ba7b9cecb0..22d16eda78d 100644 --- a/facia/conf/routes +++ b/facia/conf/routes @@ -27,6 +27,7 @@ GET /collection/*id/rss GET /container/use-layout/*id.json controllers.FaciaController.renderContainerJsonWithFrontsLayout(id) GET /container/data/*id.json controllers.FaciaController.renderContainerDataJson(id) GET /container/*id.json controllers.FaciaController.renderContainerJson(id) +GET /.well-known/apple-developer-merchantid-domain-association.txt controllers.FaciaController.appleDeveloperMerchantId() # Editionalised pages GET /*path/show-more/*id.json controllers.FaciaController.renderShowMore(path, id) diff --git a/facia/public/apple-developer-merchantid-domain-association-code.txt b/facia/public/apple-developer-merchantid-domain-association-code.txt new file mode 100644 index 00000000000..64bc98c79c2 --- /dev/null +++ b/facia/public/apple-developer-merchantid-domain-association-code.txt @@ -0,0 +1,74 @@ +MIIQbQYJKoZIhvcNAQcCoIIQXjCCEFoCAQExCzAJBgUrDgMCGgUAMHwGCSqGSIb3DQEHAaBvBG17 +InRlYW1JZCI6Ijk5OFA5VTVOR0oiLCJkb21haW4iOiJtLmNvZGUuZGV2LXRoZWd1YXJkaWFuLmNv +bSIsImRhdGVDcmVhdGVkIjoiMjAyMy0xMS0wMSwxMDo1Mzo1NSIsInZlcnNpb24iOjF9oIINPzCC +BDQwggMcoAMCAQICCEc8TGHymYjUMA0GCSqGSIb3DQEBCwUAMHMxLTArBgNVBAMMJEFwcGxlIGlQ +aG9uZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEgMB4GA1UECwwXQ2VydGlmaWNhdGlvbiBBdXRo +b3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTMB4XDTIzMDQxMTIyMjM1OVoX +DTI4MDQwOTIyMjM1OFowWTE1MDMGA1UEAwwsQXBwbGUgaVBob25lIE9TIFByb3Zpc2lvbmluZyBQ +cm9maWxlIFNpZ25pbmcxEzAR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BdQqorV2uT80AkHN7B1dSExggKFMIICgQIBATB_MHMxLTArBgNVBAMMJEFwcGxl +IGlQaG9uZSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTEgMB4GA1UECwwXQ2VydGlmaWNhdGlvbiBB +dXRob3JpdHkxEzARBgNVBAoMCkFwcGxlIEluYy4xCzAJBgNVBAYTAlVTAghHPExh8pmI1DAJBgUr +DgMCGgUAoIHcMBgGCSqGSIb3DQEJAzELBgkqhkiG9w0BBwEwHAYJKoZIhvcNAQkFMQ8XDTIzMTEw +MTEwNTM1NVowIwYJKoZIhvcNAQkEMRYEFHUrPfPhuCI7XEpPYYrNXX_0CHQsMCkGCSqGSIb3DQEJ +NDEcMBowCQYFKw4DAhoFAKENBgkqhkiG9w0BAQEFADBSBgkqhkiG9w0BCQ8xRTBDMAoGCCqGSIb3 +DQMHMA4GCCqGSIb3DQMCAgIAgDANBggqhkiG9w0DAgIBQDAHBgUrDgMCBzANBggqhkiG9w0DAgIB +KDANBgkqhkiG9w0BAQEFAASCAQBzLqx9t9BGgc3h-mwoMSR9hqDdKsRINgY5-UIvHo5rhga7XR2g +y64HZikRaMlGX0UKUUfAaBlF0z_xGNFZ9_5Cwtkz_044SkyY5exgH1ZVRKKACBc4o9456VBdv_zw +bxKEtuCQkgUvZeo-wZVmQznsr9mxCSBXlDcGBXgloIoQVjKF967iKfxJgc5rCRDBHCPGf-FjmwzV +2xSUORBdsvXj3Oyje7pPUMqJ5ML3QyVhfBWQEurzdYssDsE36cJzLPx_13cT3LJ3FghW0yq0dhUw +mvGnv_53YIQbx1qTHWcRAFMBwVgr9OVGL0yB3LB1WMFLupswHDjZ5K1kIUoFJSWb diff --git a/facia/public/apple-developer-merchantid-domain-association-prod.txt b/facia/public/apple-developer-merchantid-domain-association-prod.txt new file mode 100644 index 00000000000..aeefec553c8 --- /dev/null +++ b/facia/public/apple-developer-merchantid-domain-association-prod.txt @@ -0,0 +1,74 @@ +MIIQZgYJKoZIhvcNAQcCoIIQV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MZg6caT7fdTJ5mV3JTacTfqA7Uu1fRYS_KHispixXkCFTTPK- +2fWgIBoZim6DmikrpaB3cOqxFyEMhLVDgNMaZuDKzEDO9ygOfODlayH4XrN0x49u-Ol6eC8-g_cE +ot_1W6zS2sHTS7l-nWu_14PbONe38QeIjJ54-vxg_f3plp_BcycaonWROt0ucRFyqVx8GfnCF9xO +we5Ruf1KUTbfhiTd41P6_HIEECa5vuJ64pl1fw9aCGQ905YZScqKC5SatScDWQ2hc741doBeN9e2 +A0PY5oFs1b6XDGVuEP0-d4Q0b-WnSTQVVbAhd8FUkmIJ6s568RrXqAk diff --git a/facia/test/FaciaControllerTest.scala b/facia/test/FaciaControllerTest.scala index c51b683b372..f14210faf97 100644 --- a/facia/test/FaciaControllerTest.scala +++ b/facia/test/FaciaControllerTest.scala @@ -4,7 +4,7 @@ import agents.{DeeplyReadAgent, MostViewedAgent} import com.fasterxml.jackson.core.JsonParseException import com.gu.facia.client.models.{ConfigJson, FrontJson} import common.editions.{Uk, Us} -import controllers.FaciaControllerImpl +import controllers.{Assets, FaciaControllerImpl} import helpers.FaciaTestData import implicits.FakeRequests import org.mockito.Matchers.{any, anyString} @@ -34,7 +34,8 @@ import scala.concurrent.{Await, Future} with WithTestApplicationContext with MockitoSugar with WithTestFrontJsonFapi - with WithTestContentApiClient { + with WithTestContentApiClient + with WithAssets { lazy val wsClient = mockWsResponse() @@ -44,6 +45,7 @@ import scala.concurrent.{Await, Future} wsClient, new MostViewedAgent(testContentApiClient, new OphanApi(wsClient), wsClient), new DeeplyReadAgent(testContentApiClient, new OphanApi(wsClient)), + assets = assets, ) val articleUrl = "/environment/2012/feb/22/capitalise-low-carbon-future" val callbackName = "aFunction" diff --git a/facia/test/FaciaMetaDataTest.scala b/facia/test/FaciaMetaDataTest.scala index 0de54d95c8d..f338e7e2e77 100644 --- a/facia/test/FaciaMetaDataTest.scala +++ b/facia/test/FaciaMetaDataTest.scala @@ -28,7 +28,8 @@ import scala.concurrent.duration._ with WithTestWsClient with MockitoSugar with WithTestFrontJsonFapi - with WithTestContentApiClient { + with WithTestContentApiClient + with WithAssets { override def beforeAll(): Unit = { // These tests are designed to work with Frontend fronts not DCR fronts @@ -49,6 +50,7 @@ import scala.concurrent.duration._ wsClient, new MostViewedAgent(testContentApiClient, new OphanApi(wsClient), wsClient), new DeeplyReadAgent(testContentApiClient, new OphanApi(wsClient)), + assets = assets, ) val frontPath = "music" diff --git a/facia/test/utils/WithAssets.scala b/facia/test/utils/WithAssets.scala new file mode 100644 index 00000000000..43c6f15174e --- /dev/null +++ b/facia/test/utils/WithAssets.scala @@ -0,0 +1,7 @@ +package test +import controllers.Assets +import org.scalatestplus.mockito.MockitoSugar + +trait WithAssets extends MockitoSugar { + lazy val assets: Assets = mock[Assets] +} diff --git a/preview/app/controllers/FaciaDraftController.scala b/preview/app/controllers/FaciaDraftController.scala index 1d2a86b7be4..63edc64e1d0 100644 --- a/preview/app/controllers/FaciaDraftController.scala +++ b/preview/app/controllers/FaciaDraftController.scala @@ -21,6 +21,7 @@ class FaciaDraftController( val ws: WSClient, val mostViewedAgent: MostViewedAgent, val deeplyReadAgent: DeeplyReadAgent, + val assets: Assets, )(implicit val context: ApplicationContext) extends FaciaController with RendersItemResponse {