UNPKG

tranxs

Version:

Tranxs is a powerful and easy-to-use Node.js library for integrating M-Pesa payment services into your application. It provides seamless support for all major M-Pesa transactions, including STK Push, B2C, B2B, C2B, Reversal, Account Balance, and Transacti

14 lines 524 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.generateTimestamp = generateTimestamp; function generateTimestamp() { const date = new Date(); const timestamp = date.getFullYear() + ("0" + (date.getMonth() + 1)).slice(-2) + ("0" + date.getDate()).slice(-2) + ("0" + date.getHours()).slice(-2) + ("0" + date.getMinutes()).slice(-2) + ("0" + date.getSeconds()).slice(-2); return timestamp; } //# sourceMappingURL=generateTimeStamp.js.map