Node.js SDK for Tatrapay+ payment gateway.
- Github repository: https://github.com/SmartBase-SK/tatrapayplus-node/
- Documentation https://sdk.tatrabanka.sk/docs/libraries/node/v1.0.0
Types of application are generated automatically from swagger structure via openapi-typescript.
To generate new types after OpenAPI structure has been changed please run
npx openapi-typescript ./tatrapayplus_api_sandbox.json -o ./src/paths.d.ts
TBPlusLogger is exported from the package and can be subclassed to customize log output:
import { TBPlusSDK, TBPlusLogger } from "@tatrabanka/tatrapayplus-node";
class ConsoleLogger extends TBPlusLogger {
protected writeLine(line: string): void {
console.log("[ConsoleLogger]", line);
}
}
const logger = new ConsoleLogger();
const sdk = new TBPlusSDK(API_KEY, API_SECRET, {}, logger);Pass false to the logger constructor to disable masking of sensitive fields:
const logger = new TBPlusLogger(false);