Skip to content

DEFRA/epr-payment-facade

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

epr-payment-facade

Description

Service Facade to calculate fees and manage payment records for EPR

Getting Started

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/DEFRA/epr-payment-facade.git
  2. Navigate to the project directory:
    cd \src\EPR.Payment.Facade
  3. Restore the dependencies:
    dotnet restore

Configuration

The application uses appsettings.json for configuration. For development, use appsettings.Development.json.

Replace the BearerToken below with your GovPayService API Key

Sample

appsettings.Development.json

{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning",
      "Microsoft.FeatureManagement": "Information"
    }
  },
  "AllowedHosts": "*",
  "FeatureManagement": {
    "EnablePaymentsFeature": true,
    "EnablePaymentInitiation": true,
    "EnablePaymentCompletion": true,
    "EnableProducersFeesFeature": true,
    "EnableProducersFeesCalculation": true,
    "EnableProducerResubmissionFee": true
  },
  "Services": {
    "PaymentServiceHealthCheck": {
      "Url": "https://localhost:7107/",
      "EndPointName": "health"
    },
    "PaymentService": {
      "Url": "https://localhost:7107/",
      "EndPointName": "api/v1",
      "HttpClientName": "payment_service_client"
    },
    "GovPayService": {
      "Url": "https://publicapi.payments.service.gov.uk",
      "EndPointName": "v1",
      "BearerToken": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
      "Retries": 3
    },
    "RegistrationFeesService": {
      "Url": "https://localhost:7107/",
      "EndPointName": "api/v1",
      "HttpClientName": "registration_fees_service_client"
    }
  },
  "PaymentServiceOptions": {
    "ReturnUrl": "https://localhost:7274/GovPayCallback",
    "Description": "Registration fee",
    "ErrorUrl": "https://localhost:7274/"
  },
  "AllowedOrigins": [
    "https://localhost:7166",
    "https://card.payments.service.gov.uk"
  ]
}

Building the Application

  1. Navigate to the project directory:

    cd \src\EPR.Payment.Facade
  2. To build the application:

    dotnet build

Running the Application

  1. Navigate to the project directory:

    cd \src\EPR.Payment.Facade
  2. To run the service locally:

    dotnet run
  3. Launch Browser:

    Service Health Check: https://localhost:7166/health

    Swagger: https://localhost:7166/swagger/index.html

    Sample Test UI: https://localhost:7166/index.html

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published