From d576dc808b4b079fd62505642d5fb2b388f9809d Mon Sep 17 00:00:00 2001 From: Dmitriy Nevzorov Date: Mon, 1 Mar 2021 16:40:55 +0100 Subject: [PATCH] use monei.com --- package.json | 2 +- src/api.ts | 18 +++++++++--------- src/base.ts | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 260e39a..03af677 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "registry": "https://registry.npmjs.org/" }, "scripts": { - "generate": "openapi-generator generate -i https://js.monei.net/api/v1/openapi.json -g typescript-axios --remove-operation-id-prefix -c ./config.json -o ./src", + "generate": "openapi-generator generate -i https://js.monei.com/api/v1/openapi.json -g typescript-axios --remove-operation-id-prefix -c ./config.json -o ./src", "compile": "microbundle -f es,cjs --target node --strict", "dev": "microbundle watch -f es,cjs --target node --strict", "build": "yarn generate && yarn replace && yarn compile", diff --git a/src/api.ts b/src/api.ts index 302001d..5bea70f 100644 --- a/src/api.ts +++ b/src/api.ts @@ -126,7 +126,7 @@ export interface Card { */ export interface ConfirmPaymentRequest { /** - * A payment token generated by monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.net/docs/save-payment-method). + * A payment token generated by monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). * @type {string} * @memberof ConfirmPaymentRequest */ @@ -205,7 +205,7 @@ export interface CreatePaymentRequest { */ cancelUrl?: string; /** - * A payment token generated by monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.net/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. + * A payment token generated by monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview) or a paymentToken [saved after a previous successful payment](https://docs.monei.com/docs/save-payment-method). In case of the first one, you will also need to send the `sessionId` used to generate the token in the first place. * @type {string} * @memberof CreatePaymentRequest */ @@ -550,7 +550,7 @@ export enum PaymentLastRefundReason { */ export interface PaymentNextAction { /** - * - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.net/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.net/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. + * - `CONFIRM` - Your customer needs to be redirected to a [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page) or confirm payment using [payment token](https://docs.monei.com/docs/accept-card-payment#3-submitting-the-payment-to-monei-client-side). The **redirectUrl** will point to the hosted payment page. - `CHALLENGE` - Your customer needs to be redirected to the 3d secure challenge page provided by the bank. The **redirectUrl** will point to the 3d secure challenge page provided by the bank. - `COMPLETE` - The payment is completed. The **redirectUrl** will be the **completeUrl** if it was provided when the payment was created. * @type {string} * @memberof PaymentNextAction */ @@ -910,7 +910,7 @@ export interface PaymentShippingDetails { address?: Address; } /** - * The information about the shop (used in [hosted payment page](https://docs.monei.net/docs/use-prebuilt-payment-page)). + * The information about the shop (used in [hosted payment page](https://docs.monei.com/docs/use-prebuilt-payment-page)). * @export * @interface PaymentShop */ @@ -1064,7 +1064,7 @@ export interface RecurringPaymentRequest { */ amount?: number; /** - * Same as the `transactionType` parameter from [create payment](https://docs.monei.net/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. + * Same as the `transactionType` parameter from [create payment](https://docs.monei.com/api/#operation/payments_create). If not sent, it will default in the same transaction type used in the initial payment. * @type {PaymentTransactionType} * @memberof RecurringPaymentRequest */ @@ -1225,7 +1225,7 @@ export const PaymentsApiAxiosParamCreator = function (configuration?: Configurat }; }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1502,7 +1502,7 @@ export const PaymentsApiFp = function(configuration?: Configuration) { }; }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1606,7 +1606,7 @@ export const PaymentsApiFactory = function (configuration?: Configuration, baseP return PaymentsApiFp(configuration).capture(id, capturePaymentRequest, options).then((request) => request(axios, basePath)); }, /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] @@ -1695,7 +1695,7 @@ export class PaymentsApi extends BaseAPI { } /** - * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.net/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. + * Confirm a payment that was created without a `paymentToken` or `paymentMethod`. You can only confirm a payment with the `PENDING` status.

You can charge a customer in two steps. First create a payment without payment details and then confirm it after you generate a `paymentToken` on the front-end with monei.js [UI Components](https://docs.monei.com/docs/monei-js-overview).

You can provide additional customer information, it will override the information passed in **create payment** request. * @summary Confirm Payment * @param {string} id The payment ID * @param {ConfirmPaymentRequest} [confirmPaymentRequest] diff --git a/src/base.ts b/src/base.ts index a509225..3dfb34d 100644 --- a/src/base.ts +++ b/src/base.ts @@ -17,7 +17,7 @@ import { Configuration } from "./configuration"; // @ts-ignore import globalAxios, { AxiosPromise, AxiosInstance } from '../axios'; -export const BASE_PATH = "http://api.monei.net/v1".replace(/\/+$/, ""); +export const BASE_PATH = "https://api.monei.com/v1".replace(/\/+$/, ""); /** *