bc-elavon-sdk
Version:
BetterCommerce's Elavon NodeJS SDK enables BC client applications to integrate with Elavon merchant API system. It publishes an interface to interact with [Elavon API](https://developer.elavon.com/products/checkout-js/v1/api-reference/) endpoints.
109 lines (108 loc) • 3.89 kB
TypeScript
/**
* {ElavonEnvironment} class is used to setup the environment.
* This class provides options to select the environment.
*/
export declare class ElavonEnvironment {
/**
* The Converge API uses no auth as an authentication method. Your credentials are sent in the request body using content type x-www-form-urlencoded.
* Your Converge credentials include:
* Account ID (ssl_account_id)
* User ID (ssl_user_id)
* Converge PIN (ssl_pin)
*/
static authorizationEnabled: boolean;
/**
* Field to store the merchant id.
* @property {string}
*/
static merchantId: string;
/**
* Field to store the merchant user id.
* @property {string}
*/
static merchantUserId: string;
/**
* Field to store the vendor id.
* @property {string}
*/
static vendorId: string;
/**
* Field to store the merchant pin.
* @property {string}
*/
static merchantPIN: string;
static environment: string;
static extras: any;
/**
* Field to store the checkout auth base url.
* @property {string}
*/
static authUrl: string;
/**
* Field to store the checkout api base url.
* @property {string}
*/
static baseUrl: string;
/**
* Initializes the server environment for Elavon.
*
* This method sets up the environment by configuring merchant and vendor details,
* as well as setting the appropriate API base URLs for authentication and communication.
*
* @param {string} merchantId - The unique identifier for the merchant.
* @param {string} merchantUserId - The user identifier for the merchant.
* @param {string} merchantPIN - The PIN associated with the merchant account.
* @param {string} vendorId - The identifier for the vendor.
* @param {boolean} [useSandBox=true] - Flag indicating whether to use the sandbox environment. Defaults to true.
* @param {any} [extras={}] - Additional configuration options or parameters.
*
* @returns {ElavonEnvironment} The configured ElavonEnvironment instance.
*/
static initServer(merchantId: string, merchantUserId: string, merchantPIN: string, vendorId: string, useSandBox?: boolean, extras?: {}): typeof ElavonEnvironment;
static getAuthorizationEnabled(): boolean;
/**
* Gets the merchant identifier.
*
* @returns {string} The unique identifier for the merchant.
*/
static getMerchantId(): string;
/**
* Gets the user identifier for the merchant.
*
* @returns {string} The user identifier for the merchant.
*/
static getMerchantUserId(): string;
/**
* Gets the merchant's PIN.
*
* @returns {string} The PIN associated with the merchant account.
*/
static getMerchantPIN(): string;
/**
* Gets the vendor identifier.
*
* @returns {string} The unique identifier for the vendor.
*/
static getVendorId(): string;
/**
* Get any additional configuration options that were passed in the constructor.
* @returns {Object} The additional configuration options.
*/
static getExtras(): any;
/**
* Get the environment set for the CheckoutEnvironment.
* For example, "sandbox" or "production".
* @returns {string} The environment.
*/
static getEnvironment(): string;
/**
* Returns the base url of the Checkout authentication service.
* @returns {string} The base url of the Checkout authentication service.
*/
static getAuthUrl(): string;
/**
* Returns the base url of the Checkout API service.
* @returns {string} The base url of the Checkout API service.
*/
static getBaseUrl(): string;
}