UNPKG

node-wipay

Version:

This is a node wrapper for the WiPay Caribbean V1 API.

75 lines 2.31 kB
import { WiPayGateWayResponse } from '../creditcard'; export interface WiPayAuthConfig { AccountNumber: number; DeveloperID?: number; ApiKey: string; LiveMode?: boolean; } /** * Authorisation Class * @param {WiPayAuthConfig} config * @return {WiPayAuth} */ declare class WiPayAuth { private static _instance; private static _config; private static _endpoint; private static _gateway; private static _LiveMode; private static _Payments; /** * Authorisation Constructor * This function is private to allow for Singleton design. * @param {WiPayAuthConfig} config */ private constructor(); /** * Get Authorisation Instance * @param {WiPayAuthConfig} config * @return {WiPayAuth} */ static getInstance: (config?: (WiPayAuthConfig | null), payments?: boolean) => WiPayAuth; /** * Verify Hashsum * This function verifies that the hashsum returned from the Gateway Request was valid. * @param {WiPayGateWayResponse} response The response from the WiPay Gateway request. */ verify: (response: WiPayGateWayResponse) => boolean; /** * Live Mode * This function returns whether or not the authorisation module will use * the live or sandbox API endpoint. * @return {boolean} */ get LiveMode(): boolean; /** * Live Mode * This function will set the LiveMode, for the authorisation module to use * the live or sandbox API endpoint. * @param {boolean} isLive */ set LiveMode(isLive: boolean); /** * Config * This function returns the configuration of this authorisation module. * @return {WiPayAuthConfig} */ get Config(): WiPayAuthConfig; /** * Endpoint * This function returns the API endpoint currently used by the * authorisation module. * @return {string} */ get Endpoint(): string; /** * Gateway * This function returns the API Credit Card Gateway Endpoint currently * used by the authorisation module. */ get Gateway(): string; get Payments(): boolean; set Payments(usePayments: boolean); } export default WiPayAuth; //# sourceMappingURL=index.d.ts.map