Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/pagopa/pagopa-mock-ec

Mock PA ec-services for PSP (see here to Payment process https://pagopa.github.io/pagopa-api/indexPA.html)
https://github.com/pagopa/pagopa-mock-ec

pagopa-shared

Last synced: 6 days ago
JSON representation

Mock PA ec-services for PSP (see here to Payment process https://pagopa.github.io/pagopa-api/indexPA.html)

Awesome Lists containing this project

README

        

# pagopa-mock-ec

A mock implementation of PA pagoPA service

- [pagopa-mock-ec](#pagopa-mock-ec)
- [Glossary](#glossary)
- [Usage](#usage)
- [Prerequisites](#prerequisites)
- [Functionalities](#functionalities)
- [Tribute description](#tribute-description)

## Glossary

| Acronym | Description |
| ------- | -------------------- |
| EC | Creditor institution |
| CCPost | Postal account |
| CCBank | Bank account |


## Usage

## Prerequisites

To be able to use as PSP the following `pagopa-mock-ec` remebers to configure in your requests :

- PSP [Identification and Authentication](https://pagopa.github.io/pagopa-api/#section/Introduction/Identification-and-Authentication)
- as EC the `77777777777` fiscalCode
- as `noticeNumber` one of those described in to below section [Tribute description](#tribute-description)

## Functionalities

The following functionalites are available (EC Side)

> (_see [here](https://pagopa.github.io/pagopa-api/indexPA.html) to details_)

- _paVerifyPaymentNotice_
- _paGetPayment_
- _paSendRT_

These mock functionalities allows the PSP to invoke all the payment steps

> (_see [here](https://pagopa.github.io/pagopa-api/) to details_)

- _verifyPaymentNotice_ or _verificaBollettino_
- _activatePaymentNotice_
- _sendPaymentOutcome_

## Tribute description

Both EC have at their disposal a bank IBAN and a postal IBAN.
Based on notice number the mock will reply with a certain configuration of the tribute.

### Tribute 1

The tribute is 120 EUR divided in 2 transfers:

- Transfer 1 : TARI, 100€ due to **EC_TE**
- Transfer 2 : TEFA, 20€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano | Notes |
| -------------------- | -------- | ------------------- | ------------------------------ |
| 302**00**xxxxxxxxxxx | CCPost | CCPost | multibeneficiary (TARI + TEFA) |
| 302**01**xxxxxxxxxxx | CCPost | CCBank | multibeneficiary (TARI + TEFA) |
| 302**02**xxxxxxxxxxx | CCBank | CCPost | multibeneficiary (TARI + TEFA) |
| 302**03**xxxxxxxxxxx | CCBank | CCBank | multibeneficiary (TARI + TEFA) |

### Tribute 2

The tribute is 100 EUR in a single transfers:

- Transfer 1 : TARI, 100€ due to **EC_TE**

| Notice number | CC EC_TE | Notes |
| -------------------- | -------- | ---------------------- |
| 302**04**xxxxxxxxxxx | CCPost | monobeneficiary (TARI) |
| 302**05**xxxxxxxxxxx | CCBank | monobeneficiary (TARI) |

### Tribute 3

The tribute is 100 EUR divided in 2 transfers:

- Transfer 1 : TARI, 70€ due to **EC_TE**
- Transfer 2 : TEFA, 30€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano | Notes |
| -------------------- | -------- | ------------------- | ------------------------------ |
| 302**06**xxxxxxxxxxx | CCPost | CCPost | multibeneficiary (TARI + TEFA) |
| 302**07**xxxxxxxxxxx | CCPost | CCBank | multibeneficiary (TARI + TEFA) |
| 302**08**xxxxxxxxxxx | CCBank | CCPost | multibeneficiary (TARI + TEFA) |
| 302**09**xxxxxxxxxxx | CCBank | CCBank | multibeneficiary (TARI + TEFA) |

### Tribute 4

The tribute is 70 EUR in a single transfer:

- Transfer 1 : TARI, 70€ due to **EC_TE**

| Notice number | CC EC_TE | Notes |
| -------------------- | -------- | ---------------------- |
| 302**10**xxxxxxxxxxx | CCPost | monobeneficiary (TARI) |
| 302**11**xxxxxxxxxxx | CCBank | monobeneficiary (TARI) |

### Tribute 5

The tribute is 6000 EUR divided in 2 transfers:

- Transfer 1 : TARI, 4000€ due to **EC_TE**
- Transfer 2 : TEFA, 2000€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano | Notes |
| -------------------- | -------- | ------------------- | ------------------------------ |
| 302**12**xxxxxxxxxxx | CCPost | CCBank | multibeneficiary (TARI + TEFA) |

### Tribute 6

The tribute is 0.30 EUR divided in 2 transfers:

- Transfer 1 : TARI, 0.10€ due to **EC_TE**
- Transfer 2 : TEFA, 0.20€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano | Notes |
| -------------------- | -------- | ------------------- | ------------------------------ |
| 302**13**xxxxxxxxxxx | CCPost | CCBank | multibeneficiary (TARI + TEFA) |

### Tribute 7

The amount of the tribute is 120€ and divided in 3 transfers:

- Transfer 1 : 70€ due to **EC_TE**
- Transfer 2 : 30€ due to **Comune di Milano**
- Transfer 3 : 20€ due to **Comune di Bitetto**

| Notice number | CC EC_TE | CC Comune di Milano | Comune di Bitetto |
| -------------------- | -------- | ------------------- | ----------------- |
| 302**14**xxxxxxxxxxx | CCPost | CCBank | CCBank |

### Tribute 8

The amount of the tribute is 120€ and divided in 4 transfers:

- Transfer 1 : 70€ due to **EC_TE**
- Transfer 2 : 30€ due to **Comune di Milano**
- Transfer 3 : 10€ due to **Comune di Bitetto**
- Transfer 4 : 10€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano (1) | Comune di Bitetto | CC Comune di Milano (2) |
| -------------------- | -------- | ----------------------- | ----------------- | ----------------------- |
| 302**15**xxxxxxxxxxx | CCPost | CCBank | CCBank | CCBank |

### Tribute 9

The amount of the tribute is is 120€ and divided in 5 transfers:

- Transfer 1 : 70€ due to **EC_TE**
- Transfer 2 : 30€ due to **Comune di Milano**
- Transfer 3 : 10€ due to **Comune di Bitetto**
- Transfer 4 : 5€ due to **Comune di Milano**
- Transfer 5 : 5€ due to **Comune di Milano**

| Notice number | CC EC_TE | CC Comune di Milano (1) | Comune di Bitetto | CC Comune di Milano (2) | CC Comune di Milano (3) |
| -------------------- | -------- | ----------------------- | ----------------- | ----------------------- | ----------------------- |
| 302**16**xxxxxxxxxxx | CCPost | CCBank | CCBank | CCBank | CCBank |

### Tribute 10

The tribute is 120.00 EUR divided in 2 transfers:
- Transfer 1 : 0101101IM, 100.00€ due to **EC_TE**
- Transfer 2 : 0201102IM, 20.00€ due to **EC_TE**

| Notice number | CC EC_TE | CC EC_TE |
| -------------------- | -------- | -------- |
| 302**17**xxxxxxxxxxx | CCPost | CCPost |
| 302**21**xxxxxxxxxxx | CCPost | CCBank |

### Tribute 11

The amount of the tribute is 120€ and divided in 3 transfers:

- Transfer 1 : 70€ due to **EC_TE**
- Transfer 2 : 30€ due to **EC_TE**
- Transfer 3 : 20€ due to **EC_TE**

| Notice number | CC EC_TE | CC EC_TE | CC EC_TE|
| -------------------- | -------- | ---------| --------|
| 302**19**xxxxxxxxxxx | CCBank | CCBank | CCPost |
| 302**22**xxxxxxxxxxx | CCPost | CCPost | CCBank |

### Tribute 12

The amount of the tribute is 120€ and divided in 3 transfers:

- Transfer 1 : 70€ due to **EC_TE**
- Transfer 2 : 30€ due to **EC_TE**
- Transfer 3 : 20€ due to **EC_TE**

It is the same as tribute 11, with the exception that the returned `companyName` is 140 characters long

| Notice number | CC EC_TE | CC EC_TE | CC EC_TE|
| -------------------- | -------- | ---------| --------|
| 302**23**xxxxxxxxxxx | CCBank | CCBank | CCPost |

### Tribute 13

The tribute is 120.00 EUR divided in 2 transfers:
- Transfer 1 : Oneri SUAP 1, 100.00€ due to **Comune di Milano**
- Transfer 2 : Oneri SUAP 2, 20.00€ due to **Comune di Bitetto**

| Notice number | CC Comune di Milano | CC Comune di Bitetto |
| -------------------- | ------------------- | -------------------- |
| 302**18**xxxxxxxxxxx | CCPost | CCBank |

### Tribute 14

The tribute is 120.00 EUR divided in 2 transfers:
- Transfer 1 : Oneri SUAP 1, 100.00€ due to **Comune di Milano**
- Transfer 2 : Oneri SUAP 2, 20.00€ due to **Comune di Milano**

| Notice number | CC Comune di Milano | CC Comune di Milano |
| -------------------- | ------------------- | -------------------- |
| 302**20**xxxxxxxxxxx | CCPost | CCBank |

### Tribute 15

Same as Tribute 10, but with a returned `dueDate` with XSD format (e.g. `2024-10-05+02:00`).

The tribute is 120.00 EUR divided in 2 transfers:
- Transfer 1 : 0101101IM, 100.00€ due to **EC_TE**
- Transfer 2 : 0201102IM, 20.00€ due to **EC_TE**

| Notice number | CC Comune di Milano | CC Comune di Milano |
| -------------------- | ------------------- | -------------------- |
| 302**24**xxxxxxxxxxx | CCPost | CCBank |

### Edge cases

The following edge cases are available (stateless, based on notice number)

| Notice number | Description |
| -------------------- | ---------------------------------------------------- |
| 302**95**xxxxxxxxxxx | Notice already paid |
| 302**96**xxxxxxxxxxx | EC is returning a response with a syntax error |
| 302**97**xxxxxxxxxxx | EC Station not reacheable |
| 302**98**xxxxxxxxxxx | EC Station timeout |
| 302**99**xxxxxxxxxxx | Payment expired |
| 302**YY**xxxxxxxxxxx | Payment unknown |

**_NOTE:_** YY: every code not mentioned before -> from 17 to 94