node-paytmpg 7.1.5 → 7.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -676,6 +676,7 @@ class PaymentController {
|
|
|
676
676
|
const payuInstance = this.payuInstance;
|
|
677
677
|
const openMoneyInstance = this.openMoneyInstance;
|
|
678
678
|
console.log("request_data ", req.originalUrl, JSON.stringify(req.body));
|
|
679
|
+
console.log("request_headers ", req.originalUrl, JSON.stringify(req.headers));
|
|
679
680
|
if (config.paytm_url) {
|
|
680
681
|
await this.callback(req, res);
|
|
681
682
|
return;
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Application, RequestHandler, Router } from 'express';
|
|
|
2
2
|
import { NPCallbacks, NPConfig, NPTableNames } from './app/models';
|
|
3
3
|
import { MultiDbORM } from 'multi-db-orm';
|
|
4
4
|
export * from './app/models';
|
|
5
|
-
export declare function
|
|
5
|
+
export declare function attachViewEngine(app: Application, userConfig?: Partial<NPConfig>): void;
|
|
6
6
|
export declare function createPaymentMiddleware(app: Application, userConfig: NPConfig, db: MultiDbORM, callbacks?: NPCallbacks, authenticationMiddleware?: RequestHandler, tableNames?: NPTableNames): Router;
|
|
7
7
|
declare const _default: {
|
|
8
8
|
createPaymentMiddleware: typeof createPaymentMiddleware;
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
17
17
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
18
|
};
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.
|
|
20
|
+
exports.attachViewEngine = attachViewEngine;
|
|
21
21
|
exports.createPaymentMiddleware = createPaymentMiddleware;
|
|
22
22
|
const express_1 = __importDefault(require("express"));
|
|
23
23
|
const path_1 = __importDefault(require("path"));
|
|
@@ -26,7 +26,7 @@ const express_handlebars_1 = __importDefault(require("express-handlebars"));
|
|
|
26
26
|
const payment_controller_1 = require("./app/controllers/payment.controller");
|
|
27
27
|
const buildConfig_1 = require("./app/utils/buildConfig");
|
|
28
28
|
__exportStar(require("./app/models"), exports);
|
|
29
|
-
function
|
|
29
|
+
function attachViewEngine(app, userConfig = {}) {
|
|
30
30
|
const config = (0, buildConfig_1.buildConfig)(userConfig);
|
|
31
31
|
const saveRawBody = (req, res, buf) => {
|
|
32
32
|
req.rawBody = buf && buf.toString();
|
|
@@ -51,9 +51,9 @@ function attachBodyParser(app, userConfig = {}) {
|
|
|
51
51
|
}
|
|
52
52
|
function createPaymentMiddleware(app, userConfig, db, callbacks, authenticationMiddleware, tableNames) {
|
|
53
53
|
//check attachBodyParser
|
|
54
|
-
if (!app.get('
|
|
55
|
-
console.
|
|
56
|
-
|
|
54
|
+
if (!app.get('view engine')) {
|
|
55
|
+
console.warn('[node-paytmpg]: View engine not attached. Attaching default view engine. Either call attachViewEngine() before createPaymentMiddleware() or ensure that your Express app has a view engine attached.');
|
|
56
|
+
attachViewEngine(app, userConfig);
|
|
57
57
|
}
|
|
58
58
|
const config = (0, buildConfig_1.buildConfig)(userConfig);
|
|
59
59
|
const subApp = express_1.default.Router();
|
package/dist/package.json
CHANGED