node-paytmpg 7.3.9 → 7.4.0
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_data rawBody", req.originalUrl, req.rawBody);
|
|
679
680
|
console.log("request_headers ", req.originalUrl, JSON.stringify(req.headers));
|
|
680
681
|
if (config.paytm_url) {
|
|
681
682
|
await this.callback(req, res);
|
|
@@ -696,8 +697,6 @@ class PaymentController {
|
|
|
696
697
|
const reqBody = req.rawBody;
|
|
697
698
|
const signature = req.headers["x-razorpay-signature"];
|
|
698
699
|
console.log("Razorpay webhook signature:", signature);
|
|
699
|
-
console.log("Razorpay rawBody:", reqBody);
|
|
700
|
-
console.log("Razorpay SECRET:", config.SECRET);
|
|
701
700
|
if (signature === undefined) {
|
|
702
701
|
res.status(400).send({ message: "Missing Razorpay signature" });
|
|
703
702
|
return;
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ function attachRawBodyAndEngine(app, userConfig = {}) {
|
|
|
52
52
|
function createPaymentMiddleware(app, userConfig, db, callbacks, authenticationMiddleware, tableNames) {
|
|
53
53
|
//check attachRawBodyAndEngine
|
|
54
54
|
if (!app.get('attachRawBodyAndEngine')) {
|
|
55
|
-
console.warn('[node-paytmpg]: attachRawBodyAndEngine not attached.
|
|
55
|
+
console.warn('[node-paytmpg]: attachRawBodyAndEngine not attached. Make sure to call attachRawBodyAndEngine() or make sure hbs view engine is set and req.rawBody is available.');
|
|
56
56
|
attachRawBodyAndEngine(app, userConfig);
|
|
57
57
|
}
|
|
58
58
|
const config = (0, buildConfig_1.buildConfig)(userConfig);
|
package/dist/package.json
CHANGED