bc-clearpay-sdk
Version:
BetterCommerce's ClearPay NodeJS SDK enables BC client applications to integrate with ClearPay merchant API system. It publishes an interface to interact with [ClearPay API v2](https://developers.clearpay.co.uk/clearpay-online/reference) endpoints.
47 lines (46 loc) • 1.75 kB
TypeScript
/**
* Class {ClearPayEnvironment} is used to store the ClearPay environment configuration such as the user ID, password, and base URL.
* The class provides a static method {init} to set the configuration.
*/
export declare class ClearPayEnvironment {
/**
* Field to store the user id.
* @property {string}
*/
static userId: string;
/**
* Field to store the password.
* @property {string}
*/
static password: string;
/**
* Field to store the paypal base url.
* @property {string}
*/
static baseUrl: string;
/**
* Initializes the ClearPay environment with the provided credentials and sets the base URL.
*
* @param userId - The user ID for authentication.
* @param password - The password for authentication.
* @param useSandBox - Optional flag to determine if the sandbox environment should be used. Defaults to true.
* If true, sets the base URL to the sandbox environment; otherwise, sets it to the production environment.
* @returns The ClearPayEnvironment class with updated credentials and base URL.
*/
static init(userId: string, password: string, useSandBox?: boolean): typeof ClearPayEnvironment;
/**
* Gets the user ID for authentication.
* @returns {string} The user ID for authentication.
*/
static getUserId(): string;
/**
* Gets the password for authentication.
* @returns {string} The password for authentication.
*/
static getPassword(): string;
/**
* Gets the base URL for the ClearPay API.
* @returns {string} The base URL for the ClearPay API.
*/
static getBaseUrl(): string;
}