Skip to content

Commit

Permalink
updated idpay definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
forrest57 committed Nov 2, 2023
1 parent f977b5b commit 8e7148e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"api_cdc": "https://raw.githubusercontent.com/pagopa/io-app/master/assets/CdcSwagger.yml",
"api_fci": "https://raw.githubusercontent.com/pagopa/io-backend/v13.10.1-RELEASE/api_io_sign.yaml",
"api_pn": "https://raw.githubusercontent.com/pagopa/io-backend/v13.10.1-RELEASE/api_pn.yaml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v4.5.0/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_idpay": "https://raw.githubusercontent.com/pagopa/cstar-infrastructure/v5.8.0/src/domains/idpay-app/api/idpay_appio_full/openapi.appio.full.yml",
"api_fast_login": "https://raw.githubusercontent.com/pagopa/io-backend/v13.10.1-RELEASE/openapi/generated/api_fast_login.yaml",
"api_pagopa_walletv3": "https://raw.githubusercontent.com/pagopa/pagopa-infra/fde8d344d1eae9d16ca338d4f71095c805b99f75/src/domains/wallet-app/api/payment-wallet/v1/_openapi.json.tpl",
"author": "Matteo Boschi",
Expand Down
2 changes: 1 addition & 1 deletion src/persistence/idpay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ range(0, walletConfig.discountCount).forEach(() => {
instrumentId: ulid(),
activationDate: new Date(),
status: InstrumentStatus.ACTIVE,
instrumentType: InstrumentTypeEnum.QRCODE
instrumentType: InstrumentTypeEnum.APP_IO_PAYMENT
}
]
};
Expand Down
6 changes: 3 additions & 3 deletions src/routers/features/idpay/__tests__/payment.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ import { CodeEnum } from "../../../../../generated/definitions/idpay/Transaction
export const codeToFailure: {
[key: number]: { status: number; code: CodeEnum };
} = {
1: { status: 404, code: CodeEnum.PAYMENT_NOT_FOUND_EXPIRED },
2: { status: 403, code: CodeEnum.PAYMENT_USER_NOT_VALID },
3: { status: 400, code: CodeEnum.PAYMENT_STATUS_NOT_VALID },
1: { status: 404, code: CodeEnum.PAYMENT_NOT_FOUND_OR_EXPIRED },
2: { status: 403, code: CodeEnum.PAYMENT_USER_NOT_ASSOCIATED },
3: { status: 400, code: CodeEnum.PAYMENT_NOT_FOUND_OR_EXPIRED },
4: { status: 403, code: CodeEnum.PAYMENT_BUDGET_EXHAUSTED },
5: { status: 403, code: CodeEnum.PAYMENT_GENERIC_REJECTED },
6: { status: 429, code: CodeEnum.PAYMENT_TOO_MANY_REQUESTS },
Expand Down
6 changes: 3 additions & 3 deletions src/routers/features/idpay/payment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ const generateRandomTransactionError = (
export const codeToFailure: {
[key: number]: { status: number; code: CodeEnum };
} = {
1: { status: 404, code: CodeEnum.PAYMENT_NOT_FOUND_EXPIRED },
2: { status: 403, code: CodeEnum.PAYMENT_USER_NOT_VALID },
3: { status: 400, code: CodeEnum.PAYMENT_STATUS_NOT_VALID },
1: { status: 404, code: CodeEnum.PAYMENT_NOT_FOUND_OR_EXPIRED },
2: { status: 403, code: CodeEnum.PAYMENT_USER_NOT_ASSOCIATED },
3: { status: 400, code: CodeEnum.PAYMENT_NOT_FOUND_OR_EXPIRED },
4: { status: 403, code: CodeEnum.PAYMENT_BUDGET_EXHAUSTED },
5: { status: 403, code: CodeEnum.PAYMENT_GENERIC_REJECTED },
6: { status: 429, code: CodeEnum.PAYMENT_TOO_MANY_REQUESTS },
Expand Down

0 comments on commit 8e7148e

Please sign in to comment.