Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [IOBP-698] Add new mocked payment method of method management type REDIRECT #390

Merged
merged 6 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion assets/wallet/wallet_payment.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
const transactionId = urlParams.get("transactionId");
const container = document.getElementById("outcomeSelect");
if (container.value === "0") {
fetch('/ecommerce/io/v1/mock-transaction', {
fetch('/ecommerce/io/v2/mock-transaction', {
method: 'POST',
body: JSON.stringify({
transactionId,
Expand Down
16 changes: 16 additions & 0 deletions src/features/payments/persistence/paymentMethods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,22 @@ export const paymentMethodsDB: ReadonlyArray<PaymentMethodResponse> = [
} as Range
],
methodManagement: PaymentMethodManagementTypeEnum.NOT_ONBOARDABLE
},
{
id: "4",
name: "POSTEPAY",
description: "PostePay",
asset:
"https://github.com/pagopa/io-services-metadata/raw/master/logos/apps/paga-con-postepay.png",
status: PaymentMethodStatusEnum.ENABLED,
paymentTypeCode: "PPAY",
ranges: [
{
min: 0,
max: Math.floor(Math.random() * 5000)
} as Range
],
methodManagement: PaymentMethodManagementTypeEnum.REDIRECT
}
];

Expand Down
4 changes: 2 additions & 2 deletions src/features/payments/routers/router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { addHandler, SupportedMethod } from "../../../payloads/response";

export const walletRouter = Router();

export const PAYMENT_WALLET_PREFIX = "/payment-wallet/v1";
export const ECOMMERCE_PREFIX = "/ecommerce/io/v1";
export const PAYMENT_WALLET_PREFIX = "/io-payment-wallet/v1";
export const ECOMMERCE_PREFIX = "/ecommerce/io/v2";
export const TRANSACTIONS_PREFIX = "/bizevents/tx-service-jwt/v1";
export const PLATFORM_PREFIX = "/session-wallet/v1";

Expand Down
Loading