diff --git a/app/controllers/stripe-setup/add-psp-account-details/get.controller.test.js b/app/controllers/stripe-setup/add-psp-account-details/get.controller.test.js index 026e4c69d6..e0ab5ba0a3 100644 --- a/app/controllers/stripe-setup/add-psp-account-details/get.controller.test.js +++ b/app/controllers/stripe-setup/add-psp-account-details/get.controller.test.js @@ -35,13 +35,13 @@ describe('get controller', () => { it('should redirect to bank account setup page', async () => { req.account.connectorGatewayAccountStripeProgress.bankAccount = false getController(req, res) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripeSetup.bankDetails}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripeSetup.bankDetails}`) }) it('should redirect to responsible person page', async () => { req.account.connectorGatewayAccountStripeProgress.bankAccount = true getController(req, res) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripeSetup.responsiblePerson}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripeSetup.responsiblePerson}`) }) it('should redirect to VAT number page', async () => { @@ -50,7 +50,7 @@ describe('get controller', () => { responsiblePerson: true } getController(req, res) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripeSetup.vatNumber}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripeSetup.vatNumber}`) }) it('should redirect to company registration number page', async () => { @@ -60,7 +60,7 @@ describe('get controller', () => { vatNumber: true } getController(req, res) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripeSetup.companyNumber}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripeSetup.companyNumber}`) }) it('should render go live complete page when all steps are completed', async () => { diff --git a/app/controllers/stripe-setup/bank-details/post.controller.test.js b/app/controllers/stripe-setup/bank-details/post.controller.test.js index 9d7d3689bf..43e9f0b9ad 100644 --- a/app/controllers/stripe-setup/bank-details/post.controller.test.js +++ b/app/controllers/stripe-setup/bank-details/post.controller.test.js @@ -53,7 +53,7 @@ describe('Bank details post controller', () => { bank_account_number: sanitisedAccountNumber }) sinon.assert.calledWith(setStripeAccountSetupFlagMock, req.account.gateway_account_id, 'bank_account', req.correlationId) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripe.addPspAccountDetails}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripe.addPspAccountDetails}`) }) it('should render error page when Stripe returns unknown error', async () => { diff --git a/app/controllers/stripe-setup/responsible-person/post.controller.test.js b/app/controllers/stripe-setup/responsible-person/post.controller.test.js index 1931c97dc2..81c621a994 100644 --- a/app/controllers/stripe-setup/responsible-person/post.controller.test.js +++ b/app/controllers/stripe-setup/responsible-person/post.controller.test.js @@ -109,7 +109,7 @@ describe('Responsible person POST controller', () => { dob_year: dobYearNormalised }) sinon.assert.calledWith(setStripeAccountSetupFlagMock, req.account.gateway_account_id, 'responsible_person', req.correlationId) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripe.addPspAccountDetails}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripe.addPspAccountDetails}`) }) it('should call Stripe with normalised details (no second address line), then connector, then redirect to add details redirect route', async function () { @@ -138,7 +138,7 @@ describe('Responsible person POST controller', () => { dob_year: dobYearNormalised }) sinon.assert.calledWith(setStripeAccountSetupFlagMock, req.account.gateway_account_id, 'responsible_person', req.correlationId) - sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id/${paths.account.stripe.addPspAccountDetails}`) + sinon.assert.calledWith(res.redirect, 303, `/account/a-valid-external-id${paths.account.stripe.addPspAccountDetails}`) }) it('should render error when Stripe returns error, not call connector, and not redirect', async function () { diff --git a/app/paths.js b/app/paths.js index 5ea2e463ba..982a573110 100644 --- a/app/paths.js +++ b/app/paths.js @@ -95,36 +95,6 @@ module.exports = { flex: '/your-psp/flex', worldpay3dsFlex: '/your-psp/worldpay-3ds-flex' }, - apiKeys: { - index: '/api-keys', - revoked: '/api-keys/revoked', - create: '/api-keys/create', - revoke: '/api-keys/revoke', - update: '/api-keys/update' - }, - paymentLinks: { - start: '/create-payment-link', - information: '/create-payment-link/information', - webAddress: '/create-payment-link/web-address', - reference: '/create-payment-link/reference', - amount: '/create-payment-link/amount', - review: '/create-payment-link/review', - addMetadata: '/create-payment-link/add-reporting-column', - editMetadata: '/create-payment-link/add-reporting-column/:metadataKey', - deleteMetadata: '/create-payment-link/add-reporting-column/:metadataKey/delete', - manage: { - index: '/create-payment-link/manage', - edit: '/create-payment-link/manage/edit/:productExternalId', - disable: '/create-payment-link/manage/disable/:productExternalId', - delete: '/create-payment-link/manage/delete/:productExternalId', - editInformation: '/create-payment-link/manage/edit/information/:productExternalId', - editReference: '/create-payment-link/manage/edit/reference/:productExternalId', - editAmount: '/create-payment-link/manage/edit/amount/:productExternalId', - addMetadata: '/create-payment-link/manage/:productExternalId/add-reporting-column', - editMetadata: '/create-payment-link/manage/:productExternalId/add-reporting-column/:metadataKey', - deleteMetadata: '/create-payment-link/manage/:productExternalId/add-reporting-column/:metadataKey/delete' - } - }, stripeSetup: { bankDetails: '/bank-details', responsiblePerson: '/responsible-person', diff --git a/app/routes.js b/app/routes.js index 21c198b0ab..b39efe4d4e 100644 --- a/app/routes.js +++ b/app/routes.js @@ -193,9 +193,8 @@ module.exports.bind = function (app) { ...lodash.values(user.profile), ...lodash.values(requestToGoLive), ...lodash.values(policyPages), - ...lodash.values(stripeSetup), - ...lodash.values(stripe), ...lodash.values(payouts), + ...lodash.values(redirects), paths.feedback ] // Extract all the authenticated paths as a single array diff --git a/app/views/stripe-setup/bank-details/index.njk b/app/views/stripe-setup/bank-details/index.njk index 4a21b9c88f..dcd8b4d8b6 100644 --- a/app/views/stripe-setup/bank-details/index.njk +++ b/app/views/stripe-setup/bank-details/index.njk @@ -29,7 +29,7 @@
This is the bank account payments will go into.