Skip to content

Commit

Permalink
chore: [IOBP-698] Add new mocked payment method of method management …
Browse files Browse the repository at this point in the history
…type REDIRECT (#390)

* chore: Add new payment method of method management type REDIRECT

* chore: prettify

* chore: adapted new baseurl ecommerce api

* chore: adapted new baseurl

* chore: changed baseurl to mock transaction
  • Loading branch information
Hantex9 authored Jun 25, 2024
1 parent 92910c7 commit 85d3b9d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
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

0 comments on commit 85d3b9d

Please sign in to comment.